资讯 社区 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

人体关键点识别

对于输入的一张图片(可正常解码,且长宽比适宜),检测图片中的所有人体,输出每个人体的21个主要关键点,包含头顶、五官、脖颈、四肢等部位,同时输出人体的坐标信息和数量

支持多人检测、人体位置重叠、遮挡、背面、侧面、中低空俯拍、大动作等复杂场景。

21个关键点的位置:头顶、左耳、右耳、左眼、右眼、鼻子、左嘴角、右嘴角、脖子、左肩、右肩、左手肘、右手肘、左手腕、右手腕、左髋部、右髋部、左膝、右膝、左脚踝、右脚踝。示意图如下,正在持续扩展更多关键点,敬请期待。

单人场景:

多人场景:

public void BodyAnalysisDemo() {
	var image = File.ReadAllBytes("图片文件路径");
	// 调用人体关键点识别,可能会抛出网络等异常,请使用try/catch捕获
	var result = client.BodyAnalysis(image);
	Console.WriteLine(result);
}

人体关键点识别 请求参数详情

参数名称 是否必选 类型 说明
image byte[] 二进制图像数据

人体关键点识别 返回数据参数详情

接口除了返回人体框和每个关键点的坐标信息外,还会输出人体框和关键点的概率分数,实际应用中可以基于概率分数进行过滤,排除掉分数低的误识别“无效人体”推荐的过滤方案:当关键点得分大于0.2的个数大于3,且人体框的得分大于0.03时,才认为是有效人体

实际应用中,可根据对误识别、漏识别的容忍程度,调整阈值过滤方案,灵活应用,比如对误识别容忍低的应用场景,人体框的得分阈值可以提到0.05甚至更高。

字段 是否必选 类型 说明
person_num uint32 人体数目
person_info object[] 人体姿态信息
+body_parts object 身体部位信息,包含21个关键点
++top_head object 头顶
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_eye object 左眼
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_eye object 右眼
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++nose object 鼻子
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_ear object 左耳
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_ear object 右耳
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_mouth_corner object 左嘴角
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_mouth_corner object 右嘴角
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++neck object 颈部
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_shoulder object 左肩
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_shoulder object 右肩
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_elbow object 左手肘
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_elbow object 右手肘
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_wrist object 左手腕
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_wrist object 右手腕
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_hip object 左髋部
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_hip object 右髋部
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_knee object 左膝
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_knee object 右膝
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++left_ankle object 左脚踝
+++x float x坐标
+++y float y坐标
+++score float 概率分数
++right_ankle object 右脚踝
+++x float x坐标
+++y float y坐标
+++score float 概率分数
+location object 人体坐标信息
++height float 人体区域的高度
++left float 人体区域离左边界的距离
++top float 人体区域离上边界的距离
++width float 人体区域的宽度
++score float 人体框的概率分数
log_id uint64 唯一的log id,用于问题定位

说明:

1、body_parts,一共21个part,每个part包含x,y两个坐标,如果part被截断,则x、y坐标为part被截断的图片边界位置,part顺序以实际返回顺序为准。

2、接口返回人体坐标框和每个关键点的置信度分数,在应用时可综合置信度score分数,过滤掉置信度低的“无效人体”,建议过滤方法:当关键点得分大于0.2的个数大于3,且人体框的分数大于0.03时,才认为是有效人体。实际应用中,可根据对误识别、漏识别的容忍程度,调整阈值过滤方案,灵活应用。

人体关键点识别 返回示例

{
	"person_num": 2,
	"person_info": [
		{
			"body_parts": {
				"left_hip": {
					"y": 573,
					"x": 686.09375,
					"score": 0.78743487596512
				},
				"top_head": {
					"y": 242.53125,
					"x": 620,
					"score": 0.87757384777069
				},
				"right_mouth_corner": {
					"y": 308.625,
					"x": 606.78125,
					"score": 0.90121293067932
				},
				"neck": {
					"y": 335.0625,
					"x": 620,
					"score": 0.84662038087845
				},
				"left_shoulder": {
					"y": 361.5,
					"x": 699.3125,
					"score": 0.83550786972046
				},
				"left_knee": {
					"y": 731.625,
					"x": 699.3125,
					"score": 0.83575332164764
				},
				"left_ankle": {
					"y": 877.03125,
					"x": 725.75,
					"score": 0.85220056772232
				},
				"left_mouth_corner": {
					"y": 308.625,
					"x": 633.21875,
					"score": 0.91475087404251
				},
				"right_elbow": {
					"y": 348.28125,
					"x": 461.375,
					"score": 0.81766486167908
				},
				"right_ear": {
					"y": 282.1875,
					"x": 593.5625,
					"score": 0.86551451683044
				},
				"nose": {
					"y": 295.40625,
					"x": 620,
					"score": 0.90894532203674
				},
				"left_eye": {
					"y": 282.1875,
					"x": 633.21875,
					"score": 0.89628517627716
				},
				"right_eye": {
					"y": 282.1875,
					"x": 606.78125,
					"score": 0.89676940441132
				},
				"right_hip": {
					"y": 586.21875,
					"x": 593.5625,
					"score": 0.79803824424744
				},
				"left_wrist": {
					"y": 374.71875,
					"x": 884.375,
					"score": 0.89635348320007
				},
				"left_ear": {
					"y": 295.40625,
					"x": 659.65625,
					"score": 0.86607384681702
				},
				"left_elbow": {
					"y": 361.5,
					"x": 791.84375,
					"score": 0.83910942077637
				},
				"right_shoulder": {
					"y": 348.28125,
					"x": 553.90625,
					"score": 0.85635334253311
				},
				"right_ankle": {
					"y": 890.25,
					"x": 580.34375,
					"score": 0.85149073600769
				},
				"right_knee": {
					"y": 744.84375,
					"x": 580.34375,
					"score": 0.83749794960022
				},
				"right_wrist": {
					"y": 348.28125,
					"x": 368.84375,
					"score": 0.83893859386444
				}
			},
			"location": {
				"height": 703.20654296875,
				"width": 652.61810302734,
				"top": 221.92272949219,
				"score": 0.99269664287567,
				"left": 294.03039550781
			}
		},
		{
			"body_parts": {
				"left_hip": {
					"y": 576,
					"x": 1239.5625,
					"score": 0.84608125686646
				},
				"top_head": {
					"y": 261.15625,
					"x": 1176.59375,
					"score": 0.871442258358
				},
				"right_mouth_corner": {
					"y": 336.71875,
					"x": 1164,
					"score": 0.90951544046402
				},
				"neck": {
					"y": 361.90625,
					"x": 1176.59375,
					"score": 0.85904294252396
				},
				"left_shoulder": {
					"y": 361.90625,
					"x": 1239.5625,
					"score": 0.8512310385704
				},
				"left_knee": {
					"y": 714.53125,
					"x": 1277.34375,
					"score": 0.82312393188477
				},
				"left_ankle": {
					"y": 853.0625,
					"x": 1315.125,
					"score": 0.83786374330521
				},
				"left_mouth_corner": {
					"y": 336.71875,
					"x": 1189.1875,
					"score": 0.90610301494598
				},
				"right_elbow": {
					"y": 387.09375,
					"x": 1025.46875,
					"score": 0.88956367969513
				},
				"right_ear": {
					"y": 311.53125,
					"x": 1138.8125,
					"score": 0.86518502235413
				},
				"nose": {
					"y": 324.125,
					"x": 1176.59375,
					"score": 0.9168484210968
				},
				"left_eye": {
					"y": 311.53125,
					"x": 1189.1875,
					"score": 0.91715461015701
				},
				"right_eye": {
					"y": 311.53125,
					"x": 1164,
					"score": 0.90343600511551
				},
				"right_hip": {
					"y": 576,
					"x": 1164,
					"score": 0.81976848840714
				},
				"left_wrist": {
					"y": 298.9375,
					"x": 1378.09375,
					"score": 0.86095398664474
				},
				"left_ear": {
					"y": 311.53125,
					"x": 1201.78125,
					"score": 0.86899447441101
				},
				"left_elbow": {
					"y": 324.125,
					"x": 1315.125,
					"score": 0.89198768138885
				},
				"right_shoulder": {
					"y": 387.09375,
					"x": 1101.03125,
					"score": 0.85161662101746
				},
				"right_ankle": {
					"y": 878.25,
					"x": 1151.40625,
					"score": 0.83667933940887
				},
				"right_knee": {
					"y": 727.125,
					"x": 1151.40625,
					"score": 0.85485708713531
				},
				"right_wrist": {
					"y": 387.09375,
					"x": 949.90625,
					"score": 0.83042001724243
				}
			},
			"location": {
				"height": 670.80139160156,
				"width": 524.25476074219,
				"top": 241.42504882812,
				"score": 0.98725789785385,
				"left": 902.15216064453
			}
		}
	],
	"log_id": "6362401025381690607"
}
上一篇
快速入门
下一篇
人体检测与属性识别