Skip to content

Commit a4c7e57

Browse files
explicit setup for resnet backbone
1 parent 4996ef0 commit a4c7e57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/deepforest/models/retinanet.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,18 @@ def create_model(self,
199199
model: a pytorch nn module
200200
"""
201201

202-
if pretrained is None:
202+
if pretrained == "resnet50":
203+
if revision is not None:
204+
warnings.warn(
205+
"Ignoring revision and fine-tuning from ResNet50 MS-COCO checkpoint.")
203206
model = RetinaNetHub(backbone_weights="COCO_V1",
204207
num_classes=self.config.num_classes,
205208
nms_thresh=self.config.nms_thresh,
206209
score_thresh=self.config.score_thresh,
207210
label_dict=self.config.label_dict)
208211
elif pretrained == "dinov3":
212+
warnings.warn(
213+
"Ignoring revision and fine-tuning from DinoV3 Sat-493M checkpoint.")
209214
model = RetinaNetHub(backbone_weights="dinov3",
210215
num_classes=self.config.num_classes,
211216
nms_thresh=self.config.nms_thresh,

0 commit comments

Comments
 (0)