@@ -727,7 +727,7 @@ def retinanet_resnet50_fpn(
727
727
"""
728
728
Constructs a RetinaNet model with a ResNet-50-FPN backbone.
729
729
730
- Reference: `" Focal Loss for Dense Object Detection" <https://arxiv.org/abs/1708.02002>`_.
730
+ Reference: `Focal Loss for Dense Object Detection <https://arxiv.org/abs/1708.02002>`_.
731
731
732
732
The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each
733
733
image, and should be in ``0-1`` range. Different images can have different sizes.
@@ -763,13 +763,21 @@ def retinanet_resnet50_fpn(
763
763
>>> predictions = model(x)
764
764
765
765
Args:
766
- weights (RetinaNet_ResNet50_FPN_Weights, optional): The pretrained weights for the model
767
- progress (bool): If True, displays a progress bar of the download to stderr
766
+ weights (:class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights`, optional): The
767
+ pretrained weights to use. See
768
+ :class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights`
769
+ below for more details, and possible values. By default, no
770
+ pre-trained weights are used.
771
+ progress (bool): If True, displays a progress bar of the download to stderr. Default is True.
768
772
num_classes (int, optional): number of output classes of the model (including the background)
769
- weights_backbone (ResNet50_Weights, optional): The pretrained weights for the backbone
773
+ weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for
774
+ the backbone.
770
775
trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block.
771
776
Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is
772
777
passed (the default) this value is set to 3.
778
+
779
+ .. autoclass:: torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights
780
+ :members:
773
781
"""
774
782
weights = RetinaNet_ResNet50_FPN_Weights .verify (weights )
775
783
weights_backbone = ResNet50_Weights .verify (weights_backbone )
@@ -811,19 +819,27 @@ def retinanet_resnet50_fpn_v2(
811
819
"""
812
820
Constructs an improved RetinaNet model with a ResNet-50-FPN backbone.
813
821
814
- Reference: `" Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection"
822
+ Reference: `Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection
815
823
<https://arxiv.org/abs/1912.02424>`_.
816
824
817
825
:func:`~torchvision.models.detection.retinanet_resnet50_fpn` for more details.
818
826
819
827
Args:
820
- weights (RetinaNet_ResNet50_FPN_V2_Weights, optional): The pretrained weights for the model
821
- progress (bool): If True, displays a progress bar of the download to stderr
828
+ weights (:class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights`, optional): The
829
+ pretrained weights to use. See
830
+ :class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights`
831
+ below for more details, and possible values. By default, no
832
+ pre-trained weights are used.
833
+ progress (bool): If True, displays a progress bar of the download to stderr. Default is True.
822
834
num_classes (int, optional): number of output classes of the model (including the background)
823
- weights_backbone (ResNet50_Weights, optional): The pretrained weights for the backbone
835
+ weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for
836
+ the backbone.
824
837
trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block.
825
838
Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is
826
839
passed (the default) this value is set to 3.
840
+
841
+ .. autoclass:: torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights
842
+ :members:
827
843
"""
828
844
weights = RetinaNet_ResNet50_FPN_V2_Weights .verify (weights )
829
845
weights_backbone = ResNet50_Weights .verify (weights_backbone )
0 commit comments