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

数据加载edge_dataloader.py中把GT像素变为0\1\2,为什么像素值有2那? #28

Open
lian666-ch opened this issue Feb 23, 2022 · 4 comments

Comments

@lian666-ch
Copy link

        lb[lb == 0] = 0
        lb[np.logical_and(lb>0, lb<threshold)] = 2
        lb[lb >= threshold] = 1

作者您好,打扰了
我在阅读您的代码时发现,会把GT的像素变为含2的情况。我印象里一般处理为(0和1)的二值图。这我有些不明白了,期待并且谢谢您的回答!

@zhuoinoulu
Copy link
Collaborator

不好意思,现在才回答。 2的作用是让像素不参与loss的计算,因为一般认为2对应的像素的标签不确定

@zhuoinoulu
Copy link
Collaborator

@lian666-ch
Copy link
Author

嗯嗯 我明白了,谢谢您

@Kyridiculous1993
Copy link

        lb[lb == 0] = 0
        lb[np.logical_and(lb>0, lb<threshold)] = 2
        lb[lb >= threshold] = 1

作者您好,打扰了 我在阅读您的代码时发现,会把GT的像素变为含2的情况。我印象里一般处理为(0和1)的二值图。这我有些不明白了,期待并且谢谢您的回答!

您好!我自己制作的数据集mask也是二值图。请问这里的lb标签和utils.py代码的L147-L151该如何修改呢?谢谢!

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

3 participants