data_juicer.ops.mapper.image_blur_mapper module¶
- class data_juicer.ops.mapper.image_blur_mapper.ImageBlurMapper(p: float = 0.2, blur_type: str = 'gaussian', radius: float = 2, save_dir: str = None, *args, **kwargs)[source]¶
Bases:
Mapper
Mapper to blur images.
- __init__(p: float = 0.2, blur_type: str = 'gaussian', radius: float = 2, save_dir: str = None, *args, **kwargs)[source]¶
Initialization method.
- Parameters:
p – Probability of the image being blurred.
blur_type – Type of blur kernel, including [‘mean’, ‘box’, ‘gaussian’].
radius – Radius of blur kernel.
save_dir – The directory where generated image files will be stored. If not specified, outputs will be saved in the same directory as their corresponding input files. This path can alternatively be defined by setting the DJ_PRODUCED_DATA_DIR environment variable.
args – extra args
kwargs – extra args