CPC G06T 5/50 (2013.01) [G06T 7/90 (2017.01); G06V 10/267 (2022.01); G06V 10/774 (2022.01); G06T 2207/20224 (2013.01)] | 20 Claims |
1. A method of performing image inpainting by an electronic device to reconstruct a region in an input image to be reconstructed, the method comprising:
determining a missing region in an original image;
generating an input image to be reconstructed from the original image, based on the determined missing region, wherein the missing region is a portion of the input image having a smaller size than the input image;
obtaining a mask image indicating the missing region;
determining whether to extract a structural feature of the missing region, based on an attribute of the missing region;
obtaining, based on the determination to extract the structural feature, structure vectors by applying the input image and the mask image to a first model to extract the structural feature of structures in the input image, wherein the structure vectors include structure vectors of the missing region, and represent the structural feature, with each structure vector including one or more lines and one or more junctions; and
obtaining an inpainted image in which the missing region in the input image is reconstructed by applying the input image, the mask image, and a structure vector image converted from the structure vectors to a second model for reconstructing the input image.
|