Home

Awesome

RecursiveDet

This is the official implementation of the paper "RecursiveDet: End-to-End Region-based Recursive Object Detection"

arXiv arXiv video

Methods

<p align="center"> <img src="readme/pipeline.png" width="800px"/> <br> </p>

This paper investigates the region-based object detectors.

  1. Recursive structure for decoder:

    a) We share the decoder parameters among different stages, which significantly reduces the model size.

    b) A short recusion loop is made to increase the depth of model.

  2. Positional Encoding:

    a) We design bounding box PE into region-based detectors.

    b) Centerness-based PE is proposed to distinguish the RoI feature element and dynamic kernels at different positions within the bounding box.

The codes are released.

Installation

The codebases are built on top of Detectron2 and SparseR-CNN.

Requirements

Steps

  1. Install and build libs
git clone https://github.com/bravezzzzzz/RecursiveDet.git
cd RecursiveDet
python setup.py build develop
  1. Link coco dataset path to RecursiveDet/datasets/coco
mkdir -p datasets/coco
ln -s /path_to_coco_dataset/annotations datasets/coco/annotations
ln -s /path_to_coco_dataset/train2017 datasets/coco/train2017
ln -s /path_to_coco_dataset/val2017 datasets/coco/val2017
  1. Train
python projects/SparseRCNN/train_net.py --num-gpus 8 \
    --config-file projects/SparseRCNN/configs/sparsercnn.res50.100pro.3x.yaml
  1. Evaluate
python projects/SparseRCNN/train_net.py --num-gpus 8 \
    --config-file projects/SparseRCNN/configs/sparsercnn.res50.100pro.3x.yaml \
    --eval-only MODEL.WEIGHTS path/to/model.pth
  1. Visualize
python demo/demo.py\
    --config-file projects/SparseRCNN/configs/sparsercnn.res50.100pro.3x.yaml \
    --input path/to/images --output path/to/save_images --confidence-threshold 0.4 \
    --opts MODEL.WEIGHTS path/to/model.pth

Citing

If you use this code for your research, please cite


@article{zhao2023recursivedet,
  title={RecursiveDet: End-to-End Region-based Recursive Object Detection},
  author={Zhao, Jing and Sun, Li and Li, Qingli},
  journal={arXiv preprint arXiv:2307.13619},
  year={2023}
}