ML_IDCard_Segmentation-TF-Keras
ML_IDCard_Segmentation-TF-Keras copied to clipboard
Getting black images as output for all images while running code in Jupyter notebook.
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?
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.
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?