# Context-Encoder-Based Image Inpainting for Ancient Chinese Silk
## 5 Conclusions  
This study explored the application of Context-Encoder-based image restoration algorithms to effectively restore damaged ancient silks, offering ample room for imagination. It primarily discussed the research progress in Context-Encoder-based image restoration algorithms using a dataset of ancient Chinese silk samples. Three Context-Encoder-based models--LISK, MADF, and MEDFE--were employed to repair damaged patterns in ancient Chinese silks, followed by a comprehensive evaluation of the results. The findings suggest that MADF outperforms the other two methods in subjective visual quality and objective quantitative measures. The specific results are as follows:  
1. In the realm of subjective visual assessment, the multitask architecture of LISK markedly surpasses the MEDFE method in synthesizing more plausible structures and enriched details. This phenomenon may be attributed to the introduction of a structural embedding scheme and an attention mechanism within the LISK model. The structural embedding scheme provides essential structural information of the image, while the self-attention mechanism leverages similar patterns within the image to further refine the generated structures and textures. Further improvements can be seen with the MADF method, which augments detail while preserving crisp and seamless edges across expansive and intricate areas of damage.  
2. Our quantitative analysis showed that, across a suite of 48 evaluation metrics, the MADF method outperforms in 32 metrics, whereas the LISK method leads in 16; notably, the MEDFE method does not predominate in any metrics. This underscores the limitation of relying solely on PSNR and SSIM as quantitative metrics when holistically evaluating restoration efficacy.  
3. In user-based evaluations, MADF is favored when comparing real images, choosing the best among the three models, and during pairwise comparisons. This improvement can be attributed to the adoption of the MADF module. The MADF module dynamically generates customized convolution kernels for each of convolution windows based on  
Figure 9: Application demonstration on damaged ancient Chinese silk.  
the corresponding mask information. Furthermore, this method incrementally refines the restoration results through a cascaded approach, thus significantly enhancing the performance of image restoration.  
4. For large missing regions, all three models are less effective owing to very limited contextual information; the models tend to fill these areas with smooth content based on the surrounding environment and fail to generate the missing content accurately.  
Conceptualization, Q.W., M.S. and F.Z.; methodology, Q.W., M.S. and F.Z.; software, Q.W.; validation, M.S., S.H. and F.Z.; formal analysis, all authors; research, Q.W. and M.S.; resources, M.S. and F.Z.; data curation, all authors; writing--preparation of the original draft, all authors; drafting--revising and editing, all authors; visualization, Q.W. and M.S.; supervision, F.Z.; project management, M.S. and F.Z. All authors have read and agreed to the published version of the manuscript.  
This work was funded by The National Key Research and Development Program of China (Grant number: 2019 YFC1521301); The National Social Science Fund of China (Grant number: 20 WYSB006); and The Zhejiang Science and Technology Projects of Cultural Relics Protection (Grant number: 2021016).  
Not applicable.  
The database and code may be made available for use upon prior request and approval of the authors. The data are not publicly available due to privacy.  
The first author would like to thank Zhejiang Sci-Tech University for the scholarship given.  
The authors declare no conflicts of interest.