Spaces:
Runtime error
Runtime error
Add resize
Browse files
app.py
CHANGED
@@ -46,7 +46,10 @@ def detect(img,model):
|
|
46 |
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment')
|
47 |
parser.add_argument('--trace', action='store_true', help='trace model')
|
48 |
opt = parser.parse_args()
|
49 |
-
|
|
|
|
|
|
|
50 |
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
51 |
save_img = True # save inference images
|
52 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
|
|
46 |
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment')
|
47 |
parser.add_argument('--trace', action='store_true', help='trace model')
|
48 |
opt = parser.parse_args()
|
49 |
+
|
50 |
+
if model == "yolov7":
|
51 |
+
img.resize((640, 640))
|
52 |
+
img.save("Inference/test.jpg")
|
53 |
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
54 |
save_img = True # save inference images
|
55 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|