geowatch.tasks.depth.demo_transform module¶
- class geowatch.tasks.depth.demo_transform.ToTensor[source]¶
Bases:
object
Convert a
PIL.Image
ornumpy.ndarray
to tensor. Converts a PIL.Image or numpy.ndarray (H x W x C) in the range [0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0].
- class geowatch.tasks.depth.demo_transform.ToNumpy[source]¶
Bases:
object
Converts a torch.FloatTensor of shape (C x H x W) to a numpy.ndarray (H x W x C)