image_transforms
Description
Transformations to images.
The images are assumed to be a torch.Tensor
of a
PIL.Image.Image
.
Use torchvision.transforms.ToTensor
to transform
PIL.Image.Image
instances appropriately.
Classes
Ensure that the given transformation is fed with a batch of inputs. |
|
Wrap a transformation operating on a batch of masks to also work on single masks. |
|
Simple class for binarizing tensors into high and low class values. |
|
Set all but the given highest number of pixels / q-th quantile in an image to zero, rest to 1. |
|
Base wrapper class to turn convolutional batch operations into single mask operations. |
|
Transformations that can be applied to images. |
|
IoU encode a single mask. |
|
Intersection encode a single mask. |
|
IoU encode a single mask. |
|
Disable |
|
Transformation that pads an image to a given ratio and then resizes it to fixed size. |
|
Generic lambda transformation that applies the given function with the standard |
|
|
Simple resize. |
Threshold tensors and set new values below and/or above the threshold. |
|
Evaluate a given image by a torch model on the correct device. |
|
Treat pixels of given mask as scores of constant-size bounding boxes, and return a mask with the non-max-suppressed bounding boxes. |
|
Squeeze or unsqueeze a tensor to obtain specified number of dimensions. |
|
Turn objects into tensors or move tensors to given device or dtype. |
|
Wrap a batch transformation with binarizing (and unsqueezing) before and after. |
Functions
|
Pad and resize an image. |
|
Pad image with constant |
|
Return the int padding for an image of size |
|
Resize the given tensor assuming it to be a 2D image or batch thereof. |