它的跟踪技术
首先在当前帧选一个人体,跟前一帧所有人比较,如果相似度大于阈值,则把前一帧相似度最大人的序号赋予当前帧,且之后当前帧其他人不与其进行相似度估计。
current_poses = sorted(current_poses, key=lambda pose: pose.confidence, reverse=True) # match confident poses first mask = np.ones(len(previous_poses), dtype=np.int32) flag=0 for current_pose in current_poses: best_matched_id = None best_matched_pose_id = None best_matched_iou = 0 all_image=0 for id, previous_pose in enumerate(previous_poses): if not mask[id]: continue iou = get_similarity(current_pose, previous_pose) if iou > best_matched_iou: best_matched_iou = iou best_matched_pose_id = previous_pose.id best_matched_id = id all_image=previous_pose.all_save_image if best_matched_iou >= threshold: mask[best_matched_id] = 0 else: # pose not similar to any previous best_matched_pose_id = None all_image=None 如果要去解决遮挡问题的话,直接用一个pose跟之前所有的进行相似度计算因此不用mask。 标签:iou,pose,lightweight,previous,openpose,id,best,matched From: https://www.cnblogs.com/hahaah/p/17358080.html