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.58k stars 1.48k forks source link

False Result in Prediction #206

Closed NaeemKhan333 closed 3 years ago

NaeemKhan333 commented 3 years ago

@xuebinqin Thanks for nice work . I have trained the u2net model on the custom created person data set . It works perfectly on the images which have person inside it. But it also mask, some parts of those images which have only background , person does not exist inside it . How I can tackle the false result of prediction . I have more than 5k person images with variety of background in the training set . Should I need to add simple background(without person inside it) images into train set. Please suggest me some way to remove false results . thanks

xuebinqin commented 3 years ago

Hi, thanks for your interest. According to our experience, including more images without human foregrounds may degrade the performance. But it also depends on how you train the model and what loss you will use. The other problem of adding more dataset is you have to retrain the segmentation model and it will take you several days.

I think the simplest ways are : (1) build a small network before the u2net and try to predict if there are human in the image. or (2) build a small network after the u2net and try to predict the cropped patches from input images by the prediction of u2net. Both ideas should be easy to implement and train.

On Thu, May 20, 2021 at 5:06 PM NaeemKhan333 @.***> wrote:

@xuebinqin https://github.com/xuebinqin Thanks for nice work . I have trained the u2net model on the custom created person data set . It works perfectly on the images which have person inside it. But it also mask, some parts of those images which have only background , person does not exist inside it . How I can tackle the false result of prediction . I have more than 5k person images with variety of background in the training set . Should I need to add simple background(without person inside it) images into train set. Please suggest me some way to remove false results . thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/206, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORKT3EREATQ3JLMURYLTOUCNBANCNFSM45G7FCFQ .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

NaeemKhan333 commented 3 years ago

@xuebinqin Thanks for response . As per answer , I understand that I need to add another network (detection or classification) before/after the u2net network to predict whether human exist or not . Am I right? If yes than my question is adding another network before/after u2net network, slow down the speed of inference?

xuebinqin commented 3 years ago

you can try some tiny networks, which may take several milliseconds for the inference. I don't think that will reduce the speed significantly.

On Fri, May 21, 2021 at 12:53 PM NaeemKhan333 @.***> wrote:

@xuebinqin https://github.com/xuebinqin Thanks for response . As per answer , I understand that I need to add another network (detection or classification) before/after the u2net network to predict whether human exist or not . Am I right? If yes than my question is adding another network before/after u2net network, slow down the speed of inference?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/206#issuecomment-845796469, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORJAQSITCYBWVFEJIKTTOYNRXANCNFSM45G7FCFQ .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/

NaeemKhan333 commented 3 years ago

@xuebinqin can you suggest me any good network which is light weight for fulfilling this purpose. Secondly should I need to train this network as well ?

NaeemKhan333 commented 3 years ago

@xuebinqin I have seen another model which is Google meet segmentation model . They have not use any other network for resolving the above mentioned issue . They tackle the problem (when human does not exist) using the segmentation model , not with any extra model . You can check a demo app developed for google meet person segmentation model.

Demo:

https://flect-lab-web.s3-us-west-2.amazonaws.com/P01_wokers/t11_googlemeet-segmentation/index.html

Code:

https://github.com/w-okada/image-analyze-workers/tree/master/011demo_googlemeet-segmentation-worker-js-demo

xuebinqin commented 3 years ago

Thanks for your comments. Of course, when you have a reasonably balanced large dataset and resources to retrain the model, solving the problem by the segmentation model is the best way.

On Fri, May 21, 2021 at 1:42 PM NaeemKhan333 @.***> wrote:

@xuebinqin https://github.com/xuebinqin I have seen another model which is Google meet segmentation model . They have not use any other network for resolving the above mentioned issue . They tackle the problem (when human does not exist) using the segmentation model , not with any extra model . You can check a demo app developed for google meet person segmentation model.

Demo:

https://flect-lab-web.s3-us-west-2.amazonaws.com/P01_wokers/t11_googlemeet-segmentation/index.html

Code:

https://github.com/w-okada/image-analyze-workers/tree/master/011demo_googlemeet-segmentation-worker-js-demo

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/206#issuecomment-845826324, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORNZH33X7XZU3XTCTTDTOYTHDANCNFSM45G7FCFQ .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/