❓How to train/test EfficientAD without abnormal images #1617
Replies: 4 comments 4 replies
-
Hi @Akihiko0123, glad that you like the library! Can you share your config file or python code to run the model? Abnormal directory is used to run the validation and test to get performance metrics. They are not needed during training. |
Beta Was this translation helpful? Give feedback.
-
Hi @samet-akcay, I understand that Abnormal directory is used to run the validation and test to get performance metrics. My config file is as follows.
Thank you again. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I see that you are setting the validation set in your config. test_split_mode: none # options: [from_dir, synthetic]
test_split_ratio: 0.2 # fraction of train images held out testing (usage depends on test_split_mode)
val_split_mode: same_as_test # options: [same_as_test, from_test, synthetic]
val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode) It is If you set Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
yes, you are right, please ignore my previous reply. You could try something like this: dataset:
name: original
format: folder
root: ../test_codes_anogan/
normal_dir: train_sample
abnormal_dir: null
normal_test_dir: null
mask_dir: null
extensions: null
task: classification
train_batch_size: 32
eval_batch_size: 32
num_workers: 8
image_size: 256 # dimensions to which images are resized (mandatory)
center_crop: null # dimensions to which images are center-cropped after resizing (optional)
normalization: imagenet # data distribution to which the images will be normalized: [none, imagenet]
transform_config:
train: null
eval: null
test_split_mode: from_dir # options: [from_dir, synthetic]
test_split_ratio: 0.2 # fraction of train images held out testing (usage depends on test_split_mode)
val_split_mode: same_as_test # options: [same_as_test, from_test, synthetic]
val_split_ratio: 0.5 # fraction of train/test images held out for validation (usage depends on val_split_mode) Since you don't have anomalous images you will probably see 0% performance at the end of the training. However, when you add some anomalous images to test the model, you should get some predictions. They may not be with the highest accuracy, but should give you an idea. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for sharing this great deep learning library for the anomaly detection.
I am trying to use EfficientAD with my original dataset, but I have some trouble to use it.
I thought EfficientAD is an unsupervised learning model and the input data of this model is normal images not abnormal images.
However, when I use my own dataset without writing
abnormal_dir
on theconfig.yaml
, I received the following error.As for unsupervised learning models, I thought abnormal_dir which probably contain abnormal images is not necessary.
I would appreciate it if you could let me know on the followings.
Could you tell me if the input data of EfficientAD is just the normal images not abnormal images.
Since the default "task" in the config.yaml of EfficientAD is
segmentation
, is not the output of EfficientAD the anomaly score of each patch image?Are mask images necessary as the input data for the segmentation task of EfficientAD?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions