Open bastokr opened 1 year ago
Try this instead. It worked for me:
for keypoint_indx, keypoint in enumerate(result.keypoints.data.tolist()[0]):
0: 480x640 1 person, 94.8ms Speed: 4.5ms preprocess, 94.8ms inference, 722.6ms postprocess per image at shape (1, 3, 480, 640)
i get this but not the results although the code is running doesnt work in videocapture or imread
inference.py test some error
image 1/1 /home/skpark/git/pose-detection-keypoints-estimation-yolov8/data/images/train/antelope_10010.jpg: 448x640 2 quadrupeds, 61.7ms Speed: 2.4ms preprocess, 61.7ms inference, 1.9ms postprocess per image at shape (1, 3, 448, 640) Traceback (most recent call last): File "/pose-detection-keypoints-estimation-yolov8/inference.py", line 15, in
for keypoint_indx, keypoint in enumerate(result.keypoints.tolist()):
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/skpark/.conda/envs/mmlab/lib/python3.11/site-packages/ultralytics/yolo/utils/init.py", line 135, in getattr
raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.doc}")
AttributeError: 'Keypoints' object has no attribute 'tolist'. See valid attributes below.