Jingkang50 / OpenOOD

Benchmarking Generalized Out-of-Distribution Detection
MIT License
858 stars 108 forks source link

Where to download ImageNet-200 #175

Closed Esther-PAN closed 1 year ago

Esther-PAN commented 1 year ago

Hello, I couldn't find any relevant information about the imagenet-200 dataset in paper and project. Could you please tell me where I can download that dataset? Also, could you provide more details about the specific categories included in this dataset?

zjysteven commented 1 year ago

ImageNet-200 is just a 200-category subset of ImageNet-1K. The categories are the same as those of ImageNet-R; if you have downloaded our benchmark_imglist, you could see the categories (WordNet ID) by browsing benchmark_imglist/imgnet200/train_imgnet200.txt.

In the paper, I believe we have put detailed descriptions in the appendix of v1.5 report. Recently we've also put up a documentation of the used datasets in the Wiki which might be helpful too.

Esther-PAN commented 1 year ago

Thank you for your prompt response. I'm still curious whether this project provides scripts to help me identify the corresponding classes from the already downloaded imagenet-1k dataset and generate the imagenet-200 dataset?

zjysteven commented 1 year ago

OpenOOD can return you an ImglistDataset instance of ImageNet-200 by specifying the filepath of the corresponding imglist file. See an example below.

inet200_train_dset = ImglistDataset(
    name='imagenet200',
    imglist_pth='openood_root/data/benchmark_imglist/imagenet200/train_imagenet200.txt',
    data_dir='openood_root/data/images_largescale',
    num_classes=200,
    preprocessor=ImageNet_transform # standard imagenet preprocessing,
    data_aux_preprocessor=None
) 

See https://github.com/Jingkang50/OpenOOD/blob/main/openood/datasets/imglist_dataset.py for details.

Esther-PAN commented 1 year ago

Thanks a lot