Skip to content

Problems with Unet

Ankita Joshi edited this page Mar 9, 2018 · 1 revision

Problems with Unet

  • Not able to settle on a good library for Unet. Since we had less time, we did not want to code a Unet from scratch. So, we started with the tf_unet package, as it had train and predict functions and we could directly use them with our datasets.
  • Unet requires making masks for all the input images you give. So we created a set of masks from the input data. Mask is basically a binarized version of the input image.
  • tf_unet also needed the input to be in a specific format. All the training files and their corresponding masks have to be in the same folder. The input training file should be of the form name.tiff where as the corresponding mask file name should be name_mask.tiff. We had to prepare the masks with following the naming conventions of the library.
  • Got the problem of NaN values in our resulting images. (https://github.com/jakeret/tf_unet/issues/74)
  • We tried a few Unet models, which had difficulty in converging.
  • Collecting the regions after predicting the image segments, was by far the most difficult task we faced. We spent a lot of time trying to train a model with a good accuracy, and had very little time left to spend on getting the regions out of our best trained model.
  • This package does not provide any way to provide padding to the input images, or manipulating the patch sizes in the input.
  • Another important point, while using Unet, was to deal with the reduced size of the output image. the input images were all (512,512) but the output was (420,420). We rescaled the output images, but this could have affected our inclusion and exclusion accuracies.