hank1996 commited on
Commit
5fe92f1
·
1 Parent(s): d8f03ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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