|
# 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.
Objectron/objectron/dataset/graphics.py
Lines 34 to 40 in c06a651
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
with extremely small x and y.