xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.64k stars 1.49k forks source link

Hello, I'm a student of Tsinghua University. I found that running unet2_ test. The values of the image generated by py file are not all 0 and 255, but also some values between 0 and 255. I want to ask why. Usually, the segmentation result is not only two values, that is, 0 or 255 #319

Open xianglei3 opened 2 years ago

xianglei3 commented 2 years ago

Hello, I'm a student of Tsinghua University. I found that running unet2_ test. The values of the image generated by py file are not all 0 and 255, but also some values between 0 and 255. I want to ask why. Usually, the segmentation result is not only two values, that is, 0 or 255

DUT-CSJ commented 2 years ago

The saliency map generated by model is between 0 and 1 (*255 to be 0 to 255). If you want saliency map to be binary, you should set a threshold(>threshold be 255, <threshold be 0).

xuebinqin commented 2 years ago

usually, probability maps are generated. you need to binarize them.

On Tue, Jul 19, 2022 at 12:35 AM xianglei3 @.***> wrote:

Hello, I'm a student of Tsinghua University. I found that running unet2_ test. The values of the image generated by py file are not all 0 and 255, but also some values between 0 and 255. I want to ask why. Usually, the segmentation result is not only two values, that is, 0 or 255

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/319, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORMBXURVR6DCVFXA4JTVUZLDTANCNFSM5365VWDA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage: https://xuebinqin.github.io/