Closed Oushesh closed 6 years ago
Hi Oushesh:
The method is applied on the final result which is the mask itself to determine the foreground and background. Ideally the result of each pixel should be a distributed between 0 and 1 (background and foreground) with a 0.5 as the threshold. Due to the real results may not well distribute as 0.5 as a center so you can make a threshold by yourself or rely on Otsu algorithm which is suggested by the author to distinguish the distributions of foreground and background pixels. You can get more detail about the algorithm from wiki. https://en.wikipedia.org/wiki/Otsu%27s_method
Of course, you can leave the mask file with raw data/value between [0, 1] or transform it to only 0 or 1. Most of image reader can show the mask but you have no idea about how the reader interprets the foreground and background in first case.
Let me know if you still have questions.
script file: test.py --> function threshold_mask
Why did you use the threshold_otsu filter? During segmentation normally you are not supposed to use any manually defined filter since it will make the network lose valuable information?