-
Notifications
You must be signed in to change notification settings - Fork 709
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
Fix efficient ad #2015
Fix efficient ad #2015
Conversation
…batch size for the imagenet dataloader, which should not be changed).
Do you see any performance increases? If so can you provide some numbers? |
Sure, here are the results for image-level AUROC, seed 42, different classes of MVTec dataset, and model sizes (S or M):
The last row shows results similar to the results from the paper. |
Looks good to me! EfficientAD M: Anomalib Patchcore WideResnet_50: |
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.
Thanks a lot for the effort, @abc-125. The changes look good to me. If @alexriedel1 also agrees, we could merge.
@alexriedel1 can you let me know what you think? Thanks
Yes go for it! anomalib/src/anomalib/models/image/efficient_ad/lightning_model.py Lines 35 to 39 in 2d59cb1
|
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.
Thanks for the fix!
Great job 😄. This also partially fixes #1813 |
@ashwinvaidya17, the tests are failing. I guess it's related to the weights? |
Ah yes, of course! |
Thank you, @ashwinvaidya17! I have updated the |
Thanks @abc-125, merging now! |
📝 Description
Several changes to fix the performance:
forward
for every submodel already. Added checkup to detect if it is added by the user.train_batch_size
should be 1, as described in the paper. It seems hard to hardcode because it is used in theAnomalibDataModule
, which has no access to the model's name, so I have just added a checkup to raise an error if the value is not 1.batch_size
fromefficient_ad.yaml
, because it was affecting only Imagenet batch size, which should always be 1 according to the paper.efficient_ad.yaml
to 1000, because if you don't have many images per class (as in MVTec AD), the model needs to run more epochs to finish 70000 steps, which are needed to reproduce results from the paper.✨ 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.