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 .
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 .