This repo explains how to download & process ImageNet-1K train/val dataset for using as a dataset
- Download ImageNet-1K train/val dataset from academic torrents : train link, val link
- Check-out my velog post for download on linux server : link
- Check-out more informations on original ImageNet website : link
- ImageNet-1K train dataset zip contains zips like below
βββ ILSVRC2012_img_train.tar
βββ n01440764.tar
βββ n01443537.tar
βββ n01484850.tar
βββ ...
βββ n15075141.tar- ImageNet-1K val dataset zip contains images like below
βββ ILSVRC2012_img_val.tar
βββ ILSVRV2012_val_00000001.JPEG
βββ ILSVRV2012_val_00000002.JPEG
βββ ILSVRV2012_val_00000003.JPEG
βββ ...
βββ ILSVRV2012_val_00050000.JPEGImageNet_class_index.json: include class infos- Caution : same label with different class num exists
- crane : 134, 517
- maillot : 638, 639
- Caution : same label with different class num exists
ImageNet_val_label.txt: include validation image labelcheck.py: check if unpacked right or notunpack.py: make clean file trees ofILSVRC2012_img_train.tar,ILSVRC2012_img_val.tarfor using as a dataset
- Assume all the required files are in same directory like below (base_dir)
βββ base_dir
βββ ILSVRC2012_img_train.tar
βββ ILSVRC2012_img_val.tar
βββ ImageNet_class_index.json
βββ ImageNet_val_label.txt- From
unpack.py, changebase_dirandtarget_dirvariables
- Run
unpack.pyand it makes file trees in specific directory like below (target_dir)
βββ target_dir
βββ train
β βββ 0
β β βββ n01440764_18.JPEG
β β βββ n01440764_36.JPEG
β β βββ ...
β βββ 1
β βββ ...
β βββ 999
βββ val
βββ 0
β βββ ILSVRC2012_val_00000293.JPEG
β βββ ILSVRC2012_val_00002138.JPEG
β βββ ...
βββ 1
βββ ...
βββ 999- From
check.py, changeImageNet_dirvariable and run for double-check
