From 54b1afc966af22f8aae86f35933357cb87def444 Mon Sep 17 00:00:00 2001 From: Prabhat Roy Date: Wed, 8 Sep 2021 14:47:32 +0100 Subject: [PATCH 1/3] Added paper references to detection models --- torchvision/models/detection/faster_rcnn.py | 2 ++ torchvision/models/detection/keypoint_rcnn.py | 2 ++ torchvision/models/detection/mask_rcnn.py | 2 ++ torchvision/models/detection/retinanet.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/torchvision/models/detection/faster_rcnn.py b/torchvision/models/detection/faster_rcnn.py index 83f2eb88f88..f94783e2155 100644 --- a/torchvision/models/detection/faster_rcnn.py +++ b/torchvision/models/detection/faster_rcnn.py @@ -300,6 +300,8 @@ def fasterrcnn_resnet50_fpn(pretrained=False, progress=True, """ Constructs a Faster R-CNN model with a ResNet-50-FPN backbone. + Reference: `"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks" `_. + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes. diff --git a/torchvision/models/detection/keypoint_rcnn.py b/torchvision/models/detection/keypoint_rcnn.py index fd9a980b97d..79df3b450c4 100644 --- a/torchvision/models/detection/keypoint_rcnn.py +++ b/torchvision/models/detection/keypoint_rcnn.py @@ -278,6 +278,8 @@ def keypointrcnn_resnet50_fpn(pretrained=False, progress=True, """ Constructs a Keypoint R-CNN model with a ResNet-50-FPN backbone. + Reference: `"Mask R-CNN" `_. + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes. diff --git a/torchvision/models/detection/mask_rcnn.py b/torchvision/models/detection/mask_rcnn.py index ad8f356ad69..06b36d573ab 100644 --- a/torchvision/models/detection/mask_rcnn.py +++ b/torchvision/models/detection/mask_rcnn.py @@ -271,6 +271,8 @@ def maskrcnn_resnet50_fpn(pretrained=False, progress=True, """ Constructs a Mask R-CNN model with a ResNet-50-FPN backbone. + Reference: `"Mask R-CNN" `_. + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes. diff --git a/torchvision/models/detection/retinanet.py b/torchvision/models/detection/retinanet.py index 4dd95285dbc..c6e301c268c 100644 --- a/torchvision/models/detection/retinanet.py +++ b/torchvision/models/detection/retinanet.py @@ -569,6 +569,8 @@ def retinanet_resnet50_fpn(pretrained=False, progress=True, """ Constructs a RetinaNet model with a ResNet-50-FPN backbone. + Reference: `"Focal Loss for Dense Object Detection" `_. + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes. From 89049e070fcb4903c911f6efe9e9229f2e61c23a Mon Sep 17 00:00:00 2001 From: Prabhat Roy Date: Wed, 8 Sep 2021 14:54:21 +0100 Subject: [PATCH 2/3] Ignore linter warning --- torchvision/models/detection/faster_rcnn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/models/detection/faster_rcnn.py b/torchvision/models/detection/faster_rcnn.py index f94783e2155..8238f3100d0 100644 --- a/torchvision/models/detection/faster_rcnn.py +++ b/torchvision/models/detection/faster_rcnn.py @@ -300,7 +300,7 @@ def fasterrcnn_resnet50_fpn(pretrained=False, progress=True, """ Constructs a Faster R-CNN model with a ResNet-50-FPN backbone. - Reference: `"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks" `_. + Reference: `"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks" `_. # noqa The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes. From a2238f96d59936b980b3095f0c47d7b9baf69262 Mon Sep 17 00:00:00 2001 From: Prabhat Roy Date: Wed, 8 Sep 2021 15:00:13 +0100 Subject: [PATCH 3/3] Break long line into two --- torchvision/models/detection/faster_rcnn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torchvision/models/detection/faster_rcnn.py b/torchvision/models/detection/faster_rcnn.py index 8238f3100d0..c3ec8db0a19 100644 --- a/torchvision/models/detection/faster_rcnn.py +++ b/torchvision/models/detection/faster_rcnn.py @@ -300,7 +300,8 @@ def fasterrcnn_resnet50_fpn(pretrained=False, progress=True, """ Constructs a Faster R-CNN model with a ResNet-50-FPN backbone. - Reference: `"Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks" `_. # noqa + Reference: `"Faster R-CNN: Towards Real-Time Object Detection with + Region Proposal Networks" `_. The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each image, and should be in ``0-1`` range. Different images can have different sizes.