Skip to content

Repository files navigation

Dual Path Networks

This repository contains the code and trained models of:

Yunpeng Chen, Jianan Li, Huaxin Xiao, Xiaojie Jin, Shuicheng Yan, Jiashi Feng. "Dual Path Networks" (NIPS17).

example

  • DPNs helped us won the 1st place in Object Localization Task in ILSVRC 2017, with all competition tasks within Top 3. (Team: NUS-Qihoo_DPNs)

Implementation

DPNs are implemented by MXNet @92053bd.

Augmentation

MethodSettings
Random MirrorTrue
Random Crop8% - 100%
Aspect Ratio3/4 - 4/3
Random HSL[20,40,50]

Note: We did not use PCA Lighting and any other advanced augmentation methods. Input images are resized by bicubic interpolation.

Normalization

The augmented input images are substrated by mean RGB = [ 124, 117, 104 ], and then multiplied by 0.0167.

Mean-Max Pooling

Here, we introduce a new testing technique by using Mean-Max Pooling which can further improve the performance of a well trained CNN in the testing phase without the need of any training/fine-tuining process. This testing technique is designed for the case when the testing images is larger than training crops. The idea is to first convert a trained CNN model into a convolutional network and then insert the following Mean-Max Pooling layer (a.k.a. Max-Avg Pooling), i.e. 0.5 * (global average pooling + global max pooling), just before the final softmax layer.

Based on our observations, Mean-Max Pooling consistently boost the testing accuracy. We adopted this testing strategy in both LSVRC16 and LSVRC17.

Results

ImageNet-1k

Single Model, Single Crop Validation Error:

ModelSizeGFLOPs224x224320x320320x320
( with mean-max pooling )
Top 1Top 5Top 1Top 5Top 1Top 5
DPN-6849 MB2.523.576.9322.155.9021.515.52
DPN-92145 MB6.520.735.3719.344.6619.044.53
DPN-98236 MB11.720.155.1518.944.4418.724.40
DPN-131304 MB16.019.935.1218.624.2318.554.16

ImageNet-1k (Pretrained on ImageNet-5k)

Single Model, Single Crop Validation Error:

ModelSizeGFLOPs224x224320x320320x320
( with mean-max pooling )
Top 1Top 5Top 1Top 5Top 1Top 5
DPN-6849 MB2.522.456.0920.925.2620.625.07
DPN-92145 MB6.519.985.0619.004.3718.794.19
DPN-107333 MB18.319.754.9418.344.1918.154.03

Note: DPN-107 is not well trained.

ImageNet-5k

Single Model, Single Crop Validation Accuracy:

ModelSizeGFLOPs224x224320x320320x320
( with mean-max pooling )
Top 1Top 5Top 1Top 5Top 1Top 5
DPN-6861 MB2.561.2785.4661.5485.9962.3586.20
DPN-92184 MB6.567.3189.4966.8489.3867.4289.76

Note: The higher model complexity comes from the final classifier. Models trained on ImageNet-5k learn much richer feature representation than models trained on ImageNet-1k.

Efficiency (Training)

The training speed is tested based on MXNet @92053bd.

Multiple Nodes (Without specific code optimization):

ModelCUDA
/cuDNN
#NodeGPU Card
(per node)
Batch Size
(per GPU)
kvstoreGPU Mem
(per GPU)
Training Speed*
(per node)
DPN-688.0 / 5.1104 x K80 (Tesla)64dist_sync9337 MiB284 img/sec
DPN-928.0 / 5.1104 x K80 (Tesla)32dist_sync8017 MiB133 img/sec
DPN-988.0 / 5.1104 x K80 (Tesla)32dist_sync11128 MiB85 img/sec
DPN-1318.0 / 5.1104 x K80 (Tesla)24dist_sync11448 MiB60 img/sec
DPN-1078.0 / 5.1104 x K80 (Tesla)24dist_sync12086 MiB55 img/sec

*This is the actual training speed, which includes data augmentation, forward, backward, parameter update, network communication, etc. MXNet is awesome, we observed a linear speedup as has been shown in link

Trained Models

ModelSizeDatasetMXNet Model
DPN-6849 MBImageNet-1kGoogleDrive
DPN-68*49 MBImageNet-1kGoogleDrive
DPN-6861 MBImageNet-5kGoogleDrive
DPN-92145 MBImageNet-1kGoogleDrive
DPN-92138 MBPlaces365-StandardGoogleDrive
DPN-92*145 MBImageNet-1kGoogleDrive
DPN-92184 MBImageNet-5kGoogleDrive
DPN-98236 MBImageNet-1kGoogleDrive
DPN-131304 MBImageNet-1kGoogleDrive
DPN-107*333 MBImageNet-1kGoogleDrive

*Pretrained on ImageNet-5k and then fine-tuned on ImageNet-1k.

Third-party Implementations

Other Resources

ImageNet-1k Trainig/Validation List:

ImageNet-1k category name mapping table:

ImageNet-5k Raw Images:

  • The ImageNet-5k is a subset of ImageNet10K provided by this paper.
  • Please download the ImageNet10K and then extract the ImageNet-5k by the list below.

ImageNet-5k Trainig/Validation List:

  • It contains about 5k leaf categories from ImageNet10K. There is no category overlapping between our provided ImageNet-5k and the official ImageNet-1k.
  • Download link: [GoogleDrive: https://goo.gl/kNZC4j]
  • Download link: GoogleDrive
  • Mapping Table: GoogleDrive

Places365-Standard Validation List & Matlab code for 10 crops testing:

Citation

If you use DPN in your research, please cite the paper:

@article{Chen2017,
title={Dual Path Networks},
author={Yunpeng Chen, Jianan Li, Huaxin Xiao, Xiaojie Jin, Shuicheng Yan, Jiashi Feng},
journal={arXiv preprint arXiv:1707.01629},
year={2017}
}

About

Dual Path Networks

Resources

Stars

526 stars

Watchers

30 watching

Forks

Releases

Packages

Used by

Contributors

Languages