HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

Fixing the train-test resolution discrepancy

Hugo Touvron; Andrea Vedaldi; Matthijs Douze; Hervé Jégou

Fixing the train-test resolution discrepancy

Abstract

Data-augmentation is key to the training of neural networks for image classification. This paper first shows that existing augmentations induce a significant discrepancy between the typical size of the objects seen by the classifier at train and test time. We experimentally validate that, for a target test resolution, using a lower train resolution offers better classification at test time. We then propose a simple yet effective and efficient strategy to optimize the classifier performance when the train and test resolutions differ. It involves only a computationally cheap fine-tuning of the network at the test resolution. This enables training strong classifiers using small training images. For instance, we obtain 77.1% top-1 accuracy on ImageNet with a ResNet-50 trained on 128x128 images, and 79.8% with one trained on 224x224 image. In addition, if we use extra training data we get 82.5% with the ResNet-50 train with 224x224 images. Conversely, when training a ResNeXt-101 32x48d pre-trained in weakly-supervised fashion on 940 million public images at resolution 224x224 and further optimizing for test resolution 320x320, we obtain a test top-1 accuracy of 86.4% (top-5: 98.0%) (single-crop). To the best of our knowledge this is the highest ImageNet single-crop, top-1 and top-5 accuracy to date.

Code Repositories

facebookresearch/FixRes
Official
pytorch
Mentioned in GitHub
libffcv/ffcv-imagenet
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
fine-grained-image-classification-on-birdsnapFixSENet-154
Accuracy: 84.3%
fine-grained-image-classification-on-cub-200-1FixSENet-154
Accuracy: 88.7
fine-grained-image-classification-on-nabirdsFixSENet-154
Accuracy: 89.2%
fine-grained-image-classification-on-oxfordFixInceptionResNet-V2
Accuracy: 95.7%
Top-1 Error Rate: 4.3%
fine-grained-image-classification-on-oxford-1FixSENet-154
Accuracy: 94.8%
Top-1 Error Rate: 5.2%
fine-grained-image-classification-on-stanfordFixSENet-154
Accuracy: 94.4%
image-classification-on-imagenetFixResNet-50
Top 1 Accuracy: 79.1%
image-classification-on-imagenetFixResNet-50 Billion-scale@224
Number of params: 25.6M
Top 1 Accuracy: 82.5%
image-classification-on-imagenetFixResNeXt-101 32x48d
Hardware Burden: 62G
Number of params: 829M
Top 1 Accuracy: 86.4%
Top 5 Accuracy: 98.0%
image-classification-on-imagenetFixResNet-50 CutMix
Top 1 Accuracy: 79.8%
image-classification-on-imagenet-realFixResNeXt-101 32x48d
Accuracy: 89.73%
Params: 829M
image-classification-on-inaturalistFixSENet-154
Top 1 Accuracy: 75.4

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Fixing the train-test resolution discrepancy | Papers | HyperAI