This repository is an official implementation of the paper "Few-Shot Object Detection with Dense-Global Feature Interaction and Dual-Contrastive Learning". The source code is based on https://github.com/facebookresearch/maskrcnn-benchmark and developed with Python 3.7 & PyTorch 1.1.0.
Check INSTALL.md for installation instructions. Since maskrcnn-benchmark has been deprecated, please follow these instructions carefully (e.g. version of Python packages).
First, you need to download the VOC datasets here. Then, put "datasets" into this repository. The "datasets" contains the original VOC2007/2012 datasets and correspondiing class split. The "datasets" is shown below:
datasets/voc/
├──VOC2007
├── Annotations
├── ImageSets
├── JPEGImages
├── Crops
├── Crops_standard-1shot
├── Crops_standard-2shot
├── Crops_standard-3shot
├── Crops_standard-5shot
├── Crops_standard-10shot
├──VOC2012
├── Annotations
├── ImageSets
├── JPEGImages
├── Crops
├── Crops_standard-1shot
├── Crops_standard-2shot
├── Crops_standard-3shot
├── Crops_standard-5shot
├── Crops_standard-10shot
- Run the following for base training and novel training on Pascal VOC splits-1.
bash tools/fewshot_exp/train_voc_all.sh
- Modify them if needed. If you have any question about these parameters (e.g. batchsize), please refer to maskrcnn-benchmark for quick solutions.
@ARTICLE{huang2022,
author={Lian Huang, Shaosheng Dai and Ziqiang He},
journal={Applied Intelligence},
title={Few-shot object detection with dense-global feature interaction and dual-contrastive learning},
year={2022},
doi={10.1007/s10489-022-04243-3}
}