The existing image inpainting methods, such as traditional darkroom techniques and Photoshop inpainting techniques, all require time-consuming manual restoration. The use of automatic restoration functions often result in incomplete predicted restoration structures, leading to unsatisfactory restoration results. To effectively solve this issue, our project first allows users to simulate the damaged area (masked area) of a photo by simply covering it with a brush. Then, we use Local Binary Pattern (LBP) Learning Network to generate the predicted region repair structure through the Unet++ framework and learn the image and spatial information through Gated Convolution with Spatial Attention. We finally use the Coarse-to Fine method to perform Image Inpainting Network to repair the masked region. Compared with the results of our project, the prediction results of Photoshop and the referenced work are less accurate in repairing the existing structure, and the latter also has obvious color difference. In addition, compared with the referenced work, the repair results of this project were improved by 2.4% and 14.6% to 0.9848 and 38.82 in terms of SSIM and PSNR, respectively.