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

bug in pose/datasets/mpii.py and pose/losses/jointsmseloss.py #93

Open
fabro66 opened this issue Apr 7, 2019 · 2 comments
Open

bug in pose/datasets/mpii.py and pose/losses/jointsmseloss.py #93

fabro66 opened this issue Apr 7, 2019 · 2 comments

Comments

@fabro66
Copy link

fabro66 commented Apr 7, 2019

Q1.in pose/datasets/mpii.py

1212

I think it should be if tpts[i, 2] > 0 not if tpts[i, 1] > 0, tpts[i, 2] indicates if the key point is visible.
The file of coco.py writes like this.

Q2.in pose/losses/jointsmseloss.py

Selection_044

target_weight[:, idx] should be target_weight[idx, 0]. Because target_weight[idx, 0] indicates if the key point is visible.
I don't know if I said it right, please take a look, thanks.

@Malefikus
Copy link

Q1.in pose/datasets/mpii.py

1212

I think it should be if tpts[i, 2] > 0 not if tpts[i, 1] > 0, tpts[i, 2] indicates if the key point is visible.
The file of coco.py writes like this.

Q2.in pose/losses/jointsmseloss.py

Selection_044

target_weight[:, idx] should be target_weight[idx, 0]. Because target_weight[idx, 0] indicates if the key point is visible.
I don't know if I said it right, please take a look, thanks.

Hi, I happen to browse the same parts of the code and my considerations are that:

For Q1, the "if" statement is no longer used to judge if the point is visible (you can simply delete the line). The original usage of the if statement is to create masked heatmaps for non-visible points, but here the publisher creates unmasked heatmaps for all of the joints by default, and implement training-time masking via the target_weight indicator in jointsmseloss. In test time, we should not mask the target heatmaps because the occluded joints are still required for calculating the accuracy.

For Q2, the target_weight is now a batch_sizenjoints1 tensor, and target_weight[ :, idx ] indicates the visibility of this joint for all of the samples in one batch.

@jaideep11061982
Copy link

what is njoints here do you have an idea.
In my model i have to regress for 6 coordinates and 1 confidence mask.
Is 6 be njoins in this case ?

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

3 participants