Also for anyone out there looking to use pose detection, I built a pytorch model to post-process the keypoints and then used onnx.compose.merge_models to connect it to rtmpose. I used similar techniques to the point cloud tutorial for inputting center/size to be processed as values between 0.0 and 6553.5(the model multiplies by .1) and cos/sin of the rotation angle falling between -1 and 1 by multiplying by 0.0001 then subtracting 1
rr_center = (np.array(center_point) * 10).astype(np.uint16)
center_point, size, rot_angle_rad = (231., 318.), (209., 279.), np.pi / 3
rect = cv2.RotatedRect(center_point, size, np.degrees(rot_angle_rad))
modified_center = (np.array(center_point) * 10).astype(np.uint16)
modified_size = (np.array(size) * 10).astype(np.uint16)
modified_angles = (np.array([np.cos(rot_angle_rad) + 1.0, np.sin(rot_angle_rad) + 1.0]) * 10000).astype(np.uint16)
buff.setData(np.frombuffer(bytes(np.stack([modified_center, modified_size, modified_angles])), dtype=np.uint8))
This allows you to put the RRect config into an ImageManip node and then supply those same params to the model as well and get back pixel coords in the space of the original(pre-manip) image. The rotated aspect of it may be less useful to most unless the camera is rotated on the roll axis but it's there nonetheless.
I'll post it on a github repo later on once I clean up and organize everything but here it is for now.
Once Jointformer is adapted and working I'll be merging it onto the outputs of rtmpose_post_rrect model to get full RGB frame->XYZ kps inference all in one go!