From 17ee003651de6864f4282c182b5fe07b01fa9376 Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Mon, 16 May 2022 23:30:05 +0530 Subject: [PATCH 1/3] try re arranging docs --- docs/source/ops.rst | 93 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 71 insertions(+), 22 deletions(-) diff --git a/docs/source/ops.rst b/docs/source/ops.rst index e35981854e5..1f2ad3b7a79 100644 --- a/docs/source/ops.rst +++ b/docs/source/ops.rst @@ -10,49 +10,98 @@ Operators .. note:: All operators have native support for TorchScript. + +Detection Operators +~~~~~~~~~~~~~~~~~~~ + .. autosummary:: :toctree: generated/ :template: function.rst batched_nms + nms + roi_align + roi_pool + +.. autosummary:: + :toctree: generated/ + :template: class.rst + + FeaturePyramidNetwork + MultiScaleRoIAlign + RoIAlign + RoIPool + + +Box Operators +~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + :template: function.rst + box_area box_convert box_iou clip_boxes_to_image complete_box_iou + distance_box_iou + generalized_box_iou + remove_small_boxes + +Losses +~~~~~~ + +.. autosummary:: + :toctree: generated/ + :template: function.rst + complete_box_iou_loss + distance_box_iou_loss + generalized_box_iou_loss + sigmoid_focal_loss + + +Layers +~~~~~~ + +.. autosummary:: + :toctree: generated/ + :template: class.rst + + Conv2dNormActivation + Conv3dNormActivation + DeformConv2d + DropBlock2d + DropBlock3d + FrozenBatchNorm2d + SqueezeExcitation + StochasticDepth + +.. autosummary:: + :toctree: generated/ + :template: function.rst + deform_conv2d drop_block2d drop_block3d - generalized_box_iou - generalized_box_iou_loss - distance_box_iou - distance_box_iou_loss + stochastic_depth + + +Segmentation Operators +~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + :template: function.rst + masks_to_boxes - nms ps_roi_align ps_roi_pool - remove_small_boxes - roi_align - roi_pool - sigmoid_focal_loss - stochastic_depth .. autosummary:: :toctree: generated/ :template: class.rst - RoIAlign PSRoIAlign - RoIPool PSRoIPool - DeformConv2d - MultiScaleRoIAlign - FeaturePyramidNetwork - StochasticDepth - FrozenBatchNorm2d - Conv2dNormActivation - Conv3dNormActivation - SqueezeExcitation - DropBlock2d - DropBlock3d From a887a849fe9246a1d06a08d9387d5e33bd1aad22 Mon Sep 17 00:00:00 2001 From: Aditya Oke Date: Wed, 18 May 2022 00:08:18 +0530 Subject: [PATCH 2/3] rewrite docs a bit --- docs/source/ops.rst | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/docs/source/ops.rst b/docs/source/ops.rst index 1f2ad3b7a79..bee540b723c 100644 --- a/docs/source/ops.rst +++ b/docs/source/ops.rst @@ -5,23 +5,28 @@ Operators .. currentmodule:: torchvision.ops -:mod:`torchvision.ops` implements operators that are specific for Computer Vision. +:mod:`torchvision.ops` implements operators, losses and layers that are specific for Computer Vision. .. note:: All operators have native support for TorchScript. -Detection Operators -~~~~~~~~~~~~~~~~~~~ +Detection and Segmentation Operators +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The below operators perform pre-processing as well as post-processing required in object detection and segmentation models. .. autosummary:: :toctree: generated/ :template: function.rst batched_nms + masks_to_boxes nms roi_align roi_pool + ps_roi_align + ps_roi_pool .. autosummary:: :toctree: generated/ @@ -31,11 +36,15 @@ Detection Operators MultiScaleRoIAlign RoIAlign RoIPool + PSRoIAlign + PSRoIPool Box Operators ~~~~~~~~~~~~~ +These utility functions perform various operations on bounding boxes. + .. autosummary:: :toctree: generated/ :template: function.rst @@ -52,6 +61,8 @@ Box Operators Losses ~~~~~~ +The following loss functions are implemented which are useful for object detection. + .. autosummary:: :toctree: generated/ :template: function.rst @@ -65,6 +76,8 @@ Losses Layers ~~~~~~ +Torchvision provides commonly used building blocks as layers which can be composed together to create models. + .. autosummary:: :toctree: generated/ :template: class.rst @@ -86,22 +99,3 @@ Layers drop_block2d drop_block3d stochastic_depth - - -Segmentation Operators -~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - :template: function.rst - - masks_to_boxes - ps_roi_align - ps_roi_pool - -.. autosummary:: - :toctree: generated/ - :template: class.rst - - PSRoIAlign - PSRoIPool From 7807721f59136d99907e8408f3a6661254cbf45c Mon Sep 17 00:00:00 2001 From: Aditya Oke <47158509+oke-aditya@users.noreply.github.com> Date: Wed, 18 May 2022 13:51:46 +0530 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Vasilis Vryniotis --- docs/source/ops.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/ops.rst b/docs/source/ops.rst index bee540b723c..d045334ce3c 100644 --- a/docs/source/ops.rst +++ b/docs/source/ops.rst @@ -61,7 +61,7 @@ These utility functions perform various operations on bounding boxes. Losses ~~~~~~ -The following loss functions are implemented which are useful for object detection. +The following vision-specific loss functions are implemented: .. autosummary:: :toctree: generated/ @@ -76,7 +76,7 @@ The following loss functions are implemented which are useful for object detecti Layers ~~~~~~ -Torchvision provides commonly used building blocks as layers which can be composed together to create models. +TorchVision provides commonly used building blocks as layers: .. autosummary:: :toctree: generated/