Learn R Programming

torchvision

torchvision is an extension for torch providing image loading, transformations, common architectures for computer vision, pre-trained weights and access to commonly used datasets.

Installation

The CRAN release can be installed with:

install.packages("torchvision")

You can install the development version from GitHub with:

remotes::install_github("mlverse/torchvision@main")

Copy Link

Version

Install

install.packages('torchvision')

Monthly Downloads

6,126

Version

0.8.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Daniel Falbel

Last Published

November 6th, 2025

Functions in torchvision (0.8.0)

batched_nms

Batched Non-maximum Suppression (NMS)
base_loader

Base loader
draw_segmentation_masks

Draw segmentation masks
coco_caption_dataset

COCO Caption Dataset
eurosat_dataset

EuroSAT datasets
.rename_mobilenet_v3_state_dict

Rename state_dict keys to match current MobileNetV3 model structure
coco_polygon_to_mask

Convert COCO polygon to mask tensor (Robust Version)
cifar10_dataset

CIFAR datasets
draw_keypoints

Draws Keypoints
draw_bounding_boxes

Draws bounding boxes on image.
clip_boxes_to_image

Clip Boxes to Image
coco_detection_dataset

COCO Detection Dataset
image_folder_dataset

Create an image folder dataset
generalized_box_iou

Generalized Box IoU
fer_dataset

FER-2013 Facial Expression Dataset
fgvc_aircraft_dataset

FGVC Aircraft Dataset
flowers102_dataset

Oxford Flowers 102 Dataset
flickr_caption_dataset

Flickr Caption Datasets
magick_loader

Load an Image using ImageMagick
mnist_dataset

MNIST and Derived Datasets
model_fasterrcnn

Faster R-CNN Models
model_inception_v3

Inception v3 model
imagenet_classes

ImageNet Class Labels
model_alexnet

AlexNet Model Architecture
model_fcn_resnet

Fully Convolutional Network for Semantic Segmentation
lfw_dataset

LFW Datasets
model_efficientnet_v2

EfficientNetV2 Models
model_facenet

MTCNN Face Detection Networks
model_maxvit

MaxViT Model
model_vit

Vision Transformer Implementation
places365_dataset

Places365 Dataset
model_mobilenet_v3

MobileNetV3 Model
pascal_voc_datasets

Pascal VOC Datasets
nms

Non-maximum Suppression (NMS)
model_resnet

ResNet implementation
model_mobilenet_v2

MobileNetV2 Model
model_deeplabv3

DeepLabV3 Models
model_efficientnet

EfficientNet Models
oxfordiiitpet_dataset

Oxford-IIIT Pet Classification Datasets
oxfordiiitpet_segmentation_dataset

Oxford-IIIT Pet Segmentation Dataset
model_convnext

ConvNeXt Implementation
model_vgg

VGG implementation
tensor_image_display

Display image tensor
tensor_image_browse

Display image tensor
rf100_medical_collection

RoboFlow 100 Medical dataset Collection
rf100_infrared_collection

RoboFlow 100 Infrared dataset Collection
rf100_underwater_collection

RoboFlow 100 Underwater dataset Collection
rf100_peixos_segmentation_dataset

RF100 Peixos Segmentation Dataset
transform_adjust_saturation

Adjust the color saturation of an image
remove_small_boxes

Remove Small Boxes
rf100_biology_collection

RoboFlow 100 Biology dataset Collection
transform_adjust_hue

Adjust the hue of an image
transform_color_jitter

Randomly change the brightness, contrast and saturation of an image
transform_convert_image_dtype

Convert a tensor image to the given dtype and scale the values accordingly
transform_center_crop

Crops the given image at the center
transform_affine

Apply affine transformation on an image keeping image center invariant
transform_grayscale

Convert image to grayscale
transform_hflip

Horizontally flip a PIL Image or Tensor
transform_adjust_contrast

Adjust the contrast of an image
transform_normalize

Normalize a tensor image with mean and standard deviation
transform_adjust_gamma

Adjust the gamma of an RGB image
transform_linear_transformation

Transform a tensor image with a square transformation matrix and a mean_vector computed offline
rf100_document_collection

RF100 Document Collection Datasets
transform_random_affine

Random affine transformation of the image keeping center invariant
transform_random_apply

Apply a list of transformations randomly with a given probability
rf100_damage_collection

RoboFlow 100 Damages dataset Collection
transform_random_resized_crop

Crop image to random size and aspect ratio
transform_random_perspective

Random perspective transformation of an image with a given probability
transform_crop

Crop the given image at specified location and output size
transform_random_order

Apply a list of transformations in a random order
transform_pad

Pad the given image on all sides with the given "pad" value
tiny_imagenet_dataset

Tiny ImageNet dataset
transform_vflip

Vertically flip a PIL Image or Tensor
vision_make_grid

A simplified version of torchvision.utils.make_grid
whoi_plankton_dataset

WHOI Plankton Datasets
transform_adjust_brightness

Adjust the brightness of an image
transform_random_horizontal_flip

Horizontally flip an image randomly with a given probability
transform_perspective

Perspective transformation of an image
transform_random_vertical_flip

Vertically flip an image randomly with a given probability
transform_random_rotation

Rotate the image by angle
transform_resize

Resize the input image to the given size
transform_resized_crop

Crop an image and resize it to a desired size
transform_random_erasing

Randomly selects a rectangular region in an image and erases its pixel values
transform_to_tensor

Convert an image to a tensor
transform_random_grayscale

Randomly convert image to grayscale with a given probability
transform_ten_crop

Crop an image and the flipped image each into four corners and a central crop
transform_five_crop

Crop image into four corners and a central crop
whoi_small_coralnet_dataset

Coralnet Dataset
transform_rotate

Angular rotation of an image
transform_rgb_to_grayscale

Convert RGB Image Tensor to Grayscale
transform_random_choice

Apply single transformation randomly picked from a list
transform_random_crop

Crop the given image at a random location
box_xyxy_to_xywh

box_xyxy_to_xywh
box_iou

Box IoU
box_xyxy_to_cxcywh

box_xyxy_to_cxcywh
box_cxcywh_to_xyxy

box_cxcywh_to_xyxy
box_area

Box Area
box_xywh_to_xyxy

box_xywh_to_xyxy
box_convert

Box Convert
caltech_dataset

Caltech Datasets