-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀Add SuperSimpleNet model #2428
base: feature/v2
Are you sure you want to change the base?
Conversation
Signed-off-by: Blaz Rolih <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: Blaz Rolih <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: Blaz Rolih <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz-r <blaz.rolih@gmail.com> Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
6acde98
to
3c65da6
Compare
This is amazing @blaz-r! Thanks a lot! I'll review it shortly |
Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
Signed-off-by: blaz.rolih <blaz.rolih@fri.uni-lj.si>
I have fixed the linter error and formated the files. The tests for SuperSimpleNet are still failing on onnx and openvino export locally. I'm not entirely sure how to fix this, but I'll take a lot when I get the time. |
Tests are failing on imgaug, somethign with numpy version incompatiblity it seems. |
@blaz-r, we will need to remove |
directly predicts the anomaly map and score. The predicted anomaly map is upscaled to match the input image size | ||
and refined with a Gaussian filter. | ||
|
||
This implementation supports both unsupervised and supervised setting, but Anomalib currently supports only unsupervised learning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the missing points in Anomalib to support supervised setting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now I believe there are no standard supervised datasets. Another problem is the Folder dataset as it assumes that abnormal samples are always in test set:
anomalib/src/anomalib/data/image/folder.py
Lines 174 to 175 in bcc0b43
samples.loc[(samples.label == DirType.NORMAL), "split"] = Split.TRAIN | |
samples.loc[(samples.label == DirType.ABNORMAL) | (samples.label == DirType.NORMAL_TEST), "split"] = Split.TEST |
Another thing for full reproduction of SuperSimpleNet results is the fixed flipping augmentation and frequency sampling. This is however not necessary, but needed for best results. It's also not SuperSimpleNet specific, so might be worth considering if other supervised model will be supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we would like to diversify the model pool, and include more learning types than one-class models. Thanks for the feedback.
@abc-125, you might want to be aware of this discussion as you have recently worked on this stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding me, it would be great to have supervised models and datasets in Anomalib. Recently, I looked at how to add a supervised dataset, and it certainly would require changing some base structures, such as paths to folders (I guess we will need abnormal_train_dir
and maybe renaming the rest to make it easier to understand, normal_train_dir
, etc.):
anomalib/src/anomalib/data/image/folder.py
Lines 195 to 202 in bcc0b43
normal_dir (str | Path | Sequence): Path to the directory containing normal images. | |
root (str | Path | None): Root folder of the dataset. | |
Defaults to ``None``. | |
abnormal_dir (str | Path | Sequence | None, optional): Path to the directory containing abnormal images. | |
Defaults to ``None``. | |
normal_test_dir (str | Path | Sequence | None, optional): Path to the directory containing | |
normal images for the test dataset. | |
Defaults to ``None``. |
Sure. SuperSimpleNet used only |
Signed-off-by: blaz-r <blaz.rolih@gmail.com>
Signed-off-by: blaz-r <blaz.rolih@gmail.com>
📝 Description
✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.