Spaces:
Sleeping
Sleeping
Commit ·
0f4287c
1
Parent(s): 06e20ee
UPDATE MODEL
Browse files
model.py
CHANGED
|
@@ -8,7 +8,7 @@ from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
|
|
| 8 |
def create_model(num_classes):
|
| 9 |
|
| 10 |
# load Faster RCNN pre-trained model
|
| 11 |
-
model = torchvision.models.detection.
|
| 12 |
|
| 13 |
# get the number of input features
|
| 14 |
in_features = model.roi_heads.box_predictor.cls_score.in_features
|
|
|
|
| 8 |
def create_model(num_classes):
|
| 9 |
|
| 10 |
# load Faster RCNN pre-trained model
|
| 11 |
+
model = torchvision.models.detection.fasterrcnn_resnet50_fpn_v2(weights = "COCO_V1" ,pretrained=True, weights_backbone = 'IMAGENET1K_V1', progress=True)
|
| 12 |
|
| 13 |
# get the number of input features
|
| 14 |
in_features = model.roi_heads.box_predictor.cls_score.in_features
|