← Open Source
szq0214

MEAL-V2

MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tricks. In NeurIPS 2020 workshop.

ModelsVision modelsPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
699
Stars
70
Forks
+0
This week
1
Contributors
Created 2020-08-25 · Updated 2026-10-06 · #14847 today
Top developers

szq0214/MEAL-V2 is ranked 14,847 with 699 stars.

Same-category comparison

szq0214/MEAL-V2 is ranked 14,847 among these 8 peers; facebookresearch/nwm is ranked 14,852.

Same-category comparison
NameRankMetrics
imperial-qore/TranAD14,769
Language:
Python
Stars:
705
Forks:
196
Description:
[VLDB'22] Anomaly Detection using Transformers, self-conditioning and adversarial training.
microsoft/ClimaX14,781
Language:
Python
Stars:
704
Forks:
113
Description:
Foundation model for weather & climate.
deepglint/unicom14,786
Language:
Python
Stars:
703
Forks:
34
Description:
Large-Scale Visual Representation Model.
Julie-tang00/Point-BERT14,826
Language:
Python
Stars:
700
Forks:
73
Description:
[CVPR 2022] Pre-Training 3D Point Cloud Transformers with Masked Point Modeling.
facebookresearch/nwm14,852
Language:
Python
Stars:
698
Forks:
74
Description:
Official code for the CVPR 2025 paper "Navigation World Models".
instantX-research/Regional-Prompting-FLUX14,855
Language:
Python
Stars:
698
Forks:
31
Description:
Training-free Regional Prompting for Diffusion Transformers 🔥.
huyvnphan/PyTorch_CIFAR1014,865
Language:
Python
Stars:
697
Forks:
161
Description:
Pretrained TorchVision models on CIFAR10 dataset (with weights).
MeiGen-AI/OPSD-V14,880
Language:
Python
Stars:
695
Forks:
46
Description:
On-Policy Self-Distillation for Post-Training Few-Step Autoregressive Video Generators.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModels
SubcategoryVision models
Stars699
Forks70
Contributors1
Created date2020-08-25
Updated date2026-10-06
Stars in 1 day0
Stars in 7 days0
Rank14,847
Previous rank14,688
Rank change-159
7-day stars rank14,681
Previous 7-day stars rank14,694
7-day stars rank change13
Total stars rank14,911
Previous total stars rank14,883
Total stars rank change-28
CountryUSA
README summary

MEAL-V2 This is the official pytorch implementation of our paper: "MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tricks" by Zhiqiang Shen and Marios Savvides from Carnegie Mellon University. In this paper, we introduce a simple yet effective approach that can boost the vanilla ResNet-50 to 80%+ Top-1 accuracy on ImageNet without any tricks. Generally, our method is based on the recently proposed MEAL, i. , ensemble knowledge distillation via discriminators. We

further simplify it through 1) adopting the similarity loss and discriminator only on the final outputs and 2) using the average of softmax probabilities from all teacher ensembles as the stronger supervision for distillation. One crucial perspective of our method is that the one-hot/hard label should not be used in the distillation process. We show that such a simple framework can achieve state-of-the-art results without involving any commonly-used tricks, such as 1) architecture modification

; 2) outside training data beyond ImageNet; 3) autoaug/randaug; 4) cosine learning rate; 5) mixup/cutmix training; 6) label smoothing; etc. Citation If you find our code is helpful for your research, please cite: News **[Dec. 5, 2021]** **New:** Add FKD training support. We highly recommend to use FKD for training MEAL V2 models, which will be 2~4x faster with similar accuracy. run with the desired model architecture, the path to the ImageNet dataset and the path to the

soft label, for example: Add if you would like to train with cosine learning rate. **New:** Basically, adding back tricks (cosine *lr*, etc. 19, 2021]** Long version of MEAL V2 is available on: arXiv or paper. 16, 2020]** MEAL V2 is now available in PyTorch Hub. 3, 2020]** Short version of MEAL V2 has been accepted in NeurIPS 2020 Beyond BackPropagation: Novel Ideas for Training Neural Architectures workshop. Requirements: This repo is tested with: Python 3. 1 (pip install timm

) But it should be runnable with other PyTorch versions. 01** | GitHub | | MEAL-V2 w/ ResNet18 | 224 | 11. 6M) | | MEAL-V2 + CutMix w/ ResNet50| 224 | 25. 6M) | | MEAL-V2 w/ MobileNet V3-Small 0. 3M) | | MEAL-V2 w/ MobileNet V3-Small 1. 3M) | | MEAL-V2 w/ MobileNet V3-Large 1. 1M) | | MEAL-V2 w/ EfficientNet-B0| 224 | 5. Training: To train a model, run script/train. We also notice that more training epochs can slightly improve the performance. * To resume training

a model, run script/resume_train. sh with the desired model architecture, starting number of training epoch and the path to the ImageNet dataset: 2. Testing: To test a model, run inference. Contact Zhiqiang Shen, CMU (zhiqians at andrew. edu) Any comments or suggestions are welcome!

Frequently asked questions

How many stars and forks are recorded?

szq0214/MEAL-V2 has 699 stars and 70 forks.

What is the repository rank?

szq0214/MEAL-V2 is ranked 14,847.

What language and category are recorded?

szq0214/MEAL-V2 has 699 stars, uses Python and belongs to Models.

Which repository is closest in rank?

szq0214/MEAL-V2 is compared with facebookresearch/nwm, ranked 14,852 with 698 stars.

README

MEAL-V2

This is the official pytorch implementation of our paper: "MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tricks" by Zhiqiang Shen and Marios Savvides from Carnegie Mellon University.

In this paper, we introduce a simple yet effective approach that can boost the vanilla ResNet-50 to 80%+ Top-1 accuracy on ImageNet without any tricks. Generally, our method is based on the recently proposed MEAL, i.e., ensemble knowledge distillation via discriminators. We further simplify it through 1) adopting the similarity loss and discriminator only on the final outputs and 2) using the average of softmax probabilities from all teacher ensembles as the stronger supervision for distillation. One crucial perspective of our method is that the one-hot/hard label should not be used in the distillation process. We show that such a simple framework can achieve state-of-the-art results without involving any commonly-used tricks, such as 1) architecture modification; 2) outside training data beyond ImageNet; 3) autoaug/randaug; 4) cosine learning rate; 5) mixup/cutmix training; 6) label smoothing; etc.

Citation

If you find our code is helpful for your research, please cite:

@article{shen2020mealv2,
  title={MEAL V2: Boosting Vanilla ResNet-50 to 80%+ Top-1 Accuracy on ImageNet without Tricks},
  author={Shen, Zhiqiang and Savvides, Marios},
  journal={arXiv preprint arXiv:2009.08453},
  year={2020}
}

News

[Dec. 5, 2021] New: Add FKD training support. We highly recommend to use FKD for training MEAL V2 models, which will be 2~4x faster with similar accuracy.

  • Download our soft label for MEAL V2.

  • run FKD_train.py with the desired model architecture, the path to the ImageNet dataset and the path to the soft label, for example:

    # 224 x 224 ResNet-50
    python FKD_train.py --save MEAL_V2_resnet50_224 \
    --batch-size 512 -j 48 \
    --model resnet50 --epochs 200 \
    --teacher-model gluon_senet154,gluon_resnet152_v1s \
    --imagenet [imagenet-folder with train and val folders] \
    --num_crops 8 --soft_label_type marginal_smoothing_k5 \
    --softlabel_path [path of soft label] \
    --schedule 100 180 --use-discriminator-loss
    

Add --cos if you would like to train with cosine learning rate.

New: Basically, adding back tricks (cosine lr, etc.) into MEAL V2 can consistently improve the accuracy:

New: Add CutMix training support, use --w-cutmix to enable it.

[Mar. 19, 2021] Long version of MEAL V2 is available on: arXiv or paper.

[Dec. 16, 2020] MEAL V2 is now available in PyTorch Hub.

[Nov. 3, 2020] Short version of MEAL V2 has been accepted in NeurIPS 2020 Beyond BackPropagation: Novel Ideas for Training Neural Architectures workshop. Long version is coming soon.

Preparation

1. Requirements:

This repo is tested with:

  • Python 3.6

  • CUDA 10.2

  • PyTorch 1.6.0

  • torchvision 0.7.0

  • timm 0.2.1 (pip install timm)

But it should be runnable with other PyTorch versions.

2. Data:

Results & Models

We provide pre-trained models with different trainings, we report in the table training/validation resolution, #parameters, Top-1 and Top-5 accuracy on ImageNet validation set:

Models Resolution #Parameters Top-1/Top-5 Trained models
MEAL-V1 w/ ResNet50 224 25.6M 78.21/94.01 GitHub
MEAL-V2 w/ ResNet18 224 11.7M 73.19/90.82 Download (46.8M)
MEAL-V2 w/ ResNet50 224 25.6M 80.67/95.09 Download (102.6M)
MEAL-V2 w/ ResNet50 380 25.6M 81.72/95.81 Download (102.6M)
MEAL-V2 + CutMix w/ ResNet50 224 25.6M 80.98/95.35 Download (102.6M)
MEAL-V2 w/ MobileNet V3-Small 0.75 224 2.04M 67.60/87.23 Download (8.3M)
MEAL-V2 w/ MobileNet V3-Small 1.0 224 2.54M 69.65/88.71 Download (10.3M)
MEAL-V2 w/ MobileNet V3-Large 1.0 224 5.48M 76.92/93.32 Download (22.1M)
MEAL-V2 w/ EfficientNet-B0 224 5.29M 78.29/93.95 Download (21.5M)

Training & Testing

1. Training:

  • To train a model, run script/train.sh with the desired model architecture and the path to the ImageNet dataset, for example:

    # 224 x 224 ResNet-50
    python train.py --save MEAL_V2_resnet50_224 --batch-size 512 -j 48 --model resnet50 --epochs 180 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] 
    
    # 224 x 224 ResNet-50 w/ CutMix
    python train.py --save MEAL_V2_resnet50_224 --batch-size 512 -j 48 --model resnet50 --epochs 180 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] --w-cutmix
    
    # 380 x 380 ResNet-50
    python train.py --save MEAL_V2_resnet50_380 --batch-size 512 -j 48 --model resnet50 --image-size 380 --teacher-model tf_efficientnet_b4_ns,tf_efficientnet_b4 --imagenet [imagenet-folder with train and val folders]
    
    # 224 x 224 MobileNet V3-Small 0.75
    python train.py --save MEAL_V2_mobilenetv3_small_075 --batch-size 512 -j 48 --model tf_mobilenetv3_small_075 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] 
    
    # 224 x 224 MobileNet V3-Small 1.0
    python train.py --save MEAL_V2_mobilenetv3_small_100 --batch-size 512 -j 48 --model tf_mobilenetv3_small_100 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] 
    
    # 224 x 224 MobileNet V3-Large 1.0
    python train.py --save MEAL_V2_mobilenetv3_large_100 --batch-size 512 -j 48 --model tf_mobilenetv3_large_100 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] 
    
    # 224 x 224 EfficientNet-B0
    python train.py --save MEAL_V2_efficientnet_b0 --batch-size 512 -j 48 --model tf_efficientnet_b0 --teacher-model gluon_senet154,gluon_resnet152_v1s --imagenet [imagenet-folder with train and val folders] 
    

Please reduce the --batch-size if you get ''out of memory'' error. We also notice that more training epochs can slightly improve the performance.

  • To resume training a model, run script/resume_train.sh with the desired model architecture, starting number of training epoch and the path to the ImageNet dataset:

    sh script/resume_train.sh 
    

2. Testing:

  • To test a model, run inference.py with the desired model architecture, model path, resolution and the path to the ImageNet dataset:

    CUDA_VISIBLE_DEVICES=0,1,2,3 python inference.py -a resnet50 --res 224 --resume MODEL_PATH -e [imagenet-folder with train and val folders]
    

change --res with other image resolution [224/380] and -a with other model architecture [tf_mobilenetv3_small_100; tf_mobilenetv3_large_100; tf_efficientnet_b0] to test other trained models.

Contact

Zhiqiang Shen, CMU (zhiqians at andrew.cmu.edu)

Any comments or suggestions are welcome!

Nearby in the ranking
Similar items