-
I want to try Anomalib with my custom data.
And the use the class Folder to create the custom datamodules and use the option to automaticaly split the normal data for train and test? Or it is convinient to put some normal images in a dedicate normal directory under test? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Hello, In both cases, you can use automatic split or put some normal images in a separate folder. |
Beta Was this translation helpful? Give feedback.
-
thansk, but if i want to separate my defects ( i have fout type) how the model can know the difference from the different effects? |
Beta Was this translation helpful? Give feedback.
-
infact, if you see in the 2022 documentation (v1 realease) in the folder class page, it is shown that every type of defetc have it own folder |
Beta Was this translation helpful? Give feedback.
-
So now, with the new realese, if i want to train a model with a custom dataset, the dataset should have a directorty tree like this:
Thansk |
Beta Was this translation helpful? Give feedback.
-
It won't. All the models available in anomalib are trained with normal images only. Anomalous images are used only for testing.
All defects in one folder for either classification or segmentation should be fine.
You can make your version of the MVTecAD class. I think you need to replace categories with
|
Beta Was this translation helpful? Give feedback.
-
ok thanks. But, this it isn't the same thing as using folder class and change the source of the abnormal_dir every time i want to perform the analysis on the different defects? In this, i using the folder class and every time i change the destination of the abnormal_dir, mainting at the same time, the mvtec like structure |
Beta Was this translation helpful? Give feedback.
-
I think it should work in your case (if you want to calculate results per type of defect). MVTecAD class calculates results for all defects together as if they are in the same folder; it just allows you to have a different folder structure. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Thanks to a community contributor, @manuelkonrad, we have merged a new |
Beta Was this translation helpful? Give feedback.
It won't. All the models available in anomalib are trained with normal images only. Anomalous images are used only for testing.
All defects in one folder for either classification or segmentation should be fine.
You can make your version of the MVTecAD class. I think you need to replace categories with
category_1
, also make sure you added your class to all__init__.py
. After this, you can initialize it like this: