open-solution-mapping-challenge
open-solution-mapping-challenge copied to clipboard
How do you compute the second nearest distance?
Hi, I have some issue understanding your code. I saw you use the scipy.morphology transform_distance_edt to calculate the nearest distance but where do you calculate the second nearest one ? since the weights will depending on the second nearest and the first nearest distance, if I understand it correctly.
In the code, the second nearest one is directly taken from the distance matrix dim 1 by calling
Could anyone help me out with this? Thanks in advance
Hi, I was looking into the the same part now. My opinion is that they used the second closest object distances to see if these pixels count into the predefined border width of the buildings. This was probably done because, at first, they tried eroding the ground truth masks and this was probably a reconstruction method for small chunks separated from the gt masks after erosion.
like this code snippet. In the winning configuration, they didn't use it as quoted under what didn't work in their poster:
× What didn't Work
- Ground truth masks are prepared by first eroding them per mask creating non overlapping masks and only after that the distances are calculated.
I have no idea why they didnt use the closest distance or total distance though:) Did you figure this part out?
Hi @lunaalvarez, in reality, we wanted to be close to what people did in the original U-Net paper. And then as we were experimenting added new things.
I think an alternative simple distance calculation was used and worked really well (and was easier/faster) here https://spark-in.me/post/a-small-case-for-search-of-structure-within-your-data.
I hope this helps.
Hi, Thank you for your quick reply. The gitter discussion was actually very helpful all around. Thanks again!
You are welcome, for some reason I was unwatched from this repo for many months and because of that I was silent, sorry @windson87 :(