SamsungLabs / image_harmonization

[WACV2021] Foreground-aware Semantic Representations for Image Harmonization https://arxiv.org/abs/2006.00809
Mozilla Public License 2.0
266 stars 42 forks source link

Way to use only part of the background for harmonization. Transparent images harmonization #8

Closed Vozf closed 1 year ago

Vozf commented 2 years ago

If we use 2 transparent images and try to harmonize them with each other we will have to fill the transparent regions with some color. If we use black color the harmonized image will become darker because of that. Is there a way to select only part of the background for harmonization(non-transparent part of the transparent image)? Like additional mask for instance. If not is there a preffered way to fill the transparent regions when harmonizing transparent images?

polyhex-sqr commented 1 year ago

Hi @Vozf

Is there a way to select only part of the background for harmonization(non-transparent part of the transparent image)? Like additional mask for instance.

Our current model does not support such an input, however you can try to train your own from scratch. My guess is you will have to augment training data with partly transparent background and add the background mask to the network input along with an image and an object mask.

is there a preffered way to fill the transparent regions when harmonizing transparent images?

I would try filling the transparent background areas with random values first, so that the filled areas have neutral lighting and colours

Vozf commented 1 year ago

Thanks for the response