Image inpainting, a crucial technology in computer vision and image processing, aims to fill damaged or missing regions of an image with plausible content. Current deep learning-based inpainting methods often struggle with large missing areas and complex textures due to limited receptive fields or inadequate global context capture. To address these challenges, this paper proposes an image inpainting method based on optimized global perception. The method employs a three-stage network framework, incorporating coarse inpainting, local refinement and global refinement networks. In the first stage, an encoder-decoder structure with a large receptive field is used to generate a coarse inpainting result. The second stage utilizes dynamic convolution and fast Fourier convolution residual blocks to refine local textures and structures while capturing global context. Finally, the third stage introduces an attention-based global refinement network to enhance the overall consistency and quality of the inpainted image. Experimental results on the CelebA, Paris StreetView and Places2 datasets demonstrate that the proposed method achieves significant improvements in PSNR, SSIM and LPIPS metrics, outperforming existing inpainting networks. The qualitative results also show that the method can effectively restore fine details and complex textures, even for large missing regions.