igmarco commited on
Commit
16b6950
1 Parent(s): f172b96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -4,9 +4,13 @@ from fastai.vision.all import *
4
  from icevision.all import *
5
 
6
  # repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
7
- repo_id = "igmarco/raccoon-image-detection"
8
 
9
- model1 = from_pretrained_fastai(repo_id)
 
 
 
 
10
 
11
  def show_preds(input_image, display_label, display_bbox, detection_threshold):
12
 
 
4
  from icevision.all import *
5
 
6
  # repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
7
+ # repo_id = "igmarco/raccoon-image-detection"
8
 
9
+ model1 = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn, num_classes=len(class_map))
10
+ state_dict = torch.load('fasterRCNN_resnet18_Raccoons.pth')
11
+ model1.load_state_dict(state_dict)
12
+
13
+ # model1 = from_pretrained_fastai(repo_id)
14
 
15
  def show_preds(input_image, display_label, display_bbox, detection_threshold):
16