model_components.preprocessing package
Submodules
model_components.preprocessing.preprocessing module
- model_components.preprocessing.preprocessing.create_image_data_generator(augmentation, custom_augmentation, preprocess_input)
Create an ImageDataGenerator for the specified augmentation type and custom augmentation function.
- Args:
augmentation (str): Type of augmentation (‘no_aug’, ‘basic’, ‘advanced’, ‘advanced_with_blur’, or ‘custom’). custom_augmentation (function, optional): Custom augmentation function. preprocess_input (function): Preprocessing function for the input images.
- Returns:
ImageDataGenerator: An ImageDataGenerator instance for the specified augmentation and preprocessing.
- model_components.preprocessing.preprocessing.variable_gaussian_blur(img, max_radius=3)
Apply Gaussian blur to an image with a random radius in the range [0, max_radius].
- Args:
img (np.array): Image to be blurred. max_radius (int, optional): Maximum blur radius. Defaults to 3.
- Returns:
np.array: Blurred image.