mindspore-lab / mindcv

A toolbox of vision models and algorithms based on MindSpore
https://mindspore-lab.github.io/mindcv/
Apache License 2.0
230 stars 139 forks source link

Add EBVs #779

Open bftan1949 opened 3 months ago

bftan1949 commented 3 months ago

If this is your first time, please read our contributor guidelines: https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md

Is your feature request related to a problem? Please describe. When the number of categories becomes large, the trainable parameters in the final linear layer of a classification network often exceed those in the feature extraction layers. This issue is hoped to be resolved by modifying the classification layer.

Describe the solution you'd like The method proposed in the CVPR 2023 paper ``Equiangular Basis Vectors" is being used to address this issue.

Describe alternatives you've considered I would like to add a function in 'models/layers' floder and provide a network file adopting EBVs in 'models/' floder.

Additional context EBVs can improve the top-1 accuracy in classification tasks such as ImageNet-1K. When dealing with a larger number of categories, EBVs reduce the required training parameters for the classification head. For example, with 100,000 categories, a ResNet-50 model using EBVs as the classification head requires only 1/7 of the training parameters compared to a standard ResNet-50.

IASZHT commented 1 month ago

Thank you for your contribution to mindcv. Please provide the readme and related config files. We will merge them as soon as possible after verification.

bftan1949 commented 4 days ago

Thank you for your contribution to mindcv. Please provide the readme and related config files. We will merge them as soon as possible after verification.

Thank you for your review, I have added README.md and config file. Please feel free to contact me if you have any questions.