mirari commited on
Commit
905c3cb
1 Parent(s): 1156e83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ state_dict = torch.load('fasterRCNNKangaroo.pth', map_location=torch.device('cpu
13
  model.load_state_dict(state_dict)
14
  size = 384
15
 
16
- infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(size),tfms.A.Normalize()])
17
  def predict(img):
18
  img = PILImage.create(img)
19
  pred_dict = models.torchvision.faster_rcnn.end2end_detect(img, infer_tfms, model.to("cpu"), class_map=class_map, detection_threshold=0.5)
13
  model.load_state_dict(state_dict)
14
  size = 384
15
 
16
+ infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(size),tfms.A.Normalize()])
17
  def predict(img):
18
  img = PILImage.create(img)
19
  pred_dict = models.torchvision.faster_rcnn.end2end_detect(img, infer_tfms, model.to("cpu"), class_map=class_map, detection_threshold=0.5)