关键点估计之 PCK, PCKh, PDJ 评价度量

本文介绍了人体关键点估计中的两个重要评价指标——PCK(Percentage of Correct Keypoints)和PDJ(Percentage of Detected Joints)。PCK衡量的是检测关键点与真实值之间的归一化距离小于阈值的比例,而PCKh是PCK的一种变体,以头部长度为归一化参考。PDJ则是计算检测到的关键点占总关键点数的比例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文 - https://www.aiuai.cn/aifarm449.html - AIUAI

关键点估计 - 人体关键点(姿态估计) 和服饰关键点(FashionAI/DeepFashion).
单人关键点估计,评测.

1. PCK - Percentage of Correct Keypoints

关键点正确估计的比例
计算检测的关键点与其对应的groundtruth间的归一化距离小于设定阈值的比例(the percentage of detections that fall within a normalized distance of the ground truth).

FLIC 中是以躯干直径(torso size) 作为归一化参考.
MPII 中是以头部长度(head length) 作为归一化参考,即 PCKh.

function eval_pck(pred, joints, symmetry_joint_id, joint_name, name)
% PCK 的实现
% torso height: || left_shoulder - right hip ||
% symmetry_joint_id: 具有对称关系的关键点 ID
% joint_name: 具有对称关系的关键点名字

range = 0:0.01:0.1;
show_joint_ids = (symmetry_joint_id >= 1:numel(symmetry_joint_id));

% compute distance to ground truth joints
dist = get_dist_pck(pred, joints(1:2,:,:));

% 计算 PCK
pck_all = compute_pck(dist,range);
pck = pck_all(end, :);
pck(1:end-1) = (pck(1:end-1) + pck(symmetry_joint_id))/2;

% 可视化结果
pck = [pck(show_joint_ids) pck(end)];
fprintf('------------ PCK Evaluation: %s -------------\n', name);
fprintf('Parts '); fprintf('& %s ', joint_name{:}); fprintf('& Mean\n');
fprintf('PCK   '); fprintf('& %.1f  ', pck); fprintf('\n');

% -------------------------------------------------------------------------
function dist = get_dist_pck(pred, gt)
assert(size(pred,1) == size(gt,1) && size(pred,2) == size(gt,2) && size(pred,3) == size(gt,3));

dist = nan(1,size(pred, 2), size(pred,3));

for imgidx = 1:size(pred,3)
  % torso diameter 躯干直径
  if size(gt, 2) == 14
    refDist = norm(gt(:,10,imgidx) - gt(:,3,imgidx));
  elseif size(gt, 2) == 10 % 10 joints FLIC
    refDist = norm(gt(:,7,imgidx) - gt(:,6,imgidx));
  elseif size(gt, 2) == 11 % 11 joints FLIC
    refDist = norm(gt(:,4,imgidx) - gt(:,11<
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值