Hello,

I am currently using the BlazeposeDepthAI library for pose estimation, which I discovered on the DepthAI Examples website. My goal is to extract the key points generated by BlazeposeDepthAI and use them in my custom pose recognition model. However, I am facing a challenge because the key point coordinates are only getting displayed on the screen and I cannot seem to locate any function within the library that returns the coordinates, similar to what we do in MediaPipe Python.

I have already searched through the library's repository, but have not been able to find the information I need. If anyone could offer any guidance on how to access the key point coordinates using BlazeposeDepthAI, I would greatly appreciate it.

Thank you for taking the time to read my message and for any help you can provide.

Hi @rb210002
You can extract coordinates of key points by accessing landmarks_world body attribute.

Code example in demo.py

while True:
    # Run blazepose on next frame
    frame, body = tracker.next_frame()
    if frame is None: break
    # Draw 2d skeleton
    landmark_coords = body.landmarks_world  # retrive key point coordinates 
    frame = renderer.draw(frame, body)
    key = renderer.waitKey(delay=1)
    if key == 27 or key == ord('q'):
        break
renderer.exit()
tracker.exit()

Hope this helps, have a nice day.
Jaka

    Hi jakaskerl , I try to use landmark_coords = body.landmarks_world body it is showing error

    AttributeError: None Type object has no attribute 'landmarks_world'

      Hi rb210002

      Body object is none when tracker fails to estimate the pose of a person (the person is probably not in the frame or maybe the room is too dark).

      Just add an if statement that checks whether body exists.

      if body:
              landmark_coords = body.landmarks_world

      (I think you also need -xyz argument when running the demo, not sure tho)