Home

Awesome

Grassmann Class Representation

🦢 - Paper 🌊 - Poster

Official code for "Get the Best of Both Worlds: Improving Accuracy and Transferability by Grassmann Class Representation (ICCV 2023)"

https://github.com/innerlee/gcr/assets/9464825/37708eb8-740c-46df-ad24-7bcf6ef592c9

Grassmann class representation

Installation

Run

python setup.py develop

Requirements

Prepare data

Put ImageNet1-K dataset on data/imagenet folder

ImageNet1-K Pretrained Weights

ArchitectureTrickClass RepresentationDimTop1Top5ConfigLogCheckpoint
ResNet50-DVector-78.0593.90configlogckpt
ResNet50-DGCR178.4294.14configlogckpt
ResNet50-DGCR478.6894.32configlogckpt
ResNet50-DGCR879.2694.44configlogckpt
ResNet50-DGCR1679.2194.37configlogckpt
ResNet50-DGCR3278.6394.05configlogckpt
ResNet50-DRSB-A1Vector-80.5394.98configlogckpt
ResNet50-DRSB-A1GCR881.0095.40configlogckpt
ResNet50-DRSB-A1 FixResGCR881.3095.42configlogckpt
ResNet50-DRSB-A2Vector-80.2994.86configlogckpt
ResNet50-DRSB-A2GCR880.7595.24configlogckpt
ResNet50-DRSB-A2 FixResGCR881.0495.46configlogckpt
ResNet50-DRSB-A3Vector-79.3694.47configlogckpt
ResNet50-DRSB-A3GCR879.6494.85configlogckpt
ResNet50-DRSB-A3 FixResGCR880.2095.15configlogckpt
ResNet101-DVector-79.3194.67configlogckpt
ResNet101-DGCR880.2494.95configlogckpt
ResNet152-DVector-80.0095.02configlogckpt
ResNet152-DGCR880.4495.21configlogckpt
VGG13-BNVector-72.0290.79configlogckpt
VGG13-BNGCR873.4091.30configlogckpt
Swin-TVector-81.0695.51configlogckpt
Swin-TGCR881.6395.77configlogckpt
Deit3-SVector-81.5395.22configlogckpt
Deit3-SGCR882.1895.73configlogckpt

Training

# train ResNet50d baseline with 8 gpus
./tools/dist_train.sh configs/resnet/resnet50d_8xb32-coslr_in1k.py 8

# train the gcr version
./tools/dist_train.sh configs/resnet/resnet50d_8xb32-coslr_in1k_gcr8.py 8

Citation

@inproceedings{haoqi2023gcr,
title = {Get the Best of Both Worlds: Improving Accuracy and Transferability by Grassmann Class Representation},
author = {Wang, Haoqi and Li, Zhizhong and Zhang, Wayne},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
year = {2023}
}

Related Projects

ViM: Out-Of-Distribution with Virtual-logit Matching (CVPR 2022)