diff --git a/detect.py b/detect.py index 859a9202..846eb004 100644 --- a/detect.py +++ b/detect.py @@ -22,6 +22,7 @@ def detect(save_txt=False, save_img=False, view_img=False): model = Darknet(opt.cfg, img_size) # Load weights + attempt_download(weights) if weights.endswith('.pt'): # pytorch format model.load_state_dict(torch.load(weights, map_location=device)['model']) else: # darknet format