-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Hello, I trained U-Net with one-class batches with the size of (128,128), and get prediction results of the size of (128,128). I would like to use Smoothly-Blend-Image-Patches
function to remove border artifacts in the prediction results of my trained U-Net model. My input images are 8-bit grayscale with a size of (799,799). When I use your function I have the following error:
WARNING:tensorflow:Model` was constructed with shape (None, 128, 128, 1) for input KerasTensor(type_spec=TensorSpec(shape=(None, 128, 128, 1), dtype=tf.float32, name='input_1'), name='input_1', description="created by layer 'input_1'"), but it was called on an input with incompatible shape (None, 128, 128, 3).
I applied #4 and #3 but still I have error. Which function should be changed to make this pipeline compatible with my U-Net model?
Thank you so much.
Update: I reshape my input image as follows:
input_img = io.imread('RatNeuron_5_666_Bw_2_5X.tif')
input_img = input_img.reshape((799,799,1))
And then could run the Smoothly-Blend-Image-Patches
function
But the prediction result is extremely changed.
- First image is my input image.
- Second image is the prediction result without using
Smoothly-Blend-Image-Patches
function. - Third image is the prediction result with
Smoothly-Blend-Image-Patches
function.