<p>The easiest solution is to just threshold the result at some threshold value (I used 0.5 for convenience). However, you can use dice loss as in <a href="https://arxiv.org/abs/1608.04117" rel="nofollow noreferrer">https://arxiv.org/abs/1608.04117</a> (keras implementation can be found here: <a href="https://github.com/raghakot/ultrasound-nerve-segmentation" rel="nofollow noreferrer">https://github.com/raghakot/ultrasound-nerve-segmentation</a>), which tends to produce binary outputs. If the final result is better than using thresholding on the binary crossentropy output depends on your dataset though.</p>
Result of binary segmentation is blurred images
<p>I am working on a binary segmentation problem for which I have to segment the nuclei from the cells. I am using binary cross entropy as loss function with U-Net CNN model. The resultant images got some blurry effects. The more number of epochs I run the experiment, the more blurriness occurs. What leads to result such blurry effect and what change should I make to my model to get rid of that?</p>

<p>I have attached one sample resultant image produced after 4 epochs.
<a href="https://i.stack.imgur.com/FmscI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FmscI.png" alt="enter image description here"></a></p>