Code Monkey home page Code Monkey logo

an-erudite-fgvc-model's Introduction

An-Erudite-FGVC-Model

Code release for “An Erudite Fine-Grained Visual Classification Model" (CVPR 2023)

Changelog

  • 2023/04/18 upload the code.

Requirements

  • python 3.6
  • PyTorch 1.7.1+cu110
  • torchvision 0.8.2+cu110
  • learn2learn 0.1.7

Data

  • Download datasets
  • Extract them to data/cars/, data/birds/ and data/airs/, respectively.
  • Split the dataset into train and test folder, the index of each class should follow the Birds.xls, Air.xls, and Cars.xls
  • e.g., CUB-200-2011 dataset
  -/birds/train
	         └─── 001.Black_footed_Albatross
	                   └─── Black_Footed_Albatross_0001_796111.jpg
	                   └─── ...
	         └─── 002.Laysan_Albatross
	         └─── 003.Sooty_Albatross
	         └─── ...
   -/birds/test	
             └─── ...         

Training

  • CUDA_VISIBLE_DEVICES=X python main.py (Mix Cars and Flowers)

Citation

If you find this paper useful in your research, please consider citing:

@InProceedings{Chang2023Erudite,
  title={An Erudite Fine-Grained Visual Classification Model},
  author={Chang, Dongliang and Tong, Yujun and Du, Ruoyi and Timothy, Hospedales and Song, Yi-Zhe and Ma, Zhanyu },
  booktitle = {Computer Vision and Pattern Recognition},
  year={2023}
}

Contact

Thanks for your attention! If you have any suggestion or question, you can leave a message here or contact us directly:

an-erudite-fgvc-model's People

Contributors

dongliangchang avatar tongyujun1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

an-erudite-fgvc-model's Issues

About the parallel bug in the code

Thanks for your kindly sharing code. There is an issue, when running the code with two or more cards (using dataparallel), the error happens as follows. Could you please share your solution? It would be very helpful. Single card is ok, but it is two slow for training.

Besides, could you please share your paper in a arxiv version? Then more details can be found and your excellent work can be spread more fluently. Thank you very much.

Traceback (most recent call last):
File "main.py", line 440, in
train(epoch)
File "main.py", line 341, in train
task_model.adapt(adaptation_loss) # computes gradient, update task_model in-place
File "/home/sunhongbo/anaconda3/envs/u_modal/lib/python3.6/site-packages/learn2learn/algorithms/maml.py", line 169, in adapt
self.module = maml_update(self.module, self.lr, gradients)
UnboundLocalError: local variable 'gradients' referenced before assignment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.