Implementation of ResNet in TensorFlow. Initialization from ImageNet pretrained weights is supported and this model has been successfully fine-tuned on different datasets.
##How to reproduce ImageNet results
- Download ImageNet dataset here. You will have to register in order to obtain permission.
- Point
DATA_DIR
inprepare_imagenet.py
to the data directory and run data preparation. This will generateDATA_DIR/numpy/val_data.hdf5
file.
$ python prepare_imagenet.py
- Download model weights here. These weights were converted from original Caffe models using tensorpack converter from here.
- Configure paths to data and model weights in
resnet_imagenet.py
MODEL_DEPTH=50
MODEL_PATH ='/home/kivan/datasets/pretrained/resnet/ResNet'+str(MODEL_DEPTH)+'.npy'
DATA_PATH = '/home/kivan/datasets/imagenet/ILSVRC2015/numpy/val_data.hdf5'
- Run evaluation:
$ python resnet_imagenet.py