Home

Awesome

FishNet

This repo holds the implementation code of the paper:

FishNet: A Versatile Backbone for Image, Region, and Pixel Level Prediction , Shuyang Sun, Jiangmiao Pang, Jianping Shi, Shuai Yi, Wanli Ouyang, NeurIPS 2018.

FishNet was used as a key component for winning the 1st place in COCO Detection Challenge 2018.

Note that the results released here are a bit better than what we have reported in the paper.

Prerequisites

Data Augmentation

MethodSettings
Random FlipTrue
Random Crop8% ~ 100%
Aspect Ratio3/4 ~ 4/3
Random PCA Lighting0.1

Note: We apply weight decay to all weights and biases instead of just the weights of the convolution layers.

Training

To train FishNet-150 with 8 GPUs and batch size 256, simply run

python main.py --config "cfgs/fishnet150.yaml" IMAGENET_ROOT_PATH

Models

Models trained without tricks

ModelParamsFLOPsTop-1Top-5Baidu YunGoogle Cloud
FishNet9916.62M4.31G77.41%93.59%DownloadDownload
FishNet15024.96M6.45G78.14%93.95%DownloadDownload
FishNet20144.58M10.58G78.76%94.39%Available SoonAvailable Soon

Models trained with cosine lr schedule (200 epochs) and label smoothing

ModelParamsFLOPsTop-1Top-5Baidu YunGoogle Cloud
FishNet15024.96M6.45G79.35%94.75%DownloadDownload
FishNet20144.58M10.58G79.71%94.79%DownloadDownload

To load these models, e.g. FishNet150, you need to first construct your FishNet150 structure like:

from models.network_factory import fishnet150
model = fishnet150()

and then you can load the weights from the pre-trained checkpoint by:

checkpoint = torch.load(model_path)  #  model_path: your checkpoint path, e.g. checkpoints/fishnet150.tar
best_prec1 = checkpoint['best_prec1']
model.load_state_dict(checkpoint['state_dict'])
optimizer.load_state_dict(checkpoint['optimizer'])

Note that you do NOT need to decompress the model using the tar command. The model you download from the cloud could be loaded directly.

TODO:

Citation

If you find our research useful, please cite the paper:

@inproceedings{sun2018fishnet,
  title={FishNet: A Versatile Backbone for Image, Region, and Pixel Level Prediction},
  author={Sun, Shuyang and Pang, Jiangmiao and Shi, Jianping and Yi, Shuai and Ouyang, Wanli},
  booktitle={Advances in Neural Information Processing Systems},
  pages={760--770},
  year={2018}
}

Contact

You can contact Shuyang Sun by sending email to kevin.sysun@gmail.com