mirror of https://github.com/WongKinYiu/yolov7.git
add tensor.detach for yolo_pose bug (#333)
parent
86cc5d0c4f
commit
13594cf6d4
|
@ -439,8 +439,8 @@ def output_to_keypoint(output):
|
||||||
for i, o in enumerate(output):
|
for i, o in enumerate(output):
|
||||||
kpts = o[:,6:]
|
kpts = o[:,6:]
|
||||||
o = o[:,:6]
|
o = o[:,:6]
|
||||||
for index, (*box, conf, cls) in enumerate(o.cpu().numpy()):
|
for index, (*box, conf, cls) in enumerate(o.detach().cpu().numpy()):
|
||||||
targets.append([i, cls, *list(*xyxy2xywh(np.array(box)[None])), conf, *list(kpts.cpu().numpy()[index])])
|
targets.append([i, cls, *list(*xyxy2xywh(np.array(box)[None])), conf, *list(kpts.detach().cpu().numpy()[index])])
|
||||||
return np.array(targets)
|
return np.array(targets)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue