程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python calls Tencent cloud human body analysis to recognize pedestrians

編輯:Python

Body analysis

Tencent cloud map · Body analysis (Body Analysis) Based on Tencent's leading human analysis algorithm , Provide portrait segmentation 、 Human detection 、 Pedestrian recognition (ReID) Etc . Support the recognition of half body contour in pictures or videos , And separate it from the background ; Support human body detection , Identify what pedestrians are wearing 、 Body posture and other attribute information , Realize pedestrian recognition and retrieval across cameras and scenes . It can be applied to portrait matting 、 Background effects 、 Pedestrian search 、 Crowd density detection and other scenarios .

Python Call Tencent cloud human analysis to identify pedestrians

process analysis : First, let's take a look at Tencent's products

Tencent cloud human body analysis website

1. Tools

Tencent cloud's API What needs to be called is the online picture , The result is a slightly complex string of information ( Including a frame to identify people , And the orientation of people ). We only need to extract the returned information , Extract XY Coordinates can be used python The drawing tool in the picture frame the person in the picture .

2. problem

python To draw, you can only draw on local files , and Human analysis of Tencent cloud API What you need is an online picture ( I.e. link ), So here I download the online pictures and put them locally , then python You can draw , So it's actually the same picture .

terms of settlement : You can find a good picture first , Then call the object storage interface of Tencent cloud to save the pictures in the cloud , At the same time, this interface provides functions to obtain cloud image connections , Call the function to get all picture links , So human analysis API You can use it , and PYTHON You can use local files to draw pictures .( You can refer to my last article , Upload the picture to the bucket of object storage )

3. Step summary :

call Tencent cloud human analysis API-> Process and store the returned data -> use Python Third party library drawing , Frame pedestrians .

Code implementation

python Code :

This official mode has , I added python Drawing code , I only realized the reading of a photo and the frame people , After all, I have just learned , I'm sorry .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved