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

L2 normalization of keypoints per frame ? #40

Closed
basicvisual opened this issue Jan 8, 2020 · 1 comment
Closed

L2 normalization of keypoints per frame ? #40

basicvisual opened this issue Jan 8, 2020 · 1 comment
Labels
question Further information is requested

Comments

@basicvisual
Copy link

Hi i am trying to do normalization of keypoints for post processing. On looking through the code it seems like one needs to first extract x,y cordinates . For a single person it seems to work ok .
Pseudo code


vec = np.empty(pts.shape[1] * 2)
vec[0::2] = pts[:,:,0]
vec[1::2] = pts[:,:,1]
print(vec)

norm = np.linalg.norm(vec)

Could this be the right way to do it ? This method only works for single person detection . Do you perhaps have a better suggesiton ?

@stefanopini stefanopini added the question Further information is requested label Jan 12, 2020
@stefanopini
Copy link
Owner

Hi!

Regarding the multi-person case, you can scale (and resize) each pose using the coordinates of each bounding box (such as subtracting minimum x and y of the bounding box and dividing by its width and height).

Regarding the keypoint normalization, you can normalize w.r.t. the whole vector (as you reported) or normalize the x and y axes independently.

To get the person bounding boxes, set return_bounding_boxes=True when SimpleHRNet is initialized.

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

No branches or pull requests

2 participants