Skip to content

Fzacker/TransFG-Reproduction-Using-Jittor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TransFG: Reproduction Using Jittor

Framework

Dependencies:

  • Python 3.8+
  • Jittor 1.3.9.2
  • ml_collections
  • gradio

Usage

1. Download Google pre-trained ViT models

wget https://storage.googleapis.com/vit_models/imagenet21k/{MODEL_NAME}.npz

2. Prepare data

In the paper, we use data from 5 publicly available datasets:

Please download them from the official websites and put them in the corresponding folders.

3. Install required packages

Install dependencies with the following command:

pip3 install -r requirements.txt

4. Train

To train TransFG on CUB-200-2011 dataset with 4 gpus in FP-16 mode for 10000 steps run:

bash scripts/train_cub_jt.sh

5. demo

To run the demo, run the following command:

bash scripts/demo.sh

The demo will be available at http://localhost:7860.

demo

Acknowledgement

Many thanks to TransFG for the PyTorch reimplementation of TransFG: A Transformer Architecture for Fine-grained Recognition

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published