Replace masked segmented region with given image

Hello Guys ,

I’m working on individual project based on ,

  1. Computer vision

  2. Image segmentation and masking

  3. replacement of segmented region According user given image

Currently I’m stucked at image replacement part ,

Query image :-

(Sorry I unable to share query image beacuse of Jovian ml rules)

I wanted to replace new image on floor region.
How can I do that ?

Thanks ,