Code Monkey home page Code Monkey logo

iter-e2edet's Introduction

Progressive End-to-End Object Detection in Crowded Scenes

License: MIT

Introduction

In this paper, we propose a new query-based detection framework for crowd detection. Previous query-based detectors suffer from two drawbacks: first, multiple predictions will be inferred for a single object, typically in crowded scenes; second, the performance saturates as the depth of the decoding stage increases. Benefiting from the nature of the one-to-one label assignment rule, we propose a progressive predicting method to address the above issues. Specifically, we first select accepted queries prone to generate true positive predictions, then refine the rest noisy queries according to the previously accepted predictions. Experiments show that our method can significantly boost the performance of query-based detectors in crowded scenes. Equipped with our approach, Sparse RCNN achieves 92.0% AP, 41.4% MR^−2 and 83.2% JI on the challenging CrowdHuman dataset, outperforming the box-based method MIP that specifies in handling crowded scenarios. Moreover, the proposed method, robust to crowdedness, can still obtain consistent improvements on moderately and slightly crowded datasets like CityPersons and COCO. The code for Iter deformable DETR implementation can also be found here.

Models

Experiments of different methods were conducted on CrowdHuman. All approaches take R-50 as the backbone.

Method #queries AP MR JI
CrowdDet -- 90.7 41.4 82.4
Sparse RCNN 500 90.7 44.7 81.4
Deformable DETR 1000 91.5 43.7 83.1
Sparse RCNN + Ours 500 92.0 41.4 83.2
Deformable DETR + Ours 1000 92.1 41.5 84.0

Installation

The codebases are built on top of Detectron2 and Sparse RCNN.

Requirements

  • Linux or macOS with Python ≥ 3.6
  • PyTorch ≥ 1.5 and torchvision that matches the PyTorch installation. You can install them together at pytorch.org to make sure of this
  • OpenCV is optional and needed by demo and visualization

Steps

  1. Install and build libs
git clone https://github.com/megvii-model/Iter-E2EDET.git
cd Iter-E2EDET
python3 setup.py build develop
  1. Load the CrowdHuman images from here and its annotations from here. Then update the directory path of the CrowdHuman dataset in the config.py.
cd projects/crowd-e2e-sparse-rcnn
vim config.py
imgDir = 'CrowdHuman/images'
json_dir = 'CrowdHuman/annotations'
  1. Train Iter SparseR-CNN
cd projects/crowd-e2e-sparse-rcnn
python3 train_net.py --num-gpus 8 \
    --config-file configs/50e.6h.500pro.ignore.yaml

  1. Evaluate Iter SparseR-CNN. You can download the pre-trained model from here for direct evaluation.
-- python3 train_net.py --num-gpus 8 \
    --config-file configs/50e.6h.500pro.ignore.yaml \
    --eval-only MODEL.WEIGHTS path/to/model.pth

License

Iter Sparse RCNN is released under MIT License.

Citing

If you use our work in your research or wish to refer to the baseline results published here, please use the following BibTeX entries:

@article{2022iterdetr,
  title   =  {Progressive End-to-End Object Detection in Crowded Scenes},
  author  =  {Anlin Zheng and Yuang Zhang and Xiangyu Zhang and Xiaojuan Qi and Jian Sun},
  journal =  {arXiv preprint arXiv:arXiv:2203.07669v1},
  year    =  {2022}
}

iter-e2edet's People

Contributors

yexiguafuqihao avatar franciszero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.