Seal2Real: Prompt Prior Learning on Diffusion Model for Unsupervised Document Seal Data Generation and Realisation
Mingfu Yan, Jiancheng Huang, Shifeng Chen
TL;DR
Seal2Real tackles data scarcity in document-seal analysis by learning prompt priors on a pretrained diffusion framework to generate labeled seal data in an unsupervised setting. It introduces a two-stage process: first, prompt-prior learning to model distributions of real and forged seals via prompts $T_r$ and $T_f$ using the loss $\\mathcal{L}_{prompts}$, and second, a forger network trained with $\\mathcal{L}_{forger} = \\mathcal{L}_{prior} + w \\mathcal{L}_{content}$ to produce convincing forged seals; optionally refined through adversarial training. The authors present Seal-DB, a 20,000-image dataset with paired labels for segmentation and text recognition under seals, and demonstrate substantial improvements on downstream tasks (segmentation, authenticity classification, OCR) when trained with data generated by Seal2Real compared to traditional synthesis and competing diffusion methods. This work offers a scalable, unsupervised path to high-fidelity synthetic data for document-seal processing and points to extensions to other document elements such as signatures or stamps.
Abstract
Seal-related tasks in document processing-such as seal segmentation, authenticity verification, seal removal, and text recognition under seals-hold substantial commercial importance. However, progress in these areas has been hindered by the scarcity of labeled document seal datasets, which are essential for supervised learning. To address this limitation, we propose Seal2Real, a novel generative framework designed to synthesize large-scale labeled document seal data. As part of this work, we also present Seal-DB, a comprehensive dataset containing 20,000 labeled images to support seal-related research. Seal2Real introduces a prompt prior learning architecture built upon a pre-trained Stable Diffusion model, effectively transferring its generative capability to the unsupervised domain of seal image synthesis. By producing highly realistic synthetic seal images, Seal2Real significantly enhances the performance of downstream seal-related tasks on real-world data. Experimental evaluations on the Seal-DB dataset demonstrate the effectiveness and practical value of the proposed framework.
