This fiftyone plugin allows to generate image corruptions based on
Benchmarking Neural Network Robustness to Common Corruptions and Surface Variations. paper for your fiftyone
image dataset graphically.
Check how to install FiftyOne here.
These image_corruptions allow you to measure the robustness of your model to 15 common corruptions. The corruptions fall under 4 categories - noise (Gaussian, shot, impulse), blur (defocus, glass, motion, zoom), weather (snow, frost, fog, brightness), and digital (contrast, elastic, pixelate, JPEG).
Here's an example of brightness corruption at different severities.
If those random augmentations similar to those 15 corruptions were used during training, then 4 additional corruptions - speckle noise, Gaussian blur, spatter, saturate - are provided to measure robustness.
From you commandline simply run:
fiftyone plugin download https://github.com/hemangchawla/image_corruptions
Install dependencies:
pip install imagecorruptions numpy numba opencv-python scikit-image
or
cd /path/to/fiftyone/plugins
cd @hemangchawla/image_corruptions
pip install -r /path/to/requirements.txt
To get started, launch the FiftyOne App and load in your dataset. If you don't have a dataset yet, you can use the dataset zoo to load in a sample dataset.
Note: To load the quickstart
dataset from the zoo, press the backtick key (`
) to open the operators list, and select load_zoo_dataset
from the list. Then, select quickstart
from the dropdown and press Enter
.
Using the plugin is simple.
- Press
`
or click theBrowse operations
icon above the grid. - Select whether you want common or validation corruptions.
- Then toggle if you want to apply all or some specific corruptions. We recommend testing against at least one for each category.
- Then use the slider to select the severity level of your corruptions, or toggle to select all severities.
- Finally choose if you want to delegate generation of corruptions or do so immediately and
Execute
!
- Option to parallize geenration of samples