Glossary: Computer Vision Basics
ToImage / ToDtype
Also written: ToImage, ToDtype, v2.ToImage, v2.ToDtype
Two torchvision transforms that convert a photo into a model-ready tensor. `ToImage` makes a uint8 (C, H, W) tensor, and `ToDtype(torch.float32, scale=True)` converts it to floats from 0 to 1; without `scale=True` you get floats from 0 to 255.