For some reason, even with simple cases, the masks I get back using the original UNet model (with padding) do not have the same intensity as the masks it was trained with. The shape of the masks infered by the UNet are very good, but it seems the intensity is always scaled at 80%-90% of the original masks intensity.
In my case, the intensity is pretty important as I want to extract signals mixed with noise. If the intensity is not scaled correctly, I can’t fully extract the signal or fully remove the noise.
I tried 2 approaches : training mix vs signal, and mix vs mask of the signal. Both approaches result in the same conclusion : great shape detection, and great intensity detection, but the intensity is always scaled by some ratio for a reason I don’t know.
The UNet model I’m using is as follow:
Contracting/Expanding Blocks: Conv2d, ReLU, DropOut, Conv2d, DropOut
Downsampling: MaxPool2d
Upsampling: ConvTranspose2d
For reference, here’s my UNet code: https://github.com/divideconcept/PyTorch-libtorch-U-Net/blob/master/unet.h 2
I apply padding (with zeroes) at each 3x3 Conv2d to avoid cropping the image. Could it because of that ?
My mix image values are always between [0 1], and so is the target signal image.