geowatch.tasks.depth.demo_transform module

class geowatch.tasks.depth.demo_transform.Scale(size)[source]

Bases: object

changeScale(img, size, interpolation=2)[source]
class geowatch.tasks.depth.demo_transform.CenterCrop(size)[source]

Bases: object

centerCrop(image, size)[source]
class geowatch.tasks.depth.demo_transform.ToTensor[source]

Bases: object

Convert a PIL.Image or numpy.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].

to_tensor(pic)[source]
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)

to_numpy(image)[source]
class geowatch.tasks.depth.demo_transform.Normalize(mean, std)[source]

Bases: object

normalize(tensor, mean, std)[source]
class geowatch.tasks.depth.demo_transform.Lighting(alphastd, eigval, eigvec)[source]

Bases: object