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

PBA Distance Transform using NPP returns non-exact EDT. #213

Open
jeanchristopheruel opened this issue Aug 27, 2024 · 5 comments
Open

PBA Distance Transform using NPP returns non-exact EDT. #213

jeanchristopheruel opened this issue Aug 27, 2024 · 5 comments
Labels

Comments

@jeanchristopheruel
Copy link

jeanchristopheruel commented Aug 27, 2024

Related to this topic
I followed the examples at https://github.com/NVIDIA/CUDALibrarySamples/tree/master/NPP/distanceTransform
In these examples, I set the first row a sites.

// nppiDistanceTransformPBA_8u32f_C1R_Ctx
[0]: 0 0 0 0 0 0 0 0 0 0
[1]: 1 1 1 1 1 1 1 1 1 1
[2]: 1 1 1 1 1 1 1 1 1 1
[3]: 3 3 3 3 3 3 3 3 3 3
[4]: 3 3 3 3 3 3 3 3 3 3
[5]: 4 4 4 4 4 4 4 4 4 4
[6]: 5 5 5 5 5 5 5 5 5 5
[7]: 6 6 6 6 6 6 6 6 6 6
[8]: 7 7 7 7 7 7 7 7 7 7
[9]: 8 8 8 8 8 8 8 8 8 8
[10]: 9 9 9 9 9 9 9 9 9 9
// nppiDistanceTransformAbsPBA_8u16u_C1R_Ctx
[0]: 0 0 0 0 0 0 0 0 0 0
[1]: 1 1 1 1 1 1 1 1 1 1
[2]: 1 1 1 1 1 1 1 1 1 1
[3]: 3 3 3 3 3 3 3 3 3 3
[4]: 3.5 3.5 3.5 3.5 3.5 3.5 3.5 3.5 3.5 3.5
[5]: 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5
[6]: 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5
[7]: 6.5 6.5 6.5 6.5 6.5 6.5 6.5 6.5 6.5 6.5
[8]: 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5
[9]: 8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5 8.5
[10]: 9.5 9.5 9.5 9.5 9.5 9.5 9.5 9.5 9.5 9.5
@JanuszL JanuszL added the NPP label Aug 27, 2024
@mkhadatare
Copy link
Contributor

Hi @jeanchristopheruel,

Thank you for reporting this issue. Could you please provide a small reproducible example along with details of your testing environment, including information about the GPUs, CUDA Toolkit version, and any other relevant configurations?

@soooch
Copy link

soooch commented Sep 11, 2024

Hey @mkhadatare I'm seeing the exact same issue on one system, but not on another. I am using nppiDistanceTransformPBA_8u32f_C1R_Ctx.

System with issue:
RTX 4070
CUDA/NPP version: 11.8

System without issue:
Jetson Orin Nano 4GB
CUDA/NPP version: 11.4

The nature of the issue is exactly as demonstrated in @jeanchristopheruel's post. Locations which should have distances of 2 are reported to have distances of 1. This appears to right itself at distance 3. Then at positions which should have distance 4, we see distance 3.5. Then the rate of the distance increments correctly, though the values themselves are incorrect. (3.5, 4.5, 5.5 where it should be 4, 5, 6)

@soooch
Copy link

soooch commented Sep 11, 2024

This is internally tracked at 4832970 btw.

@jeanchristopheruel
Copy link
Author

Woohoo thanks a lot for the followup!

@mkhadatare
Copy link
Contributor

Hi @soooch Thank you for reporting this. We are currently working on the issue under bug tracker ID 4832970 and will keep you updated on the progress.

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

No branches or pull requests

4 participants