Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,9 +48,11 @@ def detect(img,model):
|
|
48 |
opt = parser.parse_args()
|
49 |
img.save("Inference/test.jpg")
|
50 |
if model == "yolov7":
|
51 |
-
|
|
|
52 |
if model == "yolov7-e6e" or "yolov7-e6":
|
53 |
-
|
|
|
54 |
save_img = True # save inference images
|
55 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
56 |
('rtsp://', 'rtmp://', 'http://', 'https://'))
|
|
|
48 |
opt = parser.parse_args()
|
49 |
img.save("Inference/test.jpg")
|
50 |
if model == "yolov7":
|
51 |
+
opt.img_size=640
|
52 |
+
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
53 |
if model == "yolov7-e6e" or "yolov7-e6":
|
54 |
+
opt.img_size=1280
|
55 |
+
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
56 |
save_img = True # save inference images
|
57 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
58 |
('rtsp://', 'rtmp://', 'http://', 'https://'))
|