- Python 3.8+
- Jittor 1.3.9.2
- ml_collections
- gradio
- Get models in this link: ViT-B_16, ViT-B_32...
wget https://storage.googleapis.com/vit_models/imagenet21k/{MODEL_NAME}.npz
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.
Install dependencies with the following command:
pip3 install -r requirements.txt
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
To run the demo, run the following command:
bash scripts/demo.sh
The demo will be available at http://localhost:7860.
Many thanks to TransFG for the PyTorch reimplementation of TransFG: A Transformer Architecture for Fine-grained Recognition