Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def detect(img,model):
|
|
61 |
save_img = True # save inference images
|
62 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
63 |
('rtsp://', 'rtmp://', 'http://', 'https://'))
|
64 |
-
|
65 |
# Directories
|
66 |
save_dir = Path(increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok)) # increment run
|
67 |
(save_dir / 'labels' if save_txt else save_dir).mkdir(parents=True, exist_ok=True) # make dir
|
@@ -72,6 +72,7 @@ def detect(img,model):
|
|
72 |
half = device.type != 'cpu' # half precision only supported on CUDA
|
73 |
|
74 |
# Load model
|
|
|
75 |
model = attempt_load(weights, map_location=device) # load FP32 model
|
76 |
stride = int(model.stride.max()) # model stride
|
77 |
imgsz = check_img_size(imgsz, s=stride) # check img_size
|
|
|
61 |
save_img = True # save inference images
|
62 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
63 |
('rtsp://', 'rtmp://', 'http://', 'https://'))
|
64 |
+
print(webcam)
|
65 |
# Directories
|
66 |
save_dir = Path(increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok)) # increment run
|
67 |
(save_dir / 'labels' if save_txt else save_dir).mkdir(parents=True, exist_ok=True) # make dir
|
|
|
72 |
half = device.type != 'cpu' # half precision only supported on CUDA
|
73 |
|
74 |
# Load model
|
75 |
+
print(weights)
|
76 |
model = attempt_load(weights, map_location=device) # load FP32 model
|
77 |
stride = int(model.stride.max()) # model stride
|
78 |
imgsz = check_img_size(imgsz, s=stride) # check img_size
|