Image recognition and processing is an important part of modern information technology. However, in real life, the face will inevitably be blocked by hats, masks, or face photos are damaged, scratches, and images are added mosaic and other reasons, resulting in face image masking, increasing face information recognition and processing difficulties. Image completion is a kind of technology to restore the missing information of obscured image. By supplementing the information of missing area, it can reduce the difficulty of image recognition and simplify the processing of face information.So it has important research significance for the restoration of shaded image. The traditional image completion technology produces the face of poor natural degree. At present, most of the popular completion methods combine depth learning, and the repair methods based on generating anti-network GAN are the representatives of them.But the stability of the network is poor, so it is difficult to train pictures with large sheltered area or poor image quality.Some methods are not effective in the completion of arbitrary shaded areas. Therefore, this study focuses on the improvement of the stability of the generated adversarial network and the maintenance of the global and local semantic consistency between the completion image and the real image. The main work includes: (1) Sets a special network structure of global discriminator and local discriminator. When the input is arbitrarily shaded, the completion image can maintain the consistency of global and local semantics. (2) The least square loss function is used to improve the stability of the GAN network. So it performs great when the input image has large area masking or low visualization degree. (3) ADAM algorithm is used to accelerate the training of neural network. (4) Based on the completion model, a human-computer interaction software is designed and developed, which includes data set selection, image selection, image completion, result evaluation and so on. The system is applied to the removal of facial structures such as wrinkles and spots. Compared with some existing software, the system can effectively remove the selected facial structures without image distortion. Based on the design of special network structure, the system improves the supervision ability of global and local completion, the stability of GAN network and enhances its training ability in large area masking. The system is intelligent and has strong completion ability for arbitrary masking and large area masking. The research results of this paper effectively restore the information loss caused by image masking and prepare favorable conditions for subsequent image recognition and processing.