Skip to content

Commit d252925

Browse files
authored
Merge branch 'master' into add-modulation-for-deformable-convolution
2 parents 30e1f70 + a9c78f1 commit d252925

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1893
-499
lines changed

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ so make sure that it is also available to cmake via the ``CMAKE_PREFIX_PATH``.
123123

124124
For an example setup, take a look at ``examples/cpp/hello_world``.
125125

126+
TorchVision Operators
127+
---------------------
128+
In order to get the torchvision operators registered with torch (eg. for the JIT), all you need to do is to ensure that you
129+
:code:`#include <torchvision/vision.h>` in your project.
130+
126131
Documentation
127132
=============
128133
You can find the API documentation on the pytorch website: https://pytorch.org/docs/stable/torchvision/index.html

cmake/TorchVisionConfig.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if(NOT TARGET Python3::Python)
3232
find_package(Python3 COMPONENTS Development)
3333
endif()
3434

35-
set_target_properties(TorchVision::TorchVision PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@" INTERFACE_LINK_LIBRARIES "torch;Python3::Python" )
35+
set_target_properties(TorchVision::TorchVision PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${${PN}_INCLUDE_DIR}" INTERFACE_LINK_LIBRARIES "torch;Python3::Python" )
3636

3737

3838
if(@WITH_CUDA@)

docs/source/io.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ In addition to the :mod:`read_video` function, we provide a high-performance
2424
lower-level API for more fine-grained control compared to the :mod:`read_video` function.
2525
It does all this whilst fully supporting torchscript.
2626

27-
.. autoclass:: Video
28-
:members: next, get_metadata, set_current_stream, seek
27+
.. autoclass:: VideoReader
28+
:members: __next__, get_metadata, set_current_stream, seek
2929

3030

31-
Example of usage:
31+
Example of inspecting a video:
3232

3333
.. code:: python
3434
@@ -37,7 +37,7 @@ Example of usage:
3737
# Constructor allocates memory and a threaded decoder
3838
# instance per video. At the momet it takes two arguments:
3939
# path to the video file, and a wanted stream.
40-
reader = torchvision.io.Video(video_path, "video")
40+
reader = torchvision.io.VideoReader(video_path, "video")
4141
4242
# The information about the video can be retrieved using the
4343
# `get_metadata()` method. It returns a dictionary for every stream, with
@@ -50,6 +50,11 @@ Example of usage:
5050
# following would print out the list of frame rates for every present video stream
5151
print(reader_md["video"]["fps"])
5252
53+
# we explicitly select the stream we would like to operate on. In
54+
# the constructor we select a default video stream, but
55+
# in practice, we can set whichever stream we would like
56+
video.set_current_stream("video:0")
57+
5358
5459
Image
5560
-----

docs/source/models.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ the instances set of COCO train2017 and evaluated on COCO val2017.
350350
Network box AP mask AP keypoint AP
351351
================================ ======= ======== ===========
352352
Faster R-CNN ResNet-50 FPN 37.0 - -
353+
RetinaNet ResNet-50 FPN 36.4 - -
353354
Mask R-CNN ResNet-50 FPN 37.9 34.6 -
354355
================================ ======= ======== ===========
355356

@@ -405,6 +406,7 @@ precision-recall.
405406
Network train time (s / it) test time (s / it) memory (GB)
406407
============================== =================== ================== ===========
407408
Faster R-CNN ResNet-50 FPN 0.2288 0.0590 5.2
409+
RetinaNet ResNet-50 FPN 0.2514 0.0939 4.1
408410
Mask R-CNN ResNet-50 FPN 0.2728 0.0903 5.4
409411
Keypoint R-CNN ResNet-50 FPN 0.3789 0.1242 6.8
410412
============================== =================== ================== ===========
@@ -416,6 +418,12 @@ Faster R-CNN
416418
.. autofunction:: torchvision.models.detection.fasterrcnn_resnet50_fpn
417419

418420

421+
RetinaNet
422+
------------
423+
424+
.. autofunction:: torchvision.models.detection.retinanet_resnet50_fpn
425+
426+
419427
Mask R-CNN
420428
----------
421429

docs/source/transforms.rst

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,77 +57,103 @@ Compositions of transforms
5757

5858
.. autoclass:: Compose
5959

60-
Transforms on PIL Image
61-
-----------------------
60+
Transforms on PIL Image and torch.\*Tensor
61+
------------------------------------------
6262

6363
.. autoclass:: CenterCrop
64+
:members:
6465

6566
.. autoclass:: ColorJitter
67+
:members:
6668

6769
.. autoclass:: FiveCrop
70+
:members:
6871

6972
.. autoclass:: Grayscale
73+
:members:
7074

7175
.. autoclass:: Pad
76+
:members:
7277

7378
.. autoclass:: RandomAffine
79+
:members:
7480

7581
.. autoclass:: RandomApply
7682

77-
.. autoclass:: RandomChoice
78-
7983
.. autoclass:: RandomCrop
84+
:members:
8085

8186
.. autoclass:: RandomGrayscale
87+
:members:
8288

8389
.. autoclass:: RandomHorizontalFlip
84-
85-
.. autoclass:: RandomOrder
90+
:members:
8691

8792
.. autoclass:: RandomPerspective
93+
:members:
8894

8995
.. autoclass:: RandomResizedCrop
96+
:members:
9097

9198
.. autoclass:: RandomRotation
99+
:members:
92100

93101
.. autoclass:: RandomSizedCrop
102+
:members:
94103

95104
.. autoclass:: RandomVerticalFlip
105+
:members:
96106

97107
.. autoclass:: Resize
108+
:members:
98109

99110
.. autoclass:: Scale
111+
:members:
100112

101113
.. autoclass:: TenCrop
114+
:members:
102115

103116
.. autoclass:: GaussianBlur
117+
:members:
104118

105-
Transforms on torch.\*Tensor
119+
Transforms on PIL Image only
106120
----------------------------
107121

122+
.. autoclass:: RandomChoice
123+
124+
.. autoclass:: RandomOrder
125+
126+
127+
Transforms on torch.\*Tensor only
128+
---------------------------------
129+
108130
.. autoclass:: LinearTransformation
131+
:members:
109132

110133
.. autoclass:: Normalize
111-
:members: __call__
112-
:special-members:
134+
:members:
113135

114136
.. autoclass:: RandomErasing
137+
:members:
138+
139+
.. autoclass:: ConvertImageDtype
140+
115141

116142
Conversion Transforms
117143
---------------------
118144

119145
.. autoclass:: ToPILImage
120-
:members: __call__
121-
:special-members:
146+
:members:
122147

123148
.. autoclass:: ToTensor
124-
:members: __call__
125-
:special-members:
149+
:members:
150+
126151

127152
Generic Transforms
128153
------------------
129154

130155
.. autoclass:: Lambda
156+
:members:
131157

132158

133159
Functional Transforms

0 commit comments

Comments
 (0)