/Bi-FRN

Code release for Bi-Directional Feature Reconstruction Network for Fine-grained Few-shot Image Classification

Primary LanguagePythonMIT LicenseMIT

Bi-FRN

Code relaese for Bi-Directional Feature Reconstruction Network for Fine-grained Few-shot Image Classification. (Accepted in AAAI-23)

Code environment

  • You can create a conda environment with the correct dependencies using the following command lines:

    conda env create -f environment.yml
    conda activate BiFRN

Dataset

The official link of CUB-200-2011 is here. The preprocessing of the cropped CUB-200-2011 is the same as FRN, but the categories of train, val, and test follows split.txt. And then move the processed dataset to directory ./data.

Train

  • To train Bi-FRN on CUB_fewshot_cropped with Conv-4 backbone under the 1/5-shot setting, run the following command lines:

    cd experiments/CUB_fewshot_cropped/BiFRN/Conv-4
    ./train.sh
  • For ResNet-12 backbone, run the following command lines:

    cd experiments/CUB_fewshot_cropped/BiFRN/ResNet-12
    ./train.sh

Test

    cd experiments/CUB_fewshot_cropped/BiFRN/Conv-4
    python ./test.py
    
    cd experiments/CUB_fewshot_cropped/BiFRN/ResNet-12
    python ./test.py

References

Thanks to Davis, Phil and Yassine, for the preliminary implementations.

Contact

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