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

Question about Bilater_voting in connect_loss.py #5

Open
JaronTu opened this issue Aug 5, 2023 · 2 comments
Open

Question about Bilater_voting in connect_loss.py #5

JaronTu opened this issue Aug 5, 2023 · 2 comments

Comments

@JaronTu
Copy link

JaronTu commented Aug 5, 2023

Hi, thanks for your brilliant work! I'd like to ask about "pred_mask, _ = torch.max(vote_out, dim=2)" in function Bilater_voting in connect_loss.py. In my opinion, this transforms the connectivity map to prediction map, but what is the logic of this operation?

@Zyun-Y
Copy link
Owner

Zyun-Y commented Aug 5, 2023

Good question. Yes, it transforms the connectivity map into the prediction map.

The logic is that as long as one direction gets connected from the current pixel (since we are taking max), we assume it is part of the connected region (i.e., salient/positive).

You might see a difference in our original paper about this part where we used an 8-channel average to get the prediction map - the logic behind that one was that we wanted an average high probability of the connection from all its 8-direction neighboring pixels. Both work well but in our later studies [1][2], we found doing the max one gives even better results globally.

A similar idea can be found in the pooling methods: max-pooling and average-pooling - max doing better since it simply gets the strongest signal.

[1]Z. Yang, S. Soltanian-Zadeh, K. K. Chu, H. Zhang, L. Moussa, A. E. Watts, N. J. Shaheen, A. Wax, and S. Farsiu, “Connectivity-based Deep Learning Approach for Segmentation of the Epithelium in In Vivo Human Esophageal OCT Images,” Biomed. Opt. Express, vol. 12, no. 10, pp. 6326-6340, 2021.
[2] Z. Yang, S. Farsiu, "Directional Connectivity-based Segmentation of Medical Images", in CVPR 2023

@JaronTu
Copy link
Author

JaronTu commented Aug 6, 2023

I get it! Thanks for your detailed explanation!

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

2 participants