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

A strange phenomenon #60

Open
Billy-ZTB opened this issue Apr 5, 2024 · 0 comments
Open

A strange phenomenon #60

Billy-ZTB opened this issue Apr 5, 2024 · 0 comments

Comments

@Billy-ZTB
Copy link

Billy-ZTB commented Apr 5, 2024

Hello! Thanks for providing the code, I discovered a strange thing while I was using this repo to do boundary detection. It was something about the label images. My label images was generated from semantic segmentation labels by discovering boundaries of different objects. Things went well when I use boundary labels generated by canny operation in cv2, but when I used seg2edge function in matlab to generate boundary with radius=2(to get thicker boundary), the loss didn't decrease and the model couldn't learn boundary information. The loss function I was using is weighted_cross_entropy_loss in this repo. I have no idea how the boundary's thickness would influence the training process, could you please provide your opinion?

Using edge from canny:
canny
image
It can be seen that the loss is decreasing gradually.

Using thicker boundary:
radius=2
image
batch-109-1st-image
Loss wouldn't decrease, it goes 4 times bigger than that in epoch1 after several epochs. Both two types of boundaries are binary boundary(edge pixels=1, non-edge=0). I was using pretrained parameters 'hed_pretrained_bsds.py36pickle'.

I am new in this field and I am not familiar with the mechanism of binary cross entropy loss. Could you please give me some hint? Looking forward to your reply! 😊

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

1 participant