Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the annotated keypoints are sometimes very small or huge? #78

Open
futakw opened this issue Jul 3, 2023 · 1 comment
Open

Why the annotated keypoints are sometimes very small or huge? #78

futakw opened this issue Jul 3, 2023 · 1 comment

Comments

@futakw
Copy link

futakw commented Jul 3, 2023

# The keypoints are [x, y, d] where `x` and `y` are normalized (`uv`-system)\
# and `d` is the metric distance from the center of the camera. Convert them
# keypoint's `xy` value to pixel.
keypoints = [
np.multiply(keypoint, np.asarray([w, h, 1.], np.float32)).astype(int)
for keypoint in keypoints
]

As described here, I think the "keypoints.point_2d.x" or "keypoints.point_2d.y" should be in the range of 0 to 1 if x/y are inside the image.
However, I observe that sometimes those are extremely small or huge.

For example,
"~/bike/batch-11/5/annotation.pbdata"
has

keypoints {                                                                                                                                                                                               
    id: 2                                                                                                                                                                                                   
    point_3d {                                                                                                                                                                                              
      x: 1.2235139608383179                                                                                                                                                                                 
      y: 1.1318135261535645                                                                                                                                                                                 
      z: 0.07509636878967285                                                                                                                                                                                
    }                                                                                                                                                                                                       
    point_2d {                                                                                                                                                                                              
      x: -15.717081069946289                                                                                                                                                                                
      y: -12.666918754577637                                                                                                                                                                                
      depth: -0.07509636878967285                                                                                                                                                                           
    }                                                                                                                                                                                                       
  }  

with extremely small x and y.

@ahmadyan
Copy link
Collaborator

You can discard the point when the depth is negative (i.e. the point is behind the camera).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants