ToImage¶
- class torchvision.transforms.v2.ToImage[source]¶
[BETA] Convert a tensor, ndarray, or PIL Image to
Image
; this does not scale values.Note
The ToImage transform is in Beta stage, and while we do not expect disruptive breaking changes, some APIs may slightly change according to user feedback. Please submit any feedback you may have in this issue: https://github.com/pytorch/vision/issues/6753.
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