This is the source code for our paper Data-driven Meta-set Based Fine-Grained Visual Recognition.
The architecture of our proposed peer-learning model is as follows
After creating a virtual environment of python 3.7, run pip install -r requirements.txt
to install all dependencies
The code is currently tested only on GPU
-
Data Preparation
- Download web data into project root directory and uncompress them using
wget https://wsnfg-sh.oss-cn-shanghai.aliyuncs.com/web-bird.tar.gz wget https://wsnfg-sh.oss-cn-shanghai.aliyuncs.com/web-car.tar.gz wget https://wsnfg-sh.oss-cn-shanghai.aliyuncs.com/web-aircraft.tar.gz tar -xvf web-bird.tar.gz tar -xvf web-car.tar.gz tar -xvf aircraft-car.tar.gz
- If you already have the benchmark datasets, you can directly use part of them as the validation sets.
Otherwise, download validation data into project root directory and uncompress them using
wget https://dmfgr.oss-cn-hongkong.aliyuncs.com/validation_data.zip unzip validation_data.zip
- Download web data into project root directory and uncompress them using
-
Source Code
-
If you want to train the whole network from begining using source code on the web fine-grained dataset, please follow subsequent steps
-
Modify
CUDA_VISIBLE_DEVICES
to proper cuda device id anddata_base
,val_base
to proper dataset intrain.sh
. You can directly utilize the benchmark dataset as the validation set by changingmeta_number
parameter in thetrain.py
.meta_number
controls the number of images per category in the validation set, and it is set to be 10 by defaut. -
Activate virtual environment(e.g. conda) and then run the script
bash train.sh
to train the model. We recommand you to use resnet-18 backbone, because it needs less memory and time to train.
-
-
If you find this useful in your research, please consider citing:
@inproceedings{zhang2020data,
title={Data-driven Meta-set Based Fine-Grained Visual Recognition},
author={Chuanyi Zhang, Yazhou Yao, Xiangbo Shu, Zechao Li, Zhenmin Tang, Qi Wu},
booktitle={ACM International Conference on Multimedia (ACM MM)},
year={2020}
}