cqylunlun / GLASS

[ECCV 2024] Official Implementation and Dataset Release for <A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization>
MIT License
147 stars 19 forks source link

Impossible to train custom datasets... #19

Closed cory619-seungwon closed 4 weeks ago

cory619-seungwon commented 1 month ago

I input command below in terminator.

python main.py dataset semicon /Users/seunglee/Desktop/OS/Deep_learning/glass/dataset /Users/seunglee/Desktop/OS/Deep_learning/glass/dataset/aug_folder -d train

However, error sentence pop up as below...

Usage: main.py dataset [OPTIONS] NAME DATA_PATH AUG_PATH Try 'main.py dataset --help' for help.

Error: Missing option '--subdatasets' / '-d'

Did I something wrong? Thanks in advance!

cqylunlun commented 1 month ago

Due to the large number of parameters, we use a shell script to execute main.py. If you want to run main.py directly, please configure it with the following command:

python main.py --gpu 0 --seed 0 --test ckpt net -b wideresnet50 -le layer2 -le layer3 \
--pretrain_embed_dimension 1536 --target_embed_dimension 1536 --patchsize 3 \
--meta_epochs 640 --eval_epochs 1 --dsc_layers 2 --dsc_hidden 1024 --pre_proj 1 \
--mining 1 --noise 0.015 --radius 0.75 --p 0.5 --step 20 --limit 392 dataset \
--distribution 0 --mean 0.5 --std 0.1 --fg 1 --rand_aug 1 --batch_size 8 \
--resize 288 --imagesize 288 -d carpet mvtec /root/dataset/MVTec /root/dataset/dtd/images

Please note that -d is used to specify the category name, and mvtec indicates that the custom dataset conforms to the MVTec AD structure. You also need to reconfigure the last two paths. Additionally, you may refer to some potential issues with the custom dataset mentioned in issue #8.