NEW
All annotation is now free in Hasty.

Blur

This data augmentation feature allows you to blur your images with certain probabilities. The intensity of the blur can also be adjusted by adjusting the "Blur Limit"

Parameters

Blur Limit

The blur limit sets the range of kernel used in the convolution process to blur the image.

The blur effect is more pronounced with large kernel.

Blur with kernel size=5
Blur with kernel size =11

Probability

This sets the probability of the images being blurred. With large probability, the expected number of blurred images goes high. With probability 1, all images are blurred.

Code Implementation

import albumentations as albu
from PIL import Image
import numpy as np

transform =albu.Blur(blur_limit=3, p=0.5)

image = np.array(Image.open('/some/image/file/path'))
image = transform(image=image)['image']

# Now the image is blurred and ready to be accepted by the model

Further Resources

Last updated on Jun 01, 2022

Removing the risk from vision AI.

Only 13% of vision AI projects make it to production, with Hasty we boost that number to 100%.