Shortcuts

ToImage

class torchvision.transforms.v2.ToImage[source]

Convert a tensor, ndarray, or PIL Image to Image ; this does not scale values.

This transform does not support torchscript.

Examples using ToImage:

Transforms v2: End-to-end object detection/segmentation example

Transforms v2: End-to-end object detection/segmentation example
transform(inpt: Union[Tensor, Image, ndarray], params: Dict[str, Any]) Image[source]

Method to override for custom transforms.

See How to write your own v2 transforms

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources