Skip to content

PyTorch implementation of the self-supervised pretraining model for rare wildlife recognition/detection: https://arxiv.org/abs/2108.07582

License

Notifications You must be signed in to change notification settings

xcvil/self-rare-wildlife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Self-Supervised Pretraining and Controlled Augmentation Improve Rare Wildlife Recognition in UAV Images

This is a PyTorch implementation of the Self-Supervised Pretraining and Controlled Augmentation Improve Rare Wildlife Recognition in UAV Images or arXiv preprint:

@InProceedings{Zheng_2021_ICCV,
    author    = {Zheng, Xiaochen and Kellenberger, Benjamin and Gong, Rui and Hajnsek, Irena and Tuia, Devis},
    title     = {Self-Supervised Pretraining and Controlled Augmentation Improve Rare Wildlife Recognition in UAV Images},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops},
    month     = {October},
    year      = {2021},
    pages     = {732-741}
}

Updates

[29/10/2022] My master thesis at ETH Zurich implementing the ideas of image/feature mixture strategies for self-supervised visual representation learning is online now, see arXiv submission. My thesis paper is an extension of my ICCV 2021 paper above.

[21/10/2021] MixCo is supported, see here.

[30/08/2021] Feature extraction (for t-SNE visualization and KNN grid search) is supported, see here.

[26/08/2021] Training MoCo + CLD with domain-specific geometric augmentation (GeoCLD) is supported, see here.

Requirements

  • Python >= 3.7, < 3.9
  • PyTorch >= 1.6
  • pandas
  • NumPy
  • tqdm
  • apex (optional, unless using mixed precision training)

Tools

Feature Extraction (Encoder+MLP Projection, Instance Discrimination Branch)

python vis.py \
  -a resnet50 \
  --resume [YOUR_PTH_TAR_MODEL_FILE] \
  --save-dir [SAVE_DIR] \
  --mlp \
  --moco-k 4096 

KNN Parameters Grid Search

python vis.py \
  -a resnet50 \
  --resume [YOUR_PTH_TAR_MODEL_FILE] \
  --save-dir [SAVE_DIR] \
  --mlp \
  --moco-k 4096 \
  --knn-search \
  --knn-k k \
  --knn-t t \
  --knn-data [DATASET_FOLDER_WITH_TRAIN_VAL_FOLDERS]

License

This project is licensed under the MIT License. See LICENSE for more details.

Acknowledgements

The authors would like to thank the Kuzikus Wildlife Reserve, Namibia for the access to the aerial data and the ground reference used in this study.

Part of this code is based on MoCo, CLD, OpenSelfSup, and CIFAR demo on Colab GPU.

About

PyTorch implementation of the self-supervised pretraining model for rare wildlife recognition/detection: https://arxiv.org/abs/2108.07582

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published