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

Getting black images as output for all images while running code in Jupyter notebook. #7

Open
arunrathore45 opened this issue Apr 2, 2022 · 2 comments

Comments

@arunrathore45
Copy link

And also there was problem with load_model so I replaced with tf.keras.models.load_model then i checked prediction, predictions coming zero for every image. Any solution?

@tobiassteidle
Copy link
Owner

Hi,
the project is already more than 2 years old.
If you had problems with load_model and replaced it, I assume that you are using a newer version of TF?!
Maybe the prediction is not working correctly.

Another possibility is that you have to adjust the threshold.
In the line: data["mask"] = cv2.threshold(np.array(img), 200, 255, cv2.THRESH_BINARY)[1]

Pls check if the output of the prediction is really completely 0, or if maybe just the thresholds don't match.

@mohamedabdallah1996
Copy link

I am using the same version of tensorflow from the requirements file and tried to adjust the threshold but nothing changed, the predicted image is always black. please any recommendation?

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