-
Notifications
You must be signed in to change notification settings - Fork 51
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
efficient ad #1128
efficient ad #1128
Conversation
Hi Samuel, several comments:
|
@Idan-BenAmi should be good for review |
# * Uninfied version of model combining the three subversions | ||
# ============================================================================== | ||
""" | ||
Yolov8n Object Detection Model - PyTorch implementation |
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.
typo
sample, target = super().__getitem__(index) | ||
return sample, target, path | ||
|
||
def InfiniteDataloader(loader): |
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.
rename to snack case: infinite_dataloader
sample, _ = super().__getitem__(index) | ||
return sample | ||
|
||
class ImageFolderWithPath(datasets.ImageFolder): |
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.
we already have a similar function, maybe can be reused..
"""Apply transformations to the training images.""" | ||
return DEFAULT_TRANSFORM(image), DEFAULT_TRANSFORM(TRANSFORM_AE(image)) | ||
|
||
def benchmark(unified_model, name): |
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.
I wonder if this code more isn't more suitable for "metric evaluation" folder.
"\n", | ||
"Anomaly detection models are useful as they only require your typical images to train and can in theory determin anything that is not typical.\n", | ||
"\n", | ||
"We use Efficient ad, one of the top performing anomaly detection models on the mvtec benchmark. benchmark leader board can be found [here](https://paperswithcode.com/sota/anomaly-detection-on-mvtec-ad)\n", |
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.
We use Efficient ad --> add link
on the mvtec benchmark --> add link (if available)
"id": "tGqXJH15oLvm" | ||
}, | ||
"source": [ | ||
"Download and extract the mvtec benchmark dataset. This is used for both training and evaluation. Link below is a direct linkk from the mcvtec website." |
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.
direct linkk -- >direct link
from the mcvtec website -- >add link
|
||
This code contains a PyTorch implementation of efficient ad model, following | ||
https://github.com/nelson1425/EfficientAD. This implementation includes a unified version of the model that combines the three submodels | ||
into one to ease the process of quantisation and deployment. |
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.
quantisation --> quantization
"source": [ | ||
"Classification models are powerful and reliable, but what if you have little or no examples of one of your classes, what if one of your classes contains too much unpredictable variation?\n", | ||
"\n", | ||
"Here we go through the process of building, training and quantising an anomaly detection model designed to solve exactly these problems.\n", |
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.
quantising --> quantizing
"id": "_fPTNtJLgPc5" | ||
}, | ||
"source": [ | ||
"## Quantised model benchmark\n" |
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.
Quantised --> Quantized
"source": [ | ||
"## Conclusion\n", | ||
"\n", | ||
"In this notebook we provide examples on how to quantise and benchmark the latest anomaly detection model as well as providing code to visulize the models output." |
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.
quantise --> quantize
Pull Request Description:
Addition of anomaly detection model
Checklist before requesting a review: