journal article·2026-04-10Open access

Frequency-guided few-shot pattern inpainting for Ming Dynasty rank badges restoration

Wanli Zhang, Yi Zhang

npj Heritage Science· Volume 14· Issue 1

Abstract

Preserving rare and often damaged Ming Dynasty rank badges, exquisite fabric symbols of hierarchical status, presents significant challenges. To address the critical need for high-fidelity restoration of these intricate textiles, we propose a novel contrastive learning-based few-shot inpainting method leveraging Fourier consistency. This work focuses on overcoming challenges in fabric restoration for cultural heritage digitization and makes three key contributions: the creation of a comprehensive dataset of ancient Chinese fabrics; the incorporation of advanced frequency domain features for enhanced pattern understanding; and the development of an extended perceptual loss function to maintain the semantic integrity of complex designs. Quantitative performance metrics demonstrate the effectiveness of the proposed method, achieving an SSIM of 0.8912 with 95.4M parameters.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Generative Adversarial Networks and Image Synthesis · Computer Graphics and Visualization Techniques · 3D Shape Modeling and Analysis

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (39)

Show source-provided references
1. Huang, G., Laradji, I., Vazquez, D., Lacoste-Julien, S. & Rodriguez, P. A survey of self-supervised and few-shot object detection. IEEE Trans. Pattern Anal. Mach. Intell. 45, 4071–4089 (2023).
2. Bertalmio, M., Sapiro, G., Caselles, V. & Ballester, C. Image inpainting. In Proc. of the 27th Annual Conference on Computer Graphics and Interactive Techniques. 417–424 (ACM, New Orleans, LA, USA, 2000).10.1145/344779.344972 ↗
3. Criminisi, A., Pérez, P. & Toyama, K. Region filling and object removal by exemplar-based image inpainting. IEEE Trans. Image Process. 13, 1200–1212 (2004).10.1109/TIP.2004.833105 ↗
4. Barnes, C., Shechtman, E., Finkelstein, A. & Goldman, D. B. PatchMatch: a randomized correspondence algorithm for structural image editing. ACM Trans. Graph. 28, 24 (2009).10.1145/1531326.1531330 ↗
5. Pathak, D., Krähenbühl, P., Donahue, J., Darrell, T. & Efros, A. A. Context Encoders: Feature Learning by Inpainting. In Proc. IEEE Conference on Computer Vision and Pattern Recognition. 2536–2544 (IEEE, Las Vegas, NV, USA, 2016).10.1109/CVPR.2016.278 ↗
6. Iizuka, S., Simo-Serra, E. & Ishikawa, H. Globally and locally consistent image completion. ACM Trans. Graph. 36, 1–14 (2017).10.1145/3072959.3073659 ↗
7. Liu, G., Reda, F.A., Shih, K.J., Wang, TC., Tao, A. & Catanzaro, B. Image Inpainting for Irregular Holes Using Partial Convolutions. In Proc. of the European Conference on Computer Vision (ECCV). 85–100 (Springer, Munich, Germany, 2018).10.1007/978-3-030-01252-6_6 ↗
8. Yu, J., Lin, Z., Yang, J., Shen, X., Lu, X. & Huang, T. S. Free-form image inpainting with gated convolution. In Proc. IEEE/CVF International Conference on Computer Vision. 4471–4480 (IEEE, Seoul, Korea (South), 2019).10.1109/ICCV.2019.00457 ↗
9. Yu, J., Lin, Z., Yang, J., Shen, X., Lu, X. & Huang, T. S. Generative image inpainting with contextual attention. In Proc. IEEE Conference on Computer Vision and Pattern Recognition. 5505–5514 (IEEE, Salt Lake City, UT, USA, 2018).10.1109/CVPR.2018.00577 ↗
10. Xie, C. et al. Image inpainting with learnable bidirectional attention maps. In Proc. IEEE/CVF International Conference on Computer Vision. 8858–8867 (IEEE, Seoul, Korea (South), 2019).10.1109/ICCV.2019.00895 ↗
11. Zeng, Y., Fu, J., Chao, H. & Guo, B. Learning pyramid-context encoder network for high-quality image inpainting. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 1486–1494 (IEEE, Long Beach, CA, USA, 2019).10.1109/CVPR.2019.00158 ↗
12. Nazeri, K., Ng, E., Joseph, T., Qureshi, F. & Ebrahimi, M. EdgeConnect: Structure guided image inpainting using edge prediction. In Proc. of the IEEE/CVF International Conference on Computer Vision Workshop. 3265–3274 (2019).10.1109/ICCVW.2019.00408 ↗
13. Huang, Y. et al. Diffusion model-based image editing: a survey. IEEE Trans. Pattern Anal. Mach. Intell. 47, 4409–4437 (2024).10.1109/TPAMI.2025.3541625 ↗
14. Lugmayr, A. et al. RePaint: Inpainting using denoising diffusion probabilistic models. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 11461–11471 (IEEE, New Orleans, LA, USA, 2022).10.1109/CVPR52688.2022.01117 ↗
15. Ho, J., Jain, A. & Abbeel, P. Denoising diffusion probabilistic models. Adv. Neural Inf. Process. Syst. 33, 6840–6851 (2020).
16. Ho, J. & Salimans, T. Classifier-Free Diffusion Guidance. In Advances in Neural Information Processing Systems (NeurIPS) Workshop on ICBINB (2022).
17. Rombach, R. et al. High-resolution image synthesis with latent diffusion models. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 10684–10695 (IEEE, New Orleans, LA, USA, 2022).10.1109/CVPR52688.2022.01042 ↗
18. Song, J., Meng, C. & Ermon, S. Denoising Diffusion Implicit Models. In International Conference on Learning Representations (ICLR) (2021).
19. Xie, S. et al. SmartBrush: Text and shape guided object inpainting with diffusion model. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 1719–1728 (IEEE, Vancouver, Canada, 2023).10.1109/CVPR52729.2023.02148 ↗
20. Couairon, G., Verbeek, J., Schwartz, O. & Larlus, D. GradPaint: Gradient-guided inpainting with diffusion models. Comput. Vis. Image Underst. 239, 103811 (2024).
21. Zhao, Y., Jiang, X., Liang, J. & Loy, C. C. TurboFil!: Adapting few-step text-to-image model for fast image inpainting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2025).
22. Fei-Fei, L. et al. A Bayesian approach to unsupervised one-shot learning of object categories. In Proc. IEEE International Conference on Computer Vision. 1134–1141 (IEEE, Beijing, China, 2003).10.1109/ICCV.2003.1238476 ↗
23. Vinyals, O., Blundell, C., Lillicrap, T., Kavukcuoglu, K. & Wierstra, D. Matching networks for one shot learning. In Proc. of the 30th International Conference on Neural Information Processing Systems. 3637–3645 (Neural Information Processing Systems Foundation, Barcelona, Spain, 2016).
24. Shocher, A., Cohen, N. & Irani, M. Zero-shot super-resolution using deep internal learning. In Proc. IEEE Conference on Computer Vision and Pattern Recognition. 3118–3126 (IEEE, Salt Lake City, UT, USA, 2018).10.1109/CVPR.2018.00329 ↗
25. Zhang, H., Zhang, J. & Koniusz, P. Few-shot learning via saliency-guided hallucination of samples. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2770–2779 (IEEE, Long Beach, CA, USA, 2019).10.1109/CVPR.2019.00288 ↗
26. Liu, M. & Zhou, B. Innovative design of chinese traditional textile patterns based on conditional generative adversarial network. In Proc. International Conference on Human-Computer Interaction. 234–245 (Springer, Online, 2022).10.1007/978-3-031-05434-1_15 ↗
27. Wang, H., Li, Q. & Zou, Q. Inpainting of Dunhuang murals by sparsely modeling the texture similarity and structure continuity. J. Comput. Cult. Herit 12, 1–21 (2019).
28. Li, L. et al. Line Drawing-Guided Progressive Inpainting for Mural Damage. ACM J. Comput. Cult. Herit. 18, 1–20 (2025).10.1145/3737703 ↗
29. Zhou, Z. et al. Inpainting digital Dunhuang murals with structure-guided deep network. ACM J. Comput. Cult. Herit. 15, 1–25 (2022).10.1145/3532867 ↗
30. Qian, H., Zhu, H. & Qiao, J. Textile texture periodicity estimation base on frequency spectrum. In Proc. International Congress on Image and Signal Processing. 1–3 (IEEE, Tianjin, China, 2009).10.1109/CISP.2009.5303368 ↗
31. Zhang, W., Liu, M. & Chen, X. Advanced analytical techniques for heritage textiles. npj Herit. Sci. 12, 388 (2024).10.1186/s40494-024-01509-6 ↗
32. Criminisi, A., Perez, P. & Toyama, K. Advanced analytical techniques for heritage textiles. npj Herit. Sci. 2, 1200–1212 (2024).
33. Smith, G. D., Esson, J. M., Chen, V. J. & Hanson, R. M. The use of scientific analysis to reconstruct archaeological textiles from Dunhuang. npj Herit. Sci. 3, 634–650 (2025).
34. Zhong, S. TextileNet: A material taxonomy-based fashion textile dataset. Preprint at https://arxiv.org/abs/2301.06160 (2023).
35. Tena, S., Hartanto, R. & Ardiyanto, I. Content-based image retrieval for traditional Indonesian woven fabric images using a modified convolutional neural network method. J. Imaging 9, 165 (2023).10.3390/jimaging9080165 ↗
36. Chen, Q., Zhao, W., Wang, Q. & Zhao, Y. Research on the innovative application of Shen embroidery cultural heritage based on convolutional neural network. Sci. Rep. 14, 10035 (2024).
37. Zheng, C., Cham, T. & Cai, J. Pluralistic image completion. In Proc. IEEE Conference on Computer Vision and Pattern Recognition. 1438–1447 (IEEE, Long Beach, CA, USA, 2019).10.1109/CVPR.2019.00153 ↗
38. Dong, Q., Cao, C. & Fu, Y. Incremental transformer structure enhanced image inpainting with masking positional encoding. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 11358–11368 (IEEE, New Orleans, LA, USA, 2022).10.1109/CVPR52688.2022.01107 ↗
39. Li, W. et al. MAT: Mask-aware transformer for large hole image inpainting. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 10758–10768 (IEEE, New Orleans, LA, USA, 2022).10.1109/CVPR52688.2022.01049 ↗