models_new.rst 4.5 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.. _models_new:

Models and pre-trained weights - New
####################################

.. note::

    These are the new models docs, documenting the new multi-weight API.
    TODO: Once all is done, remove the "- New" part in the title above, and
    rename this file as models.rst


The ``torchvision.models`` subpackage contains definitions of models for addressing
different tasks, including: image classification, pixelwise semantic
segmentation, object detection, instance segmentation, person
keypoint detection, video classification, and optical flow.

.. note ::
    Backward compatibility is guaranteed for loading a serialized 
    ``state_dict`` to the model created using old PyTorch version. 
    On the contrary, loading entire saved models or serialized 
    ``ScriptModules`` (seralized using older versions of PyTorch) 
    may not preserve the historic behaviour. Refer to the following 
    `documentation 
    <https://pytorch.org/docs/stable/notes/serialization.html#id6>`_   


Classification
==============

.. currentmodule:: torchvision.models

The following classification models are available, with or without pre-trained
weights:

.. toctree::
   :maxdepth: 1

39
   models/alexnet
Hu Ye's avatar
Hu Ye committed
40
   models/convnext
41
   models/densenet
42
   models/efficientnet
43
   models/efficientnetv2
44
   models/googlenet
Aditya Oke's avatar
Aditya Oke committed
45
   models/inception
Joao Gomes's avatar
Joao Gomes committed
46
   models/mnasnet
47
   models/mobilenetv2
48
   models/mobilenetv3
49
   models/regnet
50
   models/resnet
51
   models/resnext
52
   models/shufflenetv2
Nicolas Hug's avatar
Nicolas Hug committed
53
   models/squeezenet
54
   models/ssd300
55
   models/swin_transformer
56
   models/vgg
57
   models/vision_transformer
58
   models/wide_resnet
59
60
61
62
63
64
65
66
67


Table of all available classification weights
---------------------------------------------

Accuracies are reported on ImageNet

.. include:: generated/classification_table.rst

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Quantized models
----------------

.. currentmodule:: torchvision.models.quantization

The following quantized classification models are available, with or without
pre-trained weights:

.. toctree::
   :maxdepth: 1

   models/googlenet_quant


Table of all available quantized classification weights
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Accuracies are reported on ImageNet

.. include:: generated/classification_quant_table.rst

89
90
91
92
93
94
95
96
97
98
99
100
Semantic Segmentation
=====================

.. currentmodule:: torchvision.models.segmentation

The following semantic segmentation models are available, with or without
pre-trained weights:

.. toctree::
   :maxdepth: 1

   models/deeplabv3
101
   models/fcn
Aditya Oke's avatar
Aditya Oke committed
102
   models/lraspp
103
104
105
106
107
108
109
110
111

Table of all available semantic segmentation weights
----------------------------------------------------

All models are evaluated on COCO val2017:

.. include:: generated/segmentation_table.rst


112

113
114
115
Object Detection, Instance Segmentation and Person Keypoint Detection
=====================================================================

116
Object Detection
117
----------------
118

119
120
.. currentmodule:: torchvision.models.detection

121
The following object detection models are available, with or without pre-trained
122
123
124
125
126
weights:

.. toctree::
   :maxdepth: 1

127
   models/faster_rcnn
Hu Ye's avatar
Hu Ye committed
128
129
   models/fcos
   models/retinanet
130
   models/ssdlite
131

132
133
Table of all available Object detection weights
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134
135
136
137

Box MAPs are reported on COCO

.. include:: generated/detection_table.rst
138

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Instance Segmentation
---------------------

.. currentmodule:: torchvision.models.detection

The following instance segmentation models are available, with or without pre-trained
weights:

.. toctree::
   :maxdepth: 1

   models/mask_rcnn

Table of all available Instance segmentation weights
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Box and Mask MAPs are reported on COCO

.. include:: generated/instance_segmentation_table.rst
158

159
160
Keypoint Detection
------------------
161
162
163
164
165
166
167
168
169
170
171
172

.. currentmodule:: torchvision.models.detection

The following keypoint detection models are available, with or without
pre-trained weights:

.. toctree::
   :maxdepth: 1

   models/keypoint_rcnn

Table of all available Keypoint detection weights
173
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174
175
176
177
178
179

Box and Keypoint MAPs are reported on COCO:

.. include:: generated/detection_keypoint_table.rst


180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Video Classification
====================

.. currentmodule:: torchvision.models.video

The following video classification models are available, with or without
pre-trained weights:

.. toctree::
   :maxdepth: 1

   models/video_resnet

Table of all available video classification weights
---------------------------------------------------

Accuracies are reported on Kinetics-400

.. include:: generated/video_table.rst