Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
chihy 86e3001b3d | 2 years ago | |
---|---|---|
.idea | 2 years ago | |
datasets | 2 years ago | |
doc | 2 years ago | |
losses | 2 years ago | |
models | 2 years ago | |
test_data | 2 years ago | |
utils | 2 years ago | |
vgg | 2 years ago | |
CrownCount.py | 2 years ago | |
README.md | 2 years ago | |
__init__.py | 2 years ago | |
preprocess_dataset.py | 2 years ago | |
requirements.txt | 2 years ago |
1.0
传入交通或监控场景下的人群图片,输出对人群的计数。
主要面向开阔场地的监控或安防摄像头场景图片,场景中人数较多。示例:
拍摄图片的摄像机一般架设在高于人头顶1米以上的距离,视野内的遮挡建筑物较少。不适用于过高拍摄图片或遥感图像,也不适用于针对个人或几个人的日常图像。
参考requirements.txt
需注意pytorch的版本为1.6.0
from CrownCount import CrownCount
counter = CrownCount()
res = counter.run(image)
参数 | 类型 | 是否必填 | 说明 |
---|---|---|---|
image | PIL.Image.Image 或 ndarray | 是 | 维度为(H,W,C)的图片,通道类型为RGB, 图片长宽应大于50*50 |
返回一个不小于0的整数,代表图片中的人数
from PIL import Image
from CrownCount import CrownCount
img = Image.open('test_data/img_0001.jpg').convert('RGB')
counter = CrownCount()
res = counter.run(img)
print(res)
1220
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》