-
Notifications
You must be signed in to change notification settings - Fork 57
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
output coords are negative floats #6
Comments
I think it is caused by the pytorch version compatibility I use pytorch 0.4, and the test case appears
and when I set |
Yes, this code was written to work with PyTorch 0.2, and 0.4 introduced some breaking changes. I will attempt to update the project for newer versions of PyTorch. |
I have updated the code so that it should work with 0.4 and 1.0. The branch is https://github.com/anibali/dsntnn/tree/pytorch-1.0 and I have uploaded an alpha release to PyPI (https://pypi.org/project/dsntnn/0.4.0a0/). Please try this version and see if it helps. |
The new version works! The final results look pretty good! Very thanks for your update. I am working on multi-person pose estimation, do you have some future plans to extend dsntnn module to non-fixed number keypoints regression problem? |
Glad to hear that the new version works. I have put some thought into how DSNT might be applied to multi-person pose estimation, but unfortunately I don't think it's a trivial extension. If you come up with any ideas yourself, please let me know because I am definitely interested. |
This branch does not exist anymore. I saw that you have merged it into the master, is that correct? |
Those changes were merged into master and released again as dsntnn version 0.4.0. So now you can just use 0.4.0 from PyPi instead of the alpha release. |
Thanks for your response. Maybe I am doing something wrong, but when I install dsntnn via
Running my trainer script with this version gives me values outside (-1,1). When I use
So I assume that the package source used by pip was not updated? I am not very familiar with the mechanism that is used by pip to get the packages. Is it pulling it directly from github or do you as an author have to manually update the packet sources? If I understand your last answer correctly, there should be no difference between |
Interesting, thanks for letting me know. I'll check it out more closely tomorrow, sounds like something might be wrong with the 0.4.0 release. |
I just checked and the module source file Could you try running the following commands after using pip to install each version, and post the output here? This will show me whether the versions you are installing are somehow different.
Here's what I get:
So as you can see, the releases appear identical from my end, since the only source file has the same checksum of |
The output is the same you have posted. I get the same hash as you for both versions. So there seems to be no problem with the version. I have now switched to version 0.4.0 and it seems to work in most cases, but not always. I have started my script a few times to see if I always get coordinates in (-1,1) and after 5 tries I got 1.0102 in one of the first mini batches in the first epoch. Do you have an idea how that could happen? In my understanding this could only occur when the heatmap is not normalized so that its values form a probability distribution, but I am using I get too small or too large values with both versions 0.4.0 and 0.4.0a0 (which is expected as we have seen that they are the same) |
Could you please write code to save the unnormalised heatmaps with |
I have saved the unnormalized heatmaps and wanted to see what the output will be if I load the heatmaps again and then apply dsntnn.flat_softmax and dstnn.dsnt. I was surprised that the coordinates then looked fine. After a bit of debugging I found that the error is not caused by the DSNT layer but by a affine transformation (STN) that I apply to the coordinates after I get them from the DSNT layer. So my assumption that there is a bug in dsntnn was wrong. Sorry for the false alarm! |
No worries, I'm glad that you found your true problem! |
I merged dsntnn module into my previous single person pose estimator, MobilePose-pytorch |
The network is defined by:
And the training codes are as follows:
I converted keypoint groundtruth into float(-1,1), but all the predicted coords are negative floats:
and the heatmap seems strange:
the visualization results:
![image](https://user-images.githubusercontent.com/7944350/50737263-fb2fec80-1201-11e9-8da2-fa4429221f15.png)
The text was updated successfully, but these errors were encountered: