Posted by tianchen on November 8, 2019

Copied from FaceBookArchive

Download the ImageNet dataset

The ImageNet Large Scale Visual Recognition Challenge (ILSVRC) dataset has 1000 categories and 1.2 million images. The images do not need to be preprocessed or packaged in any database, but the validation images need to be moved into appropriate subfolders.

  1. Download the images from http://image-net.org/download-images

  2. Extract the training data:
      mkdir train && mv ILSVRC2012_img_train.tar train/ && cd train
      tar -xvf ILSVRC2012_img_train.tar && rm -f ILSVRC2012_img_train.tar
      find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done
      cd ..
  3. Extract the validation data and move images to subfolders:
      mkdir val && mv ILSVRC2012_img_val.tar val/ && cd val && tar -xvf ILSVRC2012_img_val.tar
      wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash

Download Torch ResNet

git clone https://github.com/facebook/fb.resnet.torch.git
cd fb.resnet.torch