Wraps a pixel image tensor (C, H, W) or (B, C, H, W).
A lightweight typed marker so multi-target transforms can dispatch
on isinstance and route a pixel image differently from a
segmentation Mask, a BoundingBoxes target, or a
Keypoints target. Single-image pipelines need not wrap —
a bare lucid.Tensor is also treated as an image.
Parameters
dataTensorPixel image with shape
(C, H, W) or (B, C, H, W).
Photometric transforms operate on data in place of
per-channel statistics; geometric transforms resample with the
configured interpolation mode.Examples
The wrapper that says a tensor is a picture, so a transform knows to
resample it rather than to treat it as labels:
>>> import lucid, lucid.utils.transforms as T
>>> holder = T.Image(lucid.rand(3, 32, 32))
>>> tuple(T.Resize(16, 16)(holder).data.shape)
(3, 16, 16)Used by 3
Constructors
1Initialise the module and validate the supplied config.
Parameters
configModelConfigMust be an instance of the subclass's declared
config_class.Raises
TypeErrorIf
config_class has not been set on the concrete subclass,
or if config is not an instance of config_class.