Home

Awesome

FewX

FewX is an open source toolbox on top of Detectron2 for data-limited instance-level recognition tasks, e.g., few-shot object detection, few-shot instance segmentation, partially supervised instance segmentation and so on.

All data-limited instance-level recognition works from Qi Fan (HKUST, fanqics@gmail.com) are open-sourced here.

To date, FewX implements the following algorithms:

Highlights

Updates

Results on MS COCO

Few Shot Object Detection

MethodTraining DatasetEvaluation way&shotbox APdownload
FSOD (paper)COCO (non-voc)full-way 10-shot11.1-
FSOD (this implementation)COCO (non-voc)full-way 10-shot12.0<a href="https://drive.google.com/file/d/1VO1XMKtiU4pMNPfIvw5iZRqlO9dr5BhN/view?usp=sharing">model</a> | <a href="https://drive.google.com/file/d/18eC5Nn1HBJcDf75CoLWOwncYFXzHGXFD/view?usp=sharing">metrics</a>

The results are reported on the COCO voc subset with ResNet-50 backbone.

The model only trained on base classes is <a href="https://drive.google.com/file/d/1VdGVmcufa2JBmZUfwAcDj1OL5tKTFhQ1/view?usp=sharing"> base model</a> .

You can reference the original FSOD implementation on the Few-Shot-Object-Detection-Dataset.

Step 1: Installation

You only need to install detectron2. We recommend the Pre-Built Detectron2 (Linux only) version with pytorch 1.7. I use the Pre-Built Detectron2 with CUDA 10.1 and pytorch 1.7 and you can run this code to install it.

python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.7/index.html

Step 2: Prepare dataset

cd FewX/datasets
sh generate_support_data.sh

Step 3: Training and Evaluation

Run sh all.sh in the root dir. (This script uses 4 GPUs. You can change the GPU number. If you use 2 GPUs with unchanged batch size (8), please halve the learning rate.)

cd FewX
sh all.sh

TODO

Citing FewX

If you use this toolbox in your research or wish to refer to the baseline results, please use the following BibTeX entries.

@inproceedings{fan2021fsvod,
  title={Few-Shot Video Object Detection},
  author={Fan, Qi and Tang, Chi-Keung and Tai, Yu-Wing},
  booktitle={ECCV},
  year={2022}
}
@inproceedings{fan2020cpmask,
  title={Commonality-Parsing Network across Shape and Appearance for Partially Supervised Instance Segmentation},
  author={Fan, Qi and Ke, Lei and Pei, Wenjie and Tang, Chi-Keung and Tai, Yu-Wing},
  booktitle={ECCV},
  year={2020}
}
@inproceedings{fan2020fsod,
  title={Few-Shot Object Detection with Attention-RPN and Multi-Relation Detector},
  author={Fan, Qi and Zhuo, Wei and Tang, Chi-Keung and Tai, Yu-Wing},
  booktitle={CVPR},
  year={2020}
}

Special Thanks

Detectron2, AdelaiDet, centermask2