Awesome
The Art of Camouflage: Few-shot Learning for Animal Detection and Segmentation
This repository is the official implementation of the paper entitled: The Art of Camouflage: Few-shot Learning for Animal Detection and Segmentation, IEEE Access, 2024.
Authors: Thanh-Danh Nguyen, Anh-Khoa Nguyen Vu, Nhat-Duy Nguyen, Vinh-Tiep Nguyen, Thanh Duc Ngo, Thanh-Toan Do, Minh-Triet Tran, Tam V. Nguyen*.
[Paper] [ArXiv] [Code] [Project Page]
Updates
[2024/7] We have released the checkpoints, visualization, and initial instructions for FS-CDIS⚡!
1. Environment Setup
Download and install Anaconda with the recommended version from Anaconda Homepage: Anaconda3-2019.03-Linux-x86_64.sh
git clone https://github.com/danhntd/FS-CDIS.git
cd FS-CDIS
curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
bash Anaconda3-2019.03-Linux-x86_64.sh
After completing the installation, please create and initiate the workspace with the specific versions below. The experiments were conducted on a Linux server with a single GeForce RTX 2080Ti GPU
, CUDA 10.1/10.2, Torch 1.7.
conda create --name FSCDIS python=3
conda activate FSCDIS
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.2 -c pytorch
This source code is based on Detectron2. Please refer to INSTALL.md for the pre-built or building Detectron2 from source.
After setting up the dependencies, use the command pip install -e .
in this root to finish.
2. Data Preparation
Download the datasets
The proposed CAMO-FS is available at this link.
Register datasets
Detectron2 requires a step of data registration for those who want to use the external datasets (Detectron2 Docs), which is already prepared in this repository.
3. Training Pipeline
<!-- Our proposed FS-CDIS framework: <img align="center" src="/visualization/framework.png"> -->Our detailed proposals of instance triplet loss and instance memory storage: <img align="center" src="/visualization/framework_fs-cdis-memo-redesign-ieee-access.png">
Configurations
All configs can be found in the ./configs/
directory.
The whole script commands can be found in ./scripts/*
.
Released checkpoints and results:
We provide the checkpoints of our final model:
<!-- | Model R-101 | FS-CDIS-ITL | FS-CDIS-IMS | | ----------- |:---------------:|:----------------:| | 1-shot |[link](https://) | [link](https://) | | 2-shot |[link](https://) | [link](https://) | | 3-shot |[link](https://) | [link](https://) | | 5-shot |[link](https://) | [link](https://) | -->Model R-101 | FS-CDIS-ITL | mask AP | box AP | FS-CDIS-IMS | mask AP | box AP |
---|---|---|---|---|---|---|
1-shot | link | 4.46 | 4.04 | link | 5.46 | 4.50 |
2-shot | link | 5.57 | 7.28 | link | 6.95 | 6.95 |
3-shot | link | 6.41 | 7.49 | link | 7.36 | 7.55 |
5-shot | link | 8.48 | 9.76 | link | 9.61 | 10.36 |
4. Visualization
<p align="center"> <img width="800" src="/visualization/visualization.png"> </p>Citation
Please use the following bibtex to cite this repository:
@article{nguyen2024art,
title={The Art of Camouflage: Few-shot Learning for Animal Detection and Segmentation},
author={Nguyen, Thanh-Danh and Vu, Anh-Khoa Nguyen and Nguyen, Nhat-Duy and Nguyen, Vinh-Tiep and Ngo, Thanh Duc and Do, Thanh-Toan and Tran, Minh-Triet and Nguyen, Tam V},
journal={IEEE Access},
volume={-},
pages={-},
year={2024},
publisher={IEEE}
}