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.34k stars 1.43k forks source link

How to desaturate background. Help needed. #302

Open schwarzwals opened 2 years ago

schwarzwals commented 2 years ago

Guys I need your help figuring this one out. test

I want to desaturate the background around the person. There's a lot of blue in it. How can I do that ? I have a lot of files like this.
Would appreciate some examples.

xuebinqin commented 2 years ago

hi,

I think you can try u2net (human segmentation model, for human overall shape segmentation) + pymatting (https://github.com/pymatting/pymatting, for getting hair matting) to achieve an relatively high quality alpha channel and then the background can be tuned or changed based on the alpha channel.

On Tue, Apr 12, 2022 at 4:25 AM schwarzwals @.***> wrote:

Guys I need your help figuring this one out. [image: test] https://user-images.githubusercontent.com/46636486/162936436-30daa702-f4c7-4d67-8a20-7b5fab8f15f3.jpg

I want to desaturate the background around the person. There's a lot of blue in it. How can I do that ? I have a lot of files like this. Would appreciate some examples.

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/302, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORODIZUQXZQQVLPD5OLVEVFP3ANCNFSM5TGTAHAQ . 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/

xuebinqin commented 2 years ago

or you can use rmbg directly: https://github.com/danielgatis/rembg, to see if that satisfies your requirements.

On Tue, Apr 12, 2022 at 6:39 PM Xuebin Qin @.***> wrote:

hi,

I think you can try u2net (human segmentation model, for human overall shape segmentation) + pymatting (https://github.com/pymatting/pymatting, for getting hair matting) to achieve an relatively high quality alpha channel and then the background can be tuned or changed based on the alpha channel.

On Tue, Apr 12, 2022 at 4:25 AM schwarzwals @.***> wrote:

Guys I need your help figuring this one out. [image: test] https://user-images.githubusercontent.com/46636486/162936436-30daa702-f4c7-4d67-8a20-7b5fab8f15f3.jpg

I want to desaturate the background around the person. There's a lot of blue in it. How can I do that ? I have a lot of files like this. Would appreciate some examples.

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/302, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORODIZUQXZQQVLPD5OLVEVFP3ANCNFSM5TGTAHAQ . 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/

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

schwarzwals commented 2 years ago

@xuebinqin I don't want to remove the background....i want to desaturate it...it has a lot of blue/magenta in it...and I thought that if you can have a good mask of a human, invert it and desaturate the rest....don't touch the human...is this possible ?

xuebinqin commented 2 years ago

yes, that is possible. human segmentation can be used to desaturate or change the color of the human and non-human regions based on your demands. Otherwise, your whole image will be desaturated which is probably not what you want.

On Wed, Apr 13, 2022 at 12:24 AM schwarzwals @.***> wrote:

@xuebinqin https://github.com/xuebinqin I don't want to remove the background....i want to desaturate it...it has a lot of blue/magenta in it...and I thought that if you can have a good mask of a human, invert it and desaturate the rest....don't touch the human...is this possible ?

— Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/302#issuecomment-1097605164, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORMRYP5VVKUCMA7WWSDVEZSALANCNFSM5TGTAHAQ . You are receiving this because you were mentioned.Message ID: @.***>

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