nemo_automodel.components.models.inkling.image_processing
nemo_automodel.components.models.inkling.image_processing
Native image preprocessing for Inkling’s hierarchical vision tower.
Module Contents
Classes
Functions
Data
API
Bases: TorchvisionBackend
Convert images into Inkling’s padded spatiotemporal patch layout.
Process normalized channels-first image tensors.
Parameters:
Tensors of shape [channels, height, width].
Square patch dimensions.
Whether to multiply pixels by rescale_factor.
Pixel rescaling multiplier.
Whether to normalize channels.
Per-channel normalization means.
Per-channel normalization standard deviations.
Resize interpolation mode.
Optional multiplier for the long image edge.
Maximum long edge when upscaling.
Requested output tensor framework.
Unused common backend arguments.
Returns: BatchFeature
A batch containing pixel_values with shape
Validate model-specific image preprocessing settings.
Convert image inputs into vision-tower patches.
Parameters:
One image or a batch in a supported PIL, NumPy, or tensor layout.
Standard Transformers image preprocessing overrides.
Returns: BatchFeature
A batch containing pixel_values with shape
Bases: ImagesKwargs
Additional Inkling image preprocessing arguments.
Divide a channels-first image into possibly incomplete square patches.
Parameters:
Tensor of shape [channels, height, width].
Height and width of each patch.
Returns: list[torch.Tensor]
Tensors of shape [channels, patch_height, patch_width] in row-major order.