Jingkang50 / OpenOOD

Benchmarking Generalized Out-of-Distribution Detection
MIT License
831 stars 106 forks source link

Does the dataset have to be placed in ./data/images_largescale? #209

Closed Haifeng3 closed 7 months ago

Haifeng3 commented 9 months ago

Hi! I have a question. Does the dataset have to be placed in ./data/images_largescale?

zjysteven commented 9 months ago

Yes, our pipeline assumes that datasets are placed under either ./data/images_largescale or ./data/images_classic. You can look at the config for each dataset to see specifically its supposed location (e.g., the data_dir field in configs/datasets/imagenet.yml specifies that its location should be ./data/images_largescale/).

Haifeng3 commented 9 months ago

Thank you for your reply. However, I really hope to be able to customize the location of the dataset, which would be very convenient.

zjysteven commented 9 months ago

I think that customization is achievable if you just change the location specified in the config file to your desired one. Or consider using symbolic link.

Haifeng3 commented 9 months ago

Another question is, when I run ./scripts/basics/cifar100/train_cifar100.sh, it raises an error saying 'srun not found.' This may be related to the installation of Slurm, but I am currently only training on my local machine. Is it possible to avoid using srun-related commands?

zjysteven commented 9 months ago

Of course. Just remove the slurm part and only run the remaining bash script :)

Haifeng3 commented 9 months ago

Following your advice, I customized the dataset path for CIFAR-100 and made the necessary changes in the 'data_dir' in ./config/datasets/cifar100/cifar100.yml. However, it's now raising an error sayingFile "./data/benchmark_imglist/cifar100/train_cifar100.txt"does not exist. How can I generate or obtain this file?

zjysteven commented 9 months ago

It can be downloaded from google drive. You can either use our download script or download it yourself with the gdrive id 1XKzBdWCqg3vPoj-D32YixJyJJ0hL63gP (it is encoded in the download script too). This is also instructed in our README.

Haifeng3 commented 9 months ago

Thank you so much for your response and helpful solution!