A pytorch implementation is available on https://github.com/Purkialo/CrowdDet now.
This is the MegEngine implementation of our paper "Detection in Crowded Scenes: One Proposal, Multiple Predictions", https://arxiv.org/abs/2003.09163, 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:
@InProceedings{Chu_2020_CVPR, 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} }
Requirements:
CrowdHuman data:
config.py.
Compile gpu_nms library:
cd lib/layers sh ./setup.sh
Inference (GPU required):
cd model/emd_simple python3 inference.py -r path/to/meg_emd_simple.pkl -i ../../assets/running_1.jpgyou will get
result.jpglike this
Steps to train and test:
config.py.
python3 train.py
* Step2: testing. If you have multiple GPUs, you can use ` -d 2 ` to use more GPUs. ``` python3 test.py -r 30 ```
python3 .evaluate/compute_APMR.py --detfile ./model/crowd_emd_simple/outputs/eval_dump/dump-30.json --target_key 'box'
python3 .evaluate/compute_JI.py --detfile ./model/crowd_emd_simple/outputs/eval_dump/dump-30.json --target_key 'box'
We use pre-trained model from MegEngine ModelHub: https://data.megengine.org.cn/models/weights/resnet50fbaug76254_4e14b7d1.pkl. (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]).