Learn R Programming

⚠️There's a newer version (0.5.1) of this package.Take me there.

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

2,365

Version

0.3.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Daniel Falbel

Last Published

May 4th, 2021

Functions in torchvision (0.3.0)

cifar10_dataset

Cifar datasets
transform_color_jitter

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

Adjust the hue of an image
transform_adjust_gamma

Adjust the gamma of an RGB image
transform_center_crop

Crops the given image at the center
transform_random_affine

Random affine transformation of the image keeping center invariant
transform_adjust_contrast

Adjust the contrast of an image
transform_linear_transformation

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

Horizontally flip a PIL Image or Tensor
transform_perspective

Perspective transformation of an image
transform_adjust_brightness

Adjust the brightness of an image
transform_adjust_saturation

Adjust the color saturation of an image
transform_normalize

Normalize a tensor image with mean and standard deviation
transform_affine

Apply affine transformation on an image keeping image center invariant
transform_pad

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

Apply single transformation randomly picked from a list
transform_random_apply

Apply a list of transformations randomly with a given probability
transform_random_grayscale

Randomly convert image to grayscale with a given probability
transform_random_horizontal_flip

Horizontally flip an image randomly with a given probability
transform_grayscale

Convert image to grayscale
transform_random_perspective

Random perspective transformation of an image with a given probability
transform_random_order

Apply a list of transformations in a random order
transform_five_crop

Crop image into four corners and a central crop
transform_to_tensor

Convert an image to a tensor
transform_random_crop

Crop the given image at a random location
transform_random_erasing

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

Vertically flip a PIL Image or Tensor
transform_convert_image_dtype

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

Crop an image and resize it to a desired size
transform_random_vertical_flip

Vertically flip an image randomly with a given probability
transform_random_resized_crop

Crop image to random size and aspect ratio
transform_random_rotation

Rotate the image by angle
transform_crop

Crop the given image at specified location and output size
transform_ten_crop

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

Angular rotation of an image
transform_rgb_to_grayscale

Convert RGB Image Tensor to Grayscale
vision_make_grid

A simplified version of torchvision.utils.make_grid
transform_resize

Resize the input image to the given size
kmnist_dataset

Kuzushiji-MNIST
mnist_dataset

MNIST dataset
base_loader

Base loader
magick_loader

Load an Image using ImageMagick
image_folder_dataset

Create an image folder dataset
model_alexnet

AlexNet Model Architecture
model_resnet18

ResNet-18 Model Architecture
model_vgg

VGG implementation
tiny_imagenet_dataset

Tiny ImageNet dataset