torchvision¶
The torchvision
package consists of popular datasets, model
architectures, and common image transformations for computer vision.
-
torchvision.
set_image_backend
(backend)[source]¶ Specifies the package used to load images.
- Parameters
backend (string) – Name of the image backend. one of {‘PIL’, ‘accimage’}. The
accimage
package uses the Intel IPP library. It is generally faster than PIL, but does not support as many operations.
-
torchvision.
set_video_backend
(backend)[source]¶ Specifies the package used to decode videos.
- Parameters
backend (string) – Name of the video backend. one of {‘pyav’, ‘video_reader’}. The
pyav
package uses the 3rd party PyAv library. It is a Pythonic binding for the FFmpeg libraries. Thevideo_reader
package includes a native C++ implementation on top of FFMPEG libraries, and a python API of TorchScript custom operator. It is generally decoding faster thanpyav
, but perhaps is less robust.