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.49k stars 1.46k forks source link

label format #292

Open xiyufeng2 opened 2 years ago

xiyufeng2 commented 2 years ago

I have a question about label format during trainging. data_loader.py line250: if(3==len(label_3.shape)): label = label_3[:,:,0] When the input label is RGB image, only the first dimension is taken as GT. Why? I think it is reasonable to convert RBG label into gray image to act as GT.

xuebinqin commented 2 years ago

every channel of the GT mask contains only 0 or 255. we don't need to convert from rgb, because the conversion probably introduce more values than just 0 and 255.

On Mon, Mar 7, 2022 at 6:06 AM xiyufeng2 @.***> wrote:

I have a question about label format during trainging. data_loader.py line250: if(3==len(label_3.shape)): label = label_3[:,:,0] When the input label is RGB image, only the first dimension is taken as GT. Why? I think it is reasonable to convert RBG label into gray image to act as GT.

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/292, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORP524NMEX4APIDQX7TU6VQA3ANCNFSM5QB6SGNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

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/