updates
This commit is contained in:
parent
de0612ca09
commit
0f3f6c03e7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue