-
Notifications
You must be signed in to change notification settings - Fork 42
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
about the edge_lable #42
Comments
Thank you for your question! Yes, the hard threshold could lead to discrete edge pixels. However, I think it won't matter much for the training procedure, since in HED, the edge prediction is treated as a dense prediction task: Assume we have 100x100 label map, which contains 10000 pixels. Even if we mark all edge pixels correctly, they still have a limited quantity compared with background pixels (e.g. 100 edge pixels and 9900 background pixels). In HED, weighted cross-entropy is used to balance the edge pixels and background pixels (coefficient of edge pixels vs. background pixels in loss: 9900 vs. 100). Thus, if we have half of the edge pixels marked correctly (e.g. 50 pixels), then we will have 9950 background pixels. The 50 false negatives has a very small proportion of 9950 background pixels, which won't have much contribution to the negative loss in the weighted cross-entropy loss. |
I remove the code |
I think it may work. You can compare the results before and after removing the code and see the change of performance. |
when the net get the edge_lable :
edge[edge < 127.5] = 0.0
edge[edge >= 127.5] = 1.0
but i found that after filtering, most pixels become 0 like:
Will this affect the training?
thank you!
The text was updated successfully, but these errors were encountered: