LTH14 / targeted-supcon

A PyTorch implementation of the paper Targeted Supervised Contrastive Learning for Long-tailed Recognition
MIT License
93 stars 13 forks source link

Code Execution for Cifar and INAT datasets #11

Open Angelina1996 opened 1 year ago

Angelina1996 commented 1 year ago

Dear author, Thanks for such great work. I am just wondering if you could guide how to execute the code for Cifar and INAT datasets.

Cheers

LTH14 commented 1 year ago

Hi, thanks for your interest! Please refer to this supplementary material here -- I submitted with the CVPR camera ready but I don't know why it does not appear online. For inat you can simply change the imagenet-LT to inat.

LTH14 commented 1 year ago

Our implementation in Cifar is not based on the moco and imagenet framework, so it could be hard to directly adapt the released code to Cifar. Our implementation in Cifar is based on this repo: https://github.com/HobbitLong/SupContrast. You need to replace the supcon losses file in their code with the targeted supcon loss (uncleaned version). Hope it can make your reproduction easier.