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

2 class segmentation prediction values don't range from [0, 1] #286

Open
ellenemerson opened this issue Nov 4, 2019 · 1 comment
Open

Comments

@ellenemerson
Copy link

Hello,

I am working on a 2 class grayscale image segmentation problem. I am using the ImageDataProvider to load the input and labels, and everything seems to work fine with that as far as I can tell. The problem is that the prediction values for one class always range from [0, 0.5], and the values for the other class range from [0.5, 1]. From my understanding, they should range from [0, 1].

For example, say I run predict() and it gives me an array of shape (1, 256, 256, 2). Following the toy_problem, if I do:
class_0 = prediction[0,...,0]
class_1 = prediction[0,...,1]
class_0 values will range from [0.5, 1] and class_1 values will range from [0, 0.5]. From experimenting with the toy_problem it seems like both should range from [0, 1].

Anyone have any ideas what might be causing this?

Thanks in advance for your suggestions.

@ellenemerson
Copy link
Author

Is it possible that the probability space is stratified by the number of classes? And that you have to divide the probability value from prediction[0,...,1] by the value from prediction[0,...,0] to get the true probability value?

The number ranges I am seeing would make logical sense for this, and I tried this and got somewhat reasonable results, but I can't find any documentation of this anywhere.

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