1717__all__ = ['ssdlite320_mobilenet_v3_large' ]
1818
1919model_urls = {
20- 'ssd320_mobilenet_v3_large_coco' : None # TODO: add weights
20+ 'ssdlite320_mobilenet_v3_large_coco' :
21+ 'https://download.pytorch.org/models/ssdlite320_mobilenet_v3_large_coco-a79551df.pth'
2122}
2223
2324
@@ -164,6 +165,27 @@ def ssdlite320_mobilenet_v3_large(pretrained: bool = False, progress: bool = Tru
164165 pretrained_backbone : bool = False , trainable_backbone_layers : Optional [int ] = None ,
165166 norm_layer : Optional [Callable [..., nn .Module ]] = None ,
166167 ** kwargs : Any ):
168+ """
169+ Constructs an SSDlite model with a MobileNetV3 Large backbone. See `SSD` for more details.
170+
171+ Example:
172+
173+ >>> model = torchvision.models.detection.ssdlite320_mobilenet_v3_large(pretrained=True)
174+ >>> model.eval()
175+ >>> x = [torch.rand(3, 320, 320), torch.rand(3, 500, 400)]
176+ >>> predictions = model(x)
177+
178+ Args:
179+ norm_layer:
180+ **kwargs:
181+ pretrained (bool): If True, returns a model pre-trained on COCO train2017
182+ progress (bool): If True, displays a progress bar of the download to stderr
183+ num_classes (int): number of output classes of the model (including the background)
184+ pretrained_backbone (bool): If True, returns a model with backbone pre-trained on Imagenet
185+ trainable_backbone_layers (int): number of trainable (not frozen) resnet layers starting from final block.
186+ Valid values are between 0 and 6, with 6 meaning all backbone layers are trainable.
187+ norm_layer (callable, optional): Module specifying the normalization layer to use.
188+ """
167189 trainable_backbone_layers = _validate_trainable_layers (
168190 pretrained or pretrained_backbone , trainable_backbone_layers , 6 , 6 )
169191
@@ -186,10 +208,10 @@ def ssdlite320_mobilenet_v3_large(pretrained: bool = False, progress: bool = Tru
186208 assert len (out_channels ) == len (anchor_generator .aspect_ratios )
187209
188210 defaults = {
189- "score_thresh" : 1e-8 ,
190- "nms_thresh" : 0.6 ,
191- "detections_per_img" : 100 ,
192- "topk_candidates" : 100 ,
211+ "score_thresh" : 0.001 ,
212+ "nms_thresh" : 0.55 ,
213+ "detections_per_img" : 300 ,
214+ "topk_candidates" : 300 ,
193215 }
194216 kwargs = {** defaults , ** kwargs }
195217 model = SSD (backbone , anchor_generator , size , num_classes ,
0 commit comments