ops.rst 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .. _ops:
  2. Operators
  3. =========
  4. .. currentmodule:: torchvision.ops
  5. :mod:`torchvision.ops` implements operators, losses and layers that are specific for Computer Vision.
  6. .. note::
  7. All operators have native support for TorchScript.
  8. Detection and Segmentation Operators
  9. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. The below operators perform pre-processing as well as post-processing required in object detection and segmentation models.
  11. .. autosummary::
  12. :toctree: generated/
  13. :template: function.rst
  14. batched_nms
  15. masks_to_boxes
  16. nms
  17. roi_align
  18. roi_pool
  19. ps_roi_align
  20. ps_roi_pool
  21. .. autosummary::
  22. :toctree: generated/
  23. :template: class.rst
  24. FeaturePyramidNetwork
  25. MultiScaleRoIAlign
  26. RoIAlign
  27. RoIPool
  28. PSRoIAlign
  29. PSRoIPool
  30. Box Operators
  31. ~~~~~~~~~~~~~
  32. These utility functions perform various operations on bounding boxes.
  33. .. autosummary::
  34. :toctree: generated/
  35. :template: function.rst
  36. box_area
  37. box_convert
  38. box_iou
  39. clip_boxes_to_image
  40. complete_box_iou
  41. distance_box_iou
  42. generalized_box_iou
  43. remove_small_boxes
  44. Losses
  45. ~~~~~~
  46. The following vision-specific loss functions are implemented:
  47. .. autosummary::
  48. :toctree: generated/
  49. :template: function.rst
  50. complete_box_iou_loss
  51. distance_box_iou_loss
  52. generalized_box_iou_loss
  53. sigmoid_focal_loss
  54. Layers
  55. ~~~~~~
  56. TorchVision provides commonly used building blocks as layers:
  57. .. autosummary::
  58. :toctree: generated/
  59. :template: class.rst
  60. Conv2dNormActivation
  61. Conv3dNormActivation
  62. DeformConv2d
  63. DropBlock2d
  64. DropBlock3d
  65. FrozenBatchNorm2d
  66. MLP
  67. Permute
  68. SqueezeExcitation
  69. StochasticDepth
  70. .. autosummary::
  71. :toctree: generated/
  72. :template: function.rst
  73. deform_conv2d
  74. drop_block2d
  75. drop_block3d
  76. stochastic_depth