bert icon indicating copy to clipboard operation
bert copied to clipboard

fix

Open meiqicheng opened this issue 2 years ago • 0 comments

https://github.com/WongKinYiu/yolov7/blob/a4724d55924708b4cee0dacbc875545b4b3abe3f/utils/plots.py#L436

# utils/plots.py #L436-L444
def output_to_keypoint(output):
    # Convert model output to target format [batch_id, class_id, x, y, w, h, conf]
    targets = []
    for i, o in enumerate(output):
        kpts = o[:,6:]
        o = o[:,:6]
        for index, (*box, conf, cls) in enumerate(o.cpu().numpy()):
            targets.append([i, cls, *list(*xyxy2xywh(np.array(box)[None])),
                                    conf, *list(kpts.detach().cpu().numpy()[index])])
    return np.array(targets)

meiqicheng avatar Aug 05 '22 07:08 meiqicheng