Implement default file_mover
that moves files when recategorized or relabeled that works with parent_label
as the get_y
datablock parameter.(This will not work with RegexLabeller
since the label is not the parent directory)
Implement the main widget EnhancedImageClassifierCleaner
widget which in turn is based on the fastai ImageClassifierCleaner
widget.
Usage Instructions
The images are segregated into Train and Valid datasets and are further segregated by category.
The images shown by the cleaner are ordered by the model's uncertainty. The images where the classifier is least confident about is shown first, and a total of the top 30 images (in order of least confidence) is listed (the theory being, that the images where the classifier most probably got it wrong are the ones where it was least confident about).
So after either selecting some images for deletion or changing their categories, You can click to the
Apply
button to apply the changes, or click onReset
to revert all your pending changes.When cleaning your data, make sure to check on all categories for both Train and Valid datasets, and click on the
Apply
button to finalize the changes to your dataset.
cleaner = EnhancedImageClassifierCleaner(learn)
cleaner