Need help with CrowdDetection?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

172 Stars 24 Forks MIT License 12 Commits 1 Opened issues

Services available


Need anything else?

Contributors list

Detection in Crowded Scenes: One Proposal, Multiple Predictions

A pytorch implementation is available on now.

This is the MegEngine implementation of our paper "Detection in Crowded Scenes: One Proposal, Multiple Predictions",, published in CVPR 2020.

Our method aiming at detecting highly-overlapped instances in crowded scenes.

The key of our approach is to let each proposal predict a set of instances that might be highly overlapped rather than a single one in previous proposal-based frameworks. With this scheme, the predictions of nearby proposals are expected to infer the same set of instances, rather than distinguishing individuals, which is much easy to be learned. Equipped with new techniques such as EMD Loss and Set NMS, our detector can effectively handle the difficulty of detecting highly overlapped objects.

The network structure and results are shown here:


If you use the code in your research, please cite:

author = {Chu, Xuangeng and Zheng, Anlin and Zhang, Xiangyu and Sun, Jian},
title = {Detection in Crowded Scenes: One Proposal, Multiple Predictions},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}


  1. Requirements:

    • python3.6.9, MegEngine 0.3.1, cuda10.0
  2. CrowdHuman data:

    • CrowdHuman is a benchmark dataset to better evaluate detectors in crowd scenarios. The dataset can be downloaded from The path of the dataset is set in
  3. Compile gpu_nms library:

    cd lib/layers
    sh ./
    • Please note that in some environments you may need to modify!
  4. Inference (GPU required):

    cd model/emd_simple
    python3 -r path/to/meg_emd_simple.pkl -i ../../assets/running_1.jpg
    you will get
    like this
  5. Steps to train and test:

    • Step1: training. More training and testing settings can be set in
* Step2:  testing. If you have multiple GPUs, you can use ` -d 2 ` to use more GPUs.
python3 -r 30

  • Step3: evaluating.
    python3 .evaluate/ --detfile ./model/crowd_emd_simple/outputs/eval_dump/dump-30.json --target_key 'box'
    python3 .evaluate/ --detfile ./model/crowd_emd_simple/outputs/eval_dump/dump-30.json --target_key 'box'


We use pre-trained model from MegEngine ModelHub: (or resnet50fbaug76254_4e14b7d1.pkl)

All models are based on ResNet-50 FPN. | | AP | MR | JI | Model | --- | --- | --- | --- | --- | | FPN Baseline | 0.8662 | 0.4227 | 0.7957 | megfpnbaseline.pkl| | EMD Simple | 0.8996 | 0.4171 | 0.8223 | megemdsimple.pkl| | EMD with RM | 0.9034 | 0.4110 | 0.8273 | megemdrefine.pkl | | Cascade FPN Baseline | 0.8624 | 0.4016 | 0.8037 | megcasfpn.pkl| | Cascade EMD Simple | 0.9064 | 0.3865 | 0.8392 | megcasemd.pkl|


If you have any questions, please do not hesitate to contact Xuangeng Chu ([email protected]).

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.