Normalize
- class lib.infer.align.Normalize(method: Literal['none', 'clahe', 'hist', 'mean'])
Bases:
objectHandles the normalization of feed images prior to feeding the model
Methods Summary
__call__(images)Perform the selected normalization method on the batch of model input images
set_method(method)Update the normalization method with the given method
Methods Documentation
- Parameters:
method (T.Literal['none', 'clahe', 'hist', 'mean'])
- __call__(images: npt.NDArray[np.uint8]) npt.NDArray[np.uint8]
Perform the selected normalization method on the batch of model input images
- Parameters:
images (npt.NDArray[np.uint8]) – The batch of model input images to be normalized
- Return type:
The given images normalized by the chosen method, or the input batch if no method selected
- set_method(method: Literal['none', 'clahe', 'hist', 'mean'] | None) None
Update the normalization method with the given method
- Parameters:
method (Literal['none', 'clahe', 'hist', 'mean'] | None) – The normalization method to use
- Return type:
None
- __call__(images: npt.NDArray[np.uint8]) npt.NDArray[np.uint8]
Perform the selected normalization method on the batch of model input images
- Parameters:
images (npt.NDArray[np.uint8]) – The batch of model input images to be normalized
- Return type:
The given images normalized by the chosen method, or the input batch if no method selected
- set_method(method: Literal['none', 'clahe', 'hist', 'mean'] | None) None
Update the normalization method with the given method
- Parameters:
method (Literal['none', 'clahe', 'hist', 'mean'] | None) – The normalization method to use
- Return type:
None