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

Does the edge detection task have an impact on the semantic segmentation task in this model? #16

Open
fatfatfatmouse opened this issue Apr 11, 2023 · 1 comment

Comments

@fatfatfatmouse
Copy link

fatfatfatmouse commented Apr 11, 2023

Sorry to bother you again.

1.Are semantic segmentation task and edge detection task independent of each other? Or do they have mutual influence?
My own thoughts:
In auto_weight_bce loss, the value of loss.mean() is the combination of two tasks(if the output_channel == 2).

2.What does the “beta” in auto_weight_bce loss mean?
My own thoughts:
It seems to have changed the shape of the target tensor from (B,C,H,W) to (B,C,1,1).
I guess it gave a weight to the two channels of each image in the batchsize.But I'm not sure why you're doing this?
Can we make the sum of the weights of the two channels of each predicted image at different resolution levels equal to 1 by doing this?

@khdlr
Copy link
Owner

khdlr commented Apr 12, 2023

  1. They are in fact two independent loss terms. The auto_weight_bce loss function calculates both in parallel for efficiency.
  2. Beta is equivalent to the term $|Y_+| / |Y_+ \cup Y_-|$ from eq. 1 in the paper. The purpose of this term is to adaptively weight the loss contributions of both classes to be equal. This is done because the classes are very imbalanced, especially for the edge detection task.

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