/ACCV2022-FIAC

3rd place solution to ACCV 2022 Fine-grained Image Analysis Challenge!

Primary LanguagePythonMIT LicenseMIT

ACCV 2022 Fine-grained Image Analysis Challenge

3rd Place Solution

Competitionđź”—

HARDWARE & SOFTWARE

Ubuntu 18.04.3 LTS

CPU: AMD EPYC 7543 32-Core Processor

GPU: 8 * NVIDIA A5000, Memory: 24G

Python: 3.8

Pytorch: 1.9.0+cu111

Environment

Requirements

git clone https://github.com/XL-H/ACCV2022.git
cd ACCV2022
pip install -r requirements.txt

Apex

git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

Data Preparation

  1. Run Data_preprocessing.ipynb
    1. Remove broken images
    2. Make csv file
    3. Resampling
    4. StratifiedKfold

Model Preparation

  1. Pre-trained models from ImageNet1K/ImageNet21K:

Training & Inference

  1. Configurations for training can be found in ACCV/config_timm.py

  2. Training:

!CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
python -m torch.distributed.launch --nproc_per_node=8 \
/root/ACCV2022/train.py \
--csv-dir autodl-tmp/ACCV_384_balance_fold.csv \
--config-name 'timm' \
--image-size 384 \
--batch-size 7 \
--num-workers 10 \
--init-lr 6e-5 \
--n-epochs 10 \
--cpkt_epoch 1 \
--n_batch_log 300 \
--warm_up_epochs 1 \
--fold 1
  1. Tools-Train-Inference.ipynb : Training and Inference

Contact

Feel free to contact, email: 3579628328@qq.com