nelson1425 / EfficientAD

Unofficial implementation of EfficientAD https://arxiv.org/abs/2303.14535
https://arxiv.org/abs/2303.14535
Apache License 2.0
273 stars 72 forks source link

IndexError: list index out of range #38

Open noivan0 opened 6 months ago

noivan0 commented 6 months ago

I use custom dataset.

(torch1) D:\code\git-DS\EfficientAD>python mvtec_ad_evaluation/evaluate_experiment.py --dataset_base_dir "\DS-NAS\ds\oilhole(crank)" --anomaly_maps_dir './output/1/anomaly_maps/oilhole(crank)/' --output_dir './output/1/metrics/oilhole(crank)/' --evaluated_objects type_i === Evaluate type_i === Parsed 0 ground truth image files. Read ground truth files and corresponding predictions... 0it [00:00, ?it/s] Compute PRO curve... Traceback (most recent call last): File "D:\code\git-DS\EfficientAD\mvtec_ad_evaluation\evaluate_experiment.py", line 247, in main() File "D:\code\git-DS\EfficientAD\mvtec_ad_evaluation\evaluate_experiment.py", line 215, in main calculate_au_pro_au_roc( File "D:\code\git-DS\EfficientAD\mvtec_ad_evaluation\evaluate_experiment.py", line 157, in calculate_au_pro_au_roc pro_curve = compute_pro( File "D:\code\git-DS\EfficientAD\mvtec_ad_evaluation\pro_curve_util.py", line 37, in compute_pro anomaly_maps[0].shape[0], IndexError: list index out of range

I've encounted this issue.

I made it all the way to train and got a final image AUC: 98.3421. The tiff files are stored in the anomaly_maps folder, but I don't know if I'm having trouble reading them or why.