Spaces:
Runtime error
Runtime error
Commit
·
b779888
1
Parent(s):
32b8a73
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ import torch.backends.cudnn as cudnn
|
|
11 |
from models.experimental import attempt_load
|
12 |
import keras_ocr
|
13 |
import matplotlib.pyplot as plt
|
|
|
14 |
|
15 |
from utils.datasets import LoadStreams, LoadImages
|
16 |
from utils.general import check_img_size, check_requirements, check_imshow, non_max_suppression, apply_classifier, \
|
@@ -160,7 +161,7 @@ def detect_Custom(img,model,boundedImage):
|
|
160 |
|
161 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
162 |
|
163 |
-
return Image.fromarray(im0[:,:,::-1]),
|
164 |
|
165 |
|
166 |
|
|
|
11 |
from models.experimental import attempt_load
|
12 |
import keras_ocr
|
13 |
import matplotlib.pyplot as plt
|
14 |
+
from numpy import asarray
|
15 |
|
16 |
from utils.datasets import LoadStreams, LoadImages
|
17 |
from utils.general import check_img_size, check_requirements, check_imshow, non_max_suppression, apply_classifier, \
|
|
|
161 |
|
162 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
163 |
|
164 |
+
return Image.fromarray(im0[:,:,::-1]), asarray(images[0])
|
165 |
|
166 |
|
167 |
|