hank1996 commited on
Commit
34934d6
·
1 Parent(s): b89d5de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -81,6 +81,7 @@ def detect(img,model):
81
  #imgsz = check_img_size(imgsz, s=stride) # check img_size
82
  print(weights)
83
  if weights == 'yolopv2.pt':
 
84
  stride =32
85
  model = torch.jit.load(weights,map_location=device)
86
  model.eval()
@@ -162,7 +163,7 @@ def detect(img,model):
162
  #print('inf : (%.4fs/frame) nms : (%.4fs/frame)' % (inf_time.avg,nms_time.avg))
163
  #print(f'Done. ({time.time() - t0:.3f}s)')
164
  #print(im0.shape)
165
- if weights == 'yolop.pt':
166
  weights = 'End-to-end.pth'
167
  print(weights)
168
  from lib.config import cfg
 
81
  #imgsz = check_img_size(imgsz, s=stride) # check img_size
82
  print(weights)
83
  if weights == 'yolopv2.pt':
84
+ print(weights)
85
  stride =32
86
  model = torch.jit.load(weights,map_location=device)
87
  model.eval()
 
163
  #print('inf : (%.4fs/frame) nms : (%.4fs/frame)' % (inf_time.avg,nms_time.avg))
164
  #print(f'Done. ({time.time() - t0:.3f}s)')
165
  #print(im0.shape)
166
+ elif weights == 'yolop.pt':
167
  weights = 'End-to-end.pth'
168
  print(weights)
169
  from lib.config import cfg