人数: 148
给定一张输入图像,输出图像中人群个数的总值,以及对应的heatmap图。
模型基本原理(如下图所示):
针对不同的domain数据,计算一个类别中心向量来表示domain的信息,随后采用这个domain-specific信息来指引网络对来自不同domain的输入图片进行学习和推理。
本模型适用范围较广,覆盖室外监控等大部分场景。
在ModelScope框架上,提供输入图片,即可以通过简单的Pipeline调用使用当前模型。
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.outputs import OutputKeys
from modelscope.utils.cv.image_utils import numpy_to_cv2img
import cv2
crowd_counting = pipeline(Tasks.crowd_counting,model='damo/cv_hrnet_crowd-counting_dcanet')
results = crowd_counting('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/crowd_counting.jpg')
print('scores:', results[OutputKeys.SCORES])
vis_img = results[OutputKeys.OUTPUT_IMG]
vis_img = numpy_to_cv2img(vis_img)
cv2.imwrite('result.jpg', vis_img)
SHA/SHB/QNRF的结果分别是58.77, 7.06, 88.35,我们提供了SHA,SHB的评估数据和相关代码可供复现。
SHA地址:https://modelscope.cn/datasets/modelscope/ShanghaiTech-A/summary
SHB地址:https://modelscope.cn/datasets/modelscope/ShanghaiTech-B/summary
@ARTICLE{yan2021towards,
author={Yan, Zhaoyi and Li, Pengyu and Wang, Biao and Ren, Dongwei and Zuo, Wangmeng},
journal={IEEE Transactions on Circuits and Systems for Video Technology},
title={Towards Learning Multi-domain Crowd Counting},
year={2021},
volume={},
number={},
pages={1-1},
doi={10.1109/TCSVT.2021.3137593}}