Image data generation method and device, storage medium and electronic equipment

By combining generative adversarial networks and convolutional neural networks, the problem of identifying subtle changes caused by different numbers of times a seal has been used in seal verification technology has been solved, achieving seal verification with high accuracy and high efficiency.

CN120976902APending Publication Date: 2025-11-18中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511112365.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing seal verification technologies cannot effectively identify subtle changes caused by different numbers of seal uses, which can easily lead to misjudgments.

Method used

A method combining generative adversarial networks and convolutional neural networks is adopted. By acquiring multiple historical image data for training, generated image data is produced. The trained neural network is then used to identify the target seal image and determine whether it is a counterfeit seal.

Benefits of technology

It improves the accuracy and efficiency of seal verification, reduces the false recognition rate, adapts to the natural wear and tear of seals over time, and solves the problem of difficulty in recognizing subtle changes caused by different numbers of seal uses in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976902A_ABST
    Figure CN120976902A_ABST
Patent Text Reader

Abstract

The invention provides an image data generation method and device, a storage medium and electronic equipment. The method comprises the steps that multiple pieces of historical image data are acquired; inputting the historical image data into a generative adversarial network for training to obtain multiple pieces of generated image data; inputting the historical image data, the authenticity label of the historical seal corresponding to the historical image, the generated image data and the authenticity label of the generated image in the generated image data as training data into a convolutional neural network for training to obtain a trained neural network; and adopting the trained neural network to identify a first target seal image, and determining whether a first target seal corresponding to the first target seal image is a forged seal or not. According to the method, through deep analysis and feature extraction of the seal image, high-accuracy identification of different ink intensities and line thicknesses is realized, so that the accuracy and efficiency of seal verification are improved, the error identification rate is reduced, and the method adapts to natural wear of the seal along with time change.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image recognition, and in particular, to a method for generating image data, a device for generating image data, a computer readable storage medium and an electronic device. BACKGROUND

[0002] In the bank seal inspection process, due to the influence of different seal conditions (such as the size of the force, the composition of the ink pad, the quality of the check paper and the hardness of the underlying material, etc.), different impressions of the same seal will also show changes in color uniformity, filling degree and stroke width. Especially when the bank seal is reserved, due to the new carving of the seal, the seal impression lines are relatively thick and the ink is relatively heavy. With the passage of time and the frequent use of the seal, the ink gradually becomes less and lighter, causing the seal impression lines to gradually become thinner and the ink to become lighter. The seal difference caused by the change in ink concentration often leads to the failure of automatic seal inspection.

[0003] At present, most electronic seal inspection systems rely on traditional image processing technology and simple pattern matching algorithms. These methods usually have problems such as insufficient data set samples, low seal inspection accuracy, and poor performance when dealing with complex seals or when the seal is slightly damaged. They cannot effectively identify subtle changes caused by different use times of the seal, and are prone to misjudgment. SUMMARY

[0004] The main purpose of the present application is to provide a method for generating image data, a device for generating image data, a computer readable storage medium and an electronic device to at least solve the problem that the existing seal verification technology cannot effectively identify subtle changes caused by different use times of the seal and is prone to misjudgment.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a seal identification method is provided, comprising: acquiring a plurality of historical image data, the historical image data comprising a plurality of historical images, the historical images being real historical use images of corresponding historical seals, the use times of each historical seal being different; inputting all the historical image data into a generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network; inputting all the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data and the authenticity labels of the generated images in the generated image data into a convolutional neural network as training data for training to obtain a trained neural network; identifying a first target seal image using the trained neural network and determining whether the first target seal corresponding to the first target seal image is a counterfeit seal.

[0006] Optionally, the plurality of historical image data is obtained by: obtaining a plurality of historical images of the historical seal, the historical images including at least an initial seal image, the initial seal image being an image of the first use of the historical seal; pre-processing each of the historical images to obtain pre-processed historical images; performing feature extraction on the pre-processed historical images by using image processing techniques to obtain corresponding feature data, the image processing techniques including at least edge detection techniques and threshold segmentation techniques, and the feature data including at least one of the following: a size of the historical seal corresponding to the historical image, line thickness, line shape, and line texture of the historical image; and determining the pre-processed historical images and the corresponding feature data as the historical image data.

[0007] Optionally, the pre-processing of each of the historical images to obtain pre-processed historical images includes: performing annotation processing on each of the historical images to obtain corresponding annotations, the content of the annotations of the historical images including at least a type of the corresponding historical seal and an ink concentration level of the historical image; performing digital processing on the historical images to obtain digital images, and unifying formats and resolutions of all the digital images into a standard format and a target resolution; performing data processing on the digital images to obtain processed data, the data processing including at least one of the following: cropping processing, noise removal processing, and contrast adjustment; and performing data enhancement on the processed data by using data enhancement techniques to obtain the pre-processed historical images, the data enhancement techniques including at least one of the following: image warping techniques, image scaling techniques, image rotation techniques, and color and light adjustment techniques.

[0008] Optionally, the inputting of all the historical image data into the generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network includes: determining, as training data of a discriminator of the generative adversarial network, all the historical image data; training, by inputting the training data into the discriminator of the generative adversarial network, to obtain generated image data, the discriminator being configured to determine whether the historical image data is a fake seal image; generating, by a generator of the generative adversarial network, an initial generated image according to the generated image data, the initial generated image including at least a generated fake seal image; determining, as training data of the discriminator of the generative adversarial network, all the initial generated images and all the historical image data, and repeating the training and the generation for a first preset number of times, and determining, as the generated image data, all the initial generated images.

[0009] Optionally, the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input as training data into a convolutional neural network for training to obtain a trained neural network, including: inputting the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data as training data into the convolutional neural network, sequentially passing through a convolutional layer, a pooling layer, a fully connected layer, and a classification model for prediction to obtain an initial prediction result; determining whether a current iteration number reaches a preset iteration number, in a case where the current iteration number does not reach the preset iteration number, continuing to train the convolutional neural network based on a loss function and an optimization function with all the initial prediction results as training data, and in a case where the current iteration number reaches the preset iteration number, determining the convolutional neural network obtained through current training as the trained neural network.

[0010] Optionally, after determining whether the target seal corresponding to the target seal image is a fake seal, the method further includes: obtaining new image data, the new image data at least including image data of an incorrectly recognized seal; updating a training data set of the generative adversarial network according to the new image data to obtain a first updated data set, and optimizing training the generative adversarial network using the first updated data set to obtain an optimized adversarial network; updating a training data set of a convolutional neural network according to the new image data and the optimized adversarial network to obtain a second updated data set, and optimizing training the convolutional neural network using the second updated data set to obtain an optimized neural network; recognizing a second target seal image using the optimized neural network, and determining whether a second target seal corresponding to the second target seal image is a fake seal.

[0011] Optionally, after recognizing a first target seal image using the trained neural network and determining whether a first target seal corresponding to the first target seal image is a fake seal, the method further includes: verifying the correctness of a recognition result of the trained neural network in real time, the recognition result being that the first target seal is a fake seal or that the first target seal is a correct seal; in a case where the recognition result is incorrect or the trained neural network fails to recognize successfully, repeatedly recognizing a second preset number of times using the trained neural network to obtain a repeated recognition result; in a case where all the repeated recognition results are incorrect or the trained neural network fails to recognize successfully all the time, determining that the recognition fails, and recording a recognition failure log.

[0012] According to another aspect of the present application, there is provided a seal identification device, comprising: an acquisition unit configured to acquire a plurality of historical image data, the historical image data comprising a plurality of historical images, the historical images being real historical use images of corresponding historical seals, each of the historical seals having different use times; a first training unit configured to input all of the historical image data into a generative adversarial network for training, to obtain a plurality of generated image data generated by the generative adversarial network; a second training unit configured to input, as training data, all of the historical image data, authenticity labels of the historical seals corresponding to the historical images in the historical image data, all of the generated image data, and authenticity labels of generated images in the generated image data into a convolutional neural network for training, to obtain a trained neural network; and a determination unit configured to identify a first target seal image using the trained neural network, and determine whether a first target seal corresponding to the first target seal image is a fake seal.

[0013] According to another aspect of the present application, there is provided a computer-readable storage medium comprising a stored program, wherein the program, when executed, controls a device in which the computer-readable storage medium is located to perform any of the seal identification methods.

[0014] According to another aspect of the present application, there is provided an electronic device comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs comprise instructions for performing any of the seal identification methods.

[0015] According to the technical solution of the present application, the above-mentioned generated image data method first acquires a plurality of historical image data, the historical image data comprising a plurality of historical images, the historical images being real historical use images of corresponding historical seals, each of the historical seals having different use times; the historical image data is input into a generative adversarial network for training, to obtain a plurality of generated image data; the historical image data, authenticity labels of the historical seals corresponding to the historical images, the generated image data, and authenticity labels of generated images in the generated image data are input as training data into a convolutional neural network for training, to obtain a trained neural network; and the trained neural network is used to identify a first target seal image, and determine whether a first target seal corresponding to the first target seal image is a fake seal. This method realizes high-accuracy identification of different ink density and line thickness through in-depth analysis and feature extraction of seal images, thereby improving the accuracy and efficiency of seal verification, reducing the rate of false identification, and adapting to natural wear of seals over time, solving the problem that existing seal verification technologies cannot effectively identify subtle changes caused by different use times of seals, and are prone to false judgments. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which form a part of the specification, are included to provide further understanding of the application and are incorporated herein in

[0017] Figure 1 A hardware structure block diagram of a mobile terminal for performing a method of generating image data according to an embodiment of the present application is shown;

[0018] Figure 2 A flowchart of a method of generating image data according to an embodiment of the present application is shown;

[0019] Figure 3 A flowchart of data collection and preprocessing according to an embodiment of the present application is shown;

[0020] Figure 4 A flowchart of neural network model enhanced training according to an embodiment of the present application is shown;

[0021] Figure 5 A flowchart of feedback and continuous training according to an embodiment of the present application is shown;

[0022] Figure 6 A flowchart of another method of generating image data according to an embodiment of the present application is shown;

[0023] Figure 7 A structure block diagram of a device for generating image data according to an embodiment of the present application is shown.

[0024] Among the above drawings, the following reference signs are included:

[0025] 102, processor; 104, memory; 106, transmission device; 108, input / output device. DETAILED DESCRIPTION

[0026] It should be noted that the embodiments and features of the embodiments in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0027] In order to enable a person skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person skilled in the art without creative labor should be within the scope of protection of the present application.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0029] For the convenience of description, the following describes some nouns or terms related to the embodiments of the present application:

[0030] Convolutional Neural Network: Convolutional Neural Network (CNN) is a deep learning architecture widely used in image and video recognition, image classification, object detection, etc. It simulates the working principle of human visual system, and can automatically and effectively learn the hierarchical features of images. CNN is composed of multiple layers, including convolutional layer, pooling layer (down-sampling layer) and fully connected layer. The convolutional layer is used to extract local features in the image, the pooling layer is used to reduce the feature dimension and enhance the generalization ability of the network, and the fully connected layer is used to output the classification or recognition result. The structure of CNN makes it efficient and accurate in processing large-scale image data.

[0031] Generative Adversarial Network: Generative Adversarial Network (GAN) is a deep learning model framework composed of two parts: generator and discriminator. The task of the generator is to create data (such as images) that can imitate real data as much as possible. The task of the discriminator is to distinguish between generated data and real data. These two parts are in mutual opposition in the training process, and are constantly optimized until the generator generates data that can deceive the discriminator. GAN has shown great application potential in image generation, style conversion, image enhancement, etc.

[0032] As introduced in the background, in modern commercial bank operations, seal verification as a key procedure is crucial to ensure the legality of transactions and the authenticity of identity. The traditional seal verification process relies on manual inspection, which is not only time-consuming but also prone to errors. With the development of technology, computer-aided electronic seal verification systems have been gradually introduced, which automatically identify seals using image processing and pattern recognition techniques. These systems require high accuracy and real-time performance, and can adapt to the differences between real seals while minimizing the pass rate of false seals. However, the existing technical solutions still have the following shortcomings:

[0033] 1. Insufficient data set samples: In the data set acquisition and preprocessing stage, the existing technology fails to collect enough diverse seal samples, especially without intentionally collecting seal samples used different number of times. This limits the comprehensiveness of model learning and may result in insufficient recognition ability of seals in different states.

[0034] 2. Low seal verification accuracy: In the neural network construction and training stage, only convolutional neural network (CNN) is used for training, which is limited by the diversity and quantity of data set samples, especially when facing complex counterfeit technology, which may result in low seal verification accuracy.

[0035] 3. Limited model optimization method: In the model optimization stage, the existing technology optimizes the model by repeatedly adjusting parameters, which may limit the maximization of model performance, as it fails to fully explore the improvement space of model structure or algorithm itself.

[0036] To solve the problem that existing seal verification technology cannot effectively identify subtle changes caused by different usage times of seals, which may lead to misjudgment, the embodiments of the present application provide a method of generating image data, a device for generating image data, a computer readable storage medium and an electronic device.

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application.

[0038] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the case of running on a mobile terminal, Figure 1 is a hardware structure block diagram of a mobile terminal of a method of generating image data according to an embodiment of the present application. As Figure 1 shown, the mobile terminal can include one or more Figure 1The mobile terminal can further include a transmission device 106 for communication function and an input / output device 108. Those skilled in the art can understand that, Figure 1 The structure shown is only schematic and does not limit the structure of the mobile terminal. For example, the mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components. Figure 1 The mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components. Figure 1 The mobile terminal can include more or less components than those shown, or have a different configuration or arrangement of the components.

[0039] The memory 104 is used for storing computer programs, such as software programs of application software and modules, for example, a computer program corresponding to the method for generating image data in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and the remote memory can be connected to the mobile terminal through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used for receiving or sending data via a network. The specific example of the network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used for communicating with the Internet in a wireless manner.

[0040] In the embodiments, a method for generating image data running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] Figure 2 is a flowchart of the method for generating image data according to the embodiments of the present application. As shown in Figure 2 the method includes the following steps:

[0042] Step S201, obtaining a plurality of historical image data, the historical image data comprising a plurality of historical images, the historical images being real historical use images of corresponding historical stamps, each of the historical stamps having different use times;

[0043] Specifically, stamp samples are collected from multiple sources, including newly engraved and long-term used stamps, to ensure that the samples cover various states of the stamps during the use period. To address the problem of limited data sets in the prior art, the collected stamp samples are ensured to comprehensively reflect the states of the stamps at different use stages, which greatly improves the generalization ability of the system and the accuracy of new stamp recognition.

[0044] To effectively improve the recognition accuracy of ink density changes in the electronic stamp verification process, the embodiment adopts a comprehensive data collection and preprocessing strategy to obtain a plurality of historical image data, including the following steps:

[0045] Step S301, obtaining a plurality of historical images of the historical stamp, the historical images at least including an initial stamp image, the initial stamp image being an image when the historical stamp is used for the first time;

[0046] Among them, in the stamp sample collection stage, the collection and labeling of two types of stamp samples are focused on. New stamp sample: collect newly engraved stamp images, which are characterized by thick lines and heavy ink marks. Stamp sample after being used for several times: collect stamp images after being used for several times regularly, which are characterized by lightening ink marks and more delicate lines.

[0047] Each sample is labeled with detailed time, recording the use frequency and duration for subsequent analysis.

[0048] Step S302, preprocessing each of the historical images to obtain preprocessed historical images;

[0049] Among them, preprocessing each of the historical images to obtain preprocessed historical images includes:

[0050] Step S3021, performing annotation processing on each of the historical images to obtain corresponding annotations, the content of the annotations of the historical images at least including the type of the corresponding historical stamp and the ink density level of the historical image;

[0051] Step S3022, performing digital processing on the historical image to obtain a digital image, and unifying the format and resolution of all the digital images to a standard format and a target resolution;

[0052] Among them, the collected stamp samples are digitized using a high-resolution scanner or a professional camera to ensure clear images that can accurately reflect the details of the stamp.

[0053] Step S3023, data processing step is performed on the above digitized image to obtain processed data, and the data processing step at least includes one of the following: cropping processing, denoising processing, contrast adjustment;

[0054] Step S3024, data enhancement is performed on the processed data by using a data enhancement technique to obtain the preprocessed historical image, and the data enhancement technique at least includes one of the following: image warping technique, image scaling technique, image rotation technique, and color and light adjustment technique.

[0055] Specifically, this can adapt to the change of ink density and enhance the model generalization ability.

[0056] Step S303, feature extraction is performed on the preprocessed historical image by using an image processing technique to obtain corresponding feature data, and the image processing technique at least includes edge detection technique and threshold segmentation technique, and the feature data at least includes at least one of the following: size of the historical seal corresponding to the historical image, line thickness, line shape, and line texture of the historical image.

[0057] Step S304, the preprocessed historical image and the corresponding feature data are determined as the historical image data.

[0058] Specifically, through comprehensive data collection and preprocessing, it is ensured that the collected data can truly reflect various states of the seal in the use cycle, including samples used different times, so as to improve the generalization ability and accuracy of the model.

[0059] Some embodiments, as shown in FIG. 1, Figure 3 The data collection and preprocessing includes the following steps:

[0060] 1. Seal sample collection: In the seal sample collection stage, the collection and labeling of two types of seal samples are focused on, new seal samples, collect new seal images, the feature is thick lines and heavy ink; seal samples used for several times, collect seal images used for several times, the feature is that the ink is light and the lines are more delicate. Label each sample with detailed time, record the usage frequency and duration for subsequent analysis.

[0061] 2. Data preprocessing: digitization, use a high-resolution scanner or a professional camera to digitize the collected seal samples, ensure that the image is clear and can accurately reflect the details of the seal; format unification and quality improvement, unify the image to a standard format and resolution, crop, denoise, and adjust the contrast.

[0062] 3. Data enhancement: To adapt to the change of ink density, enhance the generalization ability of the model, the following data enhancement techniques are adopted: image distortion, simulating deformation under the pressure of the seal; image scaling, adjusting the image size, simulating different scale seals; image rotation, reflecting different angles in the use of the seal; color and light adjustment, adapting to different ink and light conditions.

[0063] Step S202, input all the above historical image data into the generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network;

[0064] Specifically, the data enhancement training set generated by GAN is used to improve the recognition ability of the model to complex forgery techniques, thereby improving the accuracy of seal verification and the robustness of the model.

[0065] Among them, all the above historical image data are input into the generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network, including the following steps:

[0066] Determination step, all the above historical image data are determined as the training data of the discriminator of the generative adversarial network;

[0067] Training step, input the training data into the discriminator of the generative adversarial network for training to obtain generated image data, and the discriminator is used to determine whether the historical image data is a fake seal image;

[0068] Generation step, generating an initial generated image according to the generated image data through the generator of the generative adversarial network, and the initial generated image at least includes a generated fake seal image;

[0069] All the above initial generated images and all the above historical image data are determined as the training data of the discriminator of the generative adversarial network, and the training step and the generation step are repeatedly executed for a first predetermined number of times, and all the above initial generated images are determined as the generated image data.

[0070] Specifically, combining convolutional neural network (CNN) and generative adversarial network (GAN), the data enhancement training set generated by GAN is used to improve the recognition ability of the model to complex forgery techniques, thereby improving the accuracy of seal verification and the robustness of the model.

[0071] Step S203, input all the above historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the above generated image data, and the authenticity labels of the generated images in the generated image data into the convolutional neural network for training to obtain a trained neural network;

[0072] Specifically, the GAN is used to generate realistic fake seal images, which are part of the CNN training data, enhancing the model's recognition ability.

[0073] The historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input into the convolutional neural network as training data for training to obtain a trained neural network, including the following steps:

[0074] In step S2031, the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input into the convolutional neural network as training data, sequentially passing through the convolutional layer, the pooling layer, the fully connected layer, and the classification model for prediction to obtain an initial prediction result.

[0075] In step S2032, it is determined whether the current iteration number reaches the preset iteration number. If the current iteration number does not reach the preset iteration number, all the initial prediction results are used as training data and the convolutional neural network is continuously trained based on the loss function and the optimization function. If the current iteration number reaches the preset iteration number, the convolutional neural network obtained by the current training is determined as the trained neural network.

[0076] Specifically, an advanced neural network model combining CNN and GAN is adopted, which not only significantly improves the accuracy of identifying fake seals, but also enhances the robustness of the model through continuous training. Even in the face of highly complex and evolving fake technology, the system can maintain high performance.

[0077] To improve the accuracy and robustness of seal inspection, the present embodiment combines a convolutional neural network (CNN) and a generative adversarial network (GAN) neural network model for enhanced training. The GAN-generated data augmentation training set improves the model's ability to recognize complex fake technology, thereby improving the accuracy of seal inspection and the robustness of the model. As shown in Figure 4 The construction and training of the CNN model, the application of the GAN model, and how the two models work together to achieve the best recognition results include the following:

[0078] 1. CNN model construction and training:

[0079] To efficiently handle image recognition tasks, especially in the field of seal verification, the present application adopts CNN models in deep learning. CNN effectively extracts image features, including edges, textures, shapes, etc., through its multi-layer structure, making it particularly suitable for handling subtle differences caused by ink density changes in seal images.

[0080] Model selection: Based on the characteristics of seal images, AlexNet, VGGNet or ResNet architectures are selected. These models can capture simple to complex image features through their deep convolutional networks.

[0081] Training process: Using a large number of labeled seal image data, the parameters of the CNN model are gradually optimized through forward propagation and backpropagation algorithms. Special attention is paid to the model's ability to recognize seal lines under varying ink density, and the CNN structure is adjusted as needed to enhance its detail capture ability.

[0082] 2. GAN model training:

[0083] To improve the model's ability to recognize counterfeit seals, GAN is introduced for training. GAN consists of a generator and a discriminator, and through the adversarial training process, the model's generalization ability and adaptability to new counterfeit techniques are enhanced.

[0084] Generator training: Simulate real seal features, train the generator of GAN to create realistic counterfeit seal images for training and model verification.

[0085] Discriminator training: The discriminator is trained by distinguishing between real and generated counterfeit seal images, gradually improving its accuracy in distinguishing between real and fake. Construct a dataset of real and GAN-generated counterfeit seal images to train the discriminator to identify real and fake, and continuously optimize to improve discrimination accuracy.

[0086] 3. GAN and CNN collaborative work:

[0087] Including GAN-generated counterfeit seal images in the training dataset can significantly enhance the CNN model's ability to handle unknown counterfeit techniques. This not only improves the diversity of the dataset, but also through this training method, the model learns to capture and understand the complexity of seal images, especially in identifying subtle differences between real and fake seals. This complementary and collaborative training method greatly improves the performance and reliability of the seal verification system.

[0088] Step S204, using the trained neural network described above to identify the first target seal image, and determining whether the first target seal corresponding to the first target seal image is a counterfeit seal.

[0089] Specifically, the technical problems to be solved by the above steps mainly focus on improving the accuracy and efficiency of the seal verification process, especially for the problem of inconsistent line thickness caused by ink density changes during the use of the seal. The existing seal verification technology cannot effectively identify the subtle changes caused by different use times of the seal, which is prone to misjudgment. Therefore, the above steps achieve high-accuracy identification of different ink densities and line thicknesses through in-depth analysis and feature extraction of the seal image, thereby improving the accuracy and efficiency of seal verification, reducing the error recognition rate, and adapting to the natural wear of the seal over time.

[0090] After identifying the first target seal image using the trained neural network and determining whether the first target seal corresponding to the first target seal image is a counterfeit seal, the method further includes the following steps:

[0091] Step S401, verify the correctness of the identification result of the trained neural network in real time, and the identification result is that the first target seal is a counterfeit seal or that the first target seal is a correct seal;

[0092] Step S402, in the case that the identification result is incorrect or the trained neural network fails to identify, repeatedly identify a second preset number of times using the trained neural network to obtain a repeated identification result;

[0093] Step S403, in the case that the repeated identification results are all incorrect or have always failed to identify, determine that the identification has failed, and record an identification failure log.

[0094] Specifically, this can improve the accuracy of model identification.

[0095] After determining whether the target seal corresponding to the target seal image is a counterfeit seal, the method further includes the following steps:

[0096] Step S501, obtain new image data, and the new image data at least includes image data of an incorrectly identified seal;

[0097] Step S502, update the training data set of the generative adversarial network according to the new image data to obtain a first updated data set, and optimize and train the generative adversarial network using the first updated data set to obtain an optimized adversarial network;

[0098] Step S503, update the training data set of the convolutional neural network according to the new image data and the optimized adversarial network to obtain a second updated data set, and optimize and train the convolutional neural network using the second updated data set to obtain an optimized neural network;

[0099] Step S504, the second target seal image is identified by using the above-mentioned optimized neural network, and it is determined whether the second target seal corresponding to the second target seal image is a fake seal.

[0100] Specifically, the above-mentioned continuous optimization mechanism includes a powerful feedback mechanism and a periodic model updating strategy, so that the system can learn from the cases of identification failure and adapt to new seal styles and forgery methods over time. This not only solves the adaptability problem caused by one-time training in traditional systems, but also guarantees the accuracy and reliability of the system in long-term use, meeting the rapid development of business needs and security standards.

[0101] In some embodiments, as shown in Figure 5 The continuous optimization is realized by establishing a timely feedback mechanism and periodic model updating to maintain and improve the performance of the seal verification model. The specific steps are as follows:

[0102] 1. Feedback and continuous training: case collection, regularly collect and record the detailed information of seal verification failure, such as seal image quality, identification error type and occurrence time; analysis and improvement, in-depth analysis of failure cases, identify the factors leading to errors, such as image quality problems, ink concentration changes or seal wear, etc., and feed these findings back to the training set; model training, continue to train the model using the new case data to fine-tune and enhance its recognition ability for various seal states, improve the overall recognition accuracy and system robustness.

[0103] 2. Periodic model updating: data accumulation, continuously collect new seal samples and label them to expand and diversify the training data set; optimization training, retrain the neural network model using the updated data set, including adjusting network parameters and optimizing structure to adapt to new seal features; version control and verification, strict version control is implemented, and detailed performance evaluation is conducted for each model update to ensure that the update brings performance improvement and is confirmed before being deployed to the actual application environment.

[0104] 3. Performance monitoring and feedback loop: monitoring module, a special performance monitoring system is set up to track key performance indicators of the model in real time, such as accuracy and response time; feedback integration, integrate the data obtained by monitoring and user feedback for continuous optimization of the model, adjust in time to solve performance bottlenecks or user identification problems; update mechanism, ensure that feedback and monitoring data can be effectively imported into the model update process to promote the continuous improvement and adaptability of the seal verification model.

[0105] The above-mentioned embodiments establish a feedback mechanism and a periodic model updating strategy, analyze seal verification failure cases and re-integrate these cases into the training set, so that the model can learn from errors and continuously improve to adapt to new seal forgery techniques and seal changes.

[0106] The above image data generation method of the present application first acquires a plurality of historical image data, the historical image data including a plurality of historical images, the historical images being real historical use images of corresponding historical seals, the use times of the historical seals being different; then the historical image data is input into a generative adversarial network for training to obtain a plurality of generated image data; then the historical image data, the authenticity labels of the historical seals corresponding to the historical images, the generated image data and the authenticity labels of the generated images in the generated image data are input into a convolutional neural network as training data for training to obtain a trained neural network; finally, the trained neural network is used to recognize a first target seal image and determine whether a first target seal corresponding to the first target seal image is a fake seal. This method realizes high-accuracy recognition of different ink density and line thickness through in-depth analysis and feature extraction of seal images, thereby improving the accuracy and efficiency of seal verification, reducing the error recognition rate, and adapting to natural wear of seals over time. The method solves the problem that existing seal verification technologies cannot effectively recognize subtle changes caused by different use times of seals, which easily leads to misjudgment, and solves the limitations of existing technologies in data set comprehensiveness, seal verification accuracy and model optimization method.

[0107] In addition, the above embodiment can also be used in the financial field for bank account opening, check verification, etc. It can also be used in identifying various types of files for contract signing, file verification, etc. It can also be used in e-government for certificate verification, etc.

[0108] In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, the implementation process of the image data generation method of the present application will be described in detail below in conjunction with specific embodiments.

[0109] The present embodiment relates to a specific image data generation method, as shown in Figure 6 The method comprises the following steps:

[0110] 1. Comprehensive data collection and preprocessing:

[0111] Data collection: Collect seal samples from multiple sources, including newly engraved and long-term used seals, to ensure that the samples cover all states during the seal use period.

[0112] Data annotation and classification: Detailed annotation is performed on the collected seal samples to distinguish different types and ink density levels.

[0113] Preprocessing: including image grayscale conversion, denoising, standardization of size, etc. to facilitate subsequent processing.

[0114] 2. Feature extraction and fusion:

[0115] Feature Extraction: Apply image processing techniques such as edge detection and thresholding to extract key visual features of the seal (line thickness, shape, texture, etc.).

[0116] Feature Fusion: Combine the extracted features with other attributes of the seal (such as position, size) to form a more comprehensive and distinctive feature set, which helps improve the accuracy of subsequent recognition.

[0117] Feature Selection: Select the most helpful features for seal recognition through technical means (e.g., information gain-based selection method) to reduce model complexity and prevent overfitting.

[0118] 3. Enhanced Training of Neural Network Models:

[0119] CNN Model Training: Choose Convolutional Neural Networks (CNN) as the main neural network architecture, which is suitable for image recognition tasks.

[0120] GAN Model Training: Use the fake seal images generated by the Generative Adversarial Network (GAN) and the actual collected seal images to form the training data set together, increasing the diversity and richness of the training data.

[0121] Enhanced Training: The CNN model learns through a large number of training samples, adjusts internal weights, and optimizes model parameters to achieve high-accuracy seal recognition. The addition of GAN further improves the model's ability to identify complex forgery techniques.

[0122] 4. Integration of Seal Verification Models:

[0123] Real-time Verification Mechanism: Ensure that the model can quickly process real-time received seal images and perform accurate identification and verification.

[0124] Exception Handling Mechanism: Design an exception handling process, such as a retry mechanism and error log recording, to deal with seals that the model cannot identify or unexpected errors.

[0125] 5. Continuous Optimization:

[0126] Feedback Mechanism: Establish a feedback system to analyze cases of seal verification failure, re-integrate them into the training set for model training, so that the model learns from mistakes and continuously improves.

[0127] Regular Model Update: Regularly update and optimize the model through these newly collected data. This not only includes training with new samples, but also involves adjusting model structure or learning parameters based on performance feedback to ensure that the model can adapt to new seal features and possible forgery techniques.

[0128] The embodiment of the present application further provides a device for generating image data. It should be noted that the device for generating image data of the embodiment of the present application can be used to execute the method for generating image data provided by the embodiment of the present application. The device is used to realize the above-mentioned embodiment and preferred embodiment, and the description has been made and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiment is preferably realized in software, the realization of hardware or a combination of software and hardware is also possible and is conceived.

[0129] The device for generating image data provided by the embodiment of the present application is introduced below.

[0130] Figure 7 is a schematic diagram of the device for generating image data according to the embodiment of the present application. As shown in Figure 7 , the device comprises an acquisition unit 10, a first training unit 20, a second training unit 30 and a determination unit 40. The acquisition unit 10 is configured to acquire a plurality of historical image data. The historical image data comprises a plurality of historical images. The historical images are real historical use images of corresponding historical stamps. The use times of each historical stamp are different. The first training unit 20 is configured to input all the historical image data into a generative adversarial network for training, so as to obtain a plurality of generated image data generated by the generative adversarial network. The second training unit 30 is configured to input all the historical image data, real and fake labels of the historical stamps corresponding to the historical images in the historical image data, all the generated image data and real and fake labels of the generated images in the generated image data into a convolutional neural network as training data for training, so as to obtain a trained neural network. The determination unit 40 is configured to recognize a first target stamp image by using the trained neural network, and determine whether a first target stamp corresponding to the first target stamp image is a fake stamp.

[0131] The above image data generation device of the present application comprises an acquisition unit, a first training unit, a second training unit and a determination unit. The acquisition unit is configured to acquire a plurality of historical image data, wherein the historical image data comprises a plurality of historical images, and the historical images are real historical use images of corresponding historical stamps, and the use times of the historical stamps are different. The first training unit is configured to input the historical image data into a generative adversarial network for training to obtain a plurality of generated image data. The second training unit is configured to input the historical image data, the authenticity labels of the historical stamps corresponding to the historical images, the generated image data and the authenticity labels of the generated images in the generated image data into a convolutional neural network for training to obtain a trained neural network. The determination unit is configured to identify a first target stamp image using the trained neural network, and determine whether the first target stamp corresponding to the first target stamp image is a fake stamp. The device realizes high-accuracy identification of different ink density and line thickness through in-depth analysis and feature extraction of stamp images, thereby improving the accuracy and efficiency of stamp verification, reducing the error recognition rate, and adapting to natural wear of stamps over time. The device solves the problem that existing stamp verification technologies cannot effectively identify subtle changes caused by different use times of stamps, which easily leads to misjudgment.

[0132] In some embodiments, the acquisition unit comprises a first acquisition module, a preprocessing module, a feature extraction module and a first determination module. The first acquisition module is configured to acquire a plurality of historical images of the historical stamp, wherein the historical images at least comprise an initial stamp image, and the initial stamp image is an image when the historical stamp is used for the first time. The preprocessing module is configured to preprocess each of the historical images to obtain preprocessed historical images. The feature extraction module is configured to extract features from the preprocessed historical images using image processing techniques to obtain corresponding feature data, wherein the image processing techniques at least comprise edge detection techniques and threshold segmentation techniques, and the feature data at least comprises at least one of the following: the size of the historical stamp corresponding to the historical image, the line thickness, the line shape and the line texture of the historical image. The first determination module is configured to determine the preprocessed historical images and the corresponding feature data as the historical image data. Through comprehensive data collection and preprocessing, it is ensured that the collected data can truly reflect various states of the stamp during the use period, including samples used different times, thereby improving the generalization ability and accuracy of the model.

[0133] In some embodiments, the preprocessing module includes an annotation processing module, a digitization processing module, a data processing module, and a data enhancement module. The annotation processing module is configured to perform annotation processing on each of the historical images to obtain corresponding annotations. The annotations of the historical images include at least the type of the corresponding historical seal and the ink concentration level of the historical images. The digitization processing module is configured to perform digitization processing on the historical images to obtain digitized images, and unify the format and resolution of all the digitized images into a standard format and a target resolution. The data processing module is configured to perform data processing on the digitized images to obtain processed data. The data processing includes at least one of the following: cropping processing, noise removal processing, and contrast adjustment. The data enhancement module is configured to perform data enhancement on the processed data using a data enhancement technique to obtain the preprocessed historical images. The data enhancement technique includes at least one of the following: image warping, image scaling, image rotation, and color and light adjustment. In this way, the model generalization capability can be enhanced by adapting to changes in ink concentration.

[0134] In some embodiments, the first training unit includes a second determination module, a training module, a generation module, and a repeated execution module. The second determination module is configured to determine all the historical image data as training data for a discriminator of the generative adversarial network. The training module is configured to input the training data into the discriminator of the generative adversarial network for training to obtain generated image data. The discriminator is configured to determine whether the historical image data is a fake seal image. The generation module is configured to generate an initial generated image based on the generated image data using a generator of the generative adversarial network. The initial generated image includes at least a generated fake seal image. The repeated execution module is configured to determine all the initial generated images and all the historical image data as training data for the discriminator of the generative adversarial network, and repeatedly execute the training step and the generation step for a first predetermined number of times. All the initial generated images are determined as the generated image data. In combination with a convolutional neural network (CNN) and a generative adversarial network (GAN), a data enhancement training set generated by the GAN is used to improve the recognition capability of the model for complex fake techniques, thereby improving the accuracy of seal inspection and the robustness of the model.

[0135] In some embodiments, the second training unit comprises a first training module and a second training module. The first training module is configured to input all of the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all of the generated image data, and the authenticity labels of the generated images in the generated image data into the convolutional neural network as training data, sequentially pass through the convolutional layer, the pooling layer, the fully connected layer, and the classification model for prediction to obtain initial prediction results. The second training module is configured to determine whether the current iteration number reaches a preset iteration number. If the current iteration number does not reach the preset iteration number, all of the initial prediction results are taken as training data and the convolutional neural network is continuously trained based on a loss function and an optimization function. If the current iteration number reaches the preset iteration number, the convolutional neural network obtained through the current training is determined as the trained neural network. The advanced neural network model combining CNN and GAN is adopted, which not only significantly improves the accuracy of recognizing counterfeit seals, but also enhances the robustness of the model through continuous training.

[0136] In some embodiments, the device further comprises a second acquisition module, a first updating module, a second updating module, and a third determination module. The second acquisition module is configured to acquire new image data after determining whether the target seal corresponding to the target seal image is a counterfeit seal, wherein the new image data at least includes image data of incorrectly recognized seals. The first updating module is configured to update the training data set of the generative adversarial network according to the new image data to obtain a first updated data set, and optimize the training of the generative adversarial network using the first updated data set to obtain an optimized adversarial network. The second updating module is configured to update the training data set of the convolutional neural network according to the new image data and the optimized adversarial network to obtain a second updated data set, and optimize the training of the convolutional neural network using the second updated data set to obtain an optimized neural network. The third determination module is configured to recognize a second target seal image using the optimized neural network and determine whether a second target seal corresponding to the second target seal image is a counterfeit seal. The system can learn from cases of recognition failure and adapt to new seal styles and counterfeit methods over time.

[0137] In some embodiments, the device further comprises a verification module, a repeated identification module and a fourth determination module. The verification module is configured to verify the correctness of the identification result of the trained neural network in real time after the trained neural network is used to identify the first target seal image and determine whether the first target seal corresponding to the first target seal image is a fake seal. The identification result is that the first target seal is a fake seal or that the first target seal is a correct seal. The repeated identification module is configured to repeatedly identify a second preset number of times using the trained neural network in the case that the identification result is incorrect or the trained neural network fails to identify successfully, and obtain a repeated identification result. The fourth determination module is configured to determine that the identification fails and record an identification failure log in the case that the repeated identification result is incorrect or the trained neural network fails to identify successfully. In this way, the accuracy of model identification can be improved.

[0138] The device for generating image data comprises a processor and a memory. The acquisition unit and the like are stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory. The modules are located in the same processor, or the modules are located in different processors in any combination.

[0139] The processor comprises a core, and the core retrieves the corresponding program unit from the memory. One or more cores can be provided, and the problem that the existing seal verification technology cannot effectively identify the subtle changes caused by different use frequencies of the seal and is prone to misjudgment can be solved by adjusting the core parameters.

[0140] The memory can include a non-persistent memory in a computer readable medium, a random access memory (RAM) and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory comprises at least one memory chip.

[0141] The embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium comprises a stored program. When the program runs, the computer readable storage medium controls the device where the computer readable storage medium is located to execute the method for generating image data.

[0142] Specifically, the method for generating image data comprises:

[0143] In step S201, a plurality of historical image data is acquired. The historical image data comprises a plurality of historical images. The historical images are real historical use images of corresponding historical seals, and the use frequencies of the historical seals are different.

[0144] Specifically, seal samples are collected from multiple sources, including newly carved and long-term used seals, to ensure that the samples cover various states in the seal use cycle. To address the problem of limited data sets in the prior art, the collected seal samples are ensured to comprehensively reflect the state of the seal at different use stages, which greatly improves the generalization ability of the system and the accuracy of new seal identification.

[0145] Step S202, input all the above historical image data into the generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network;

[0146] Specifically, the data augmentation training set generated by GAN improves the model's recognition ability of complex forgery techniques, thereby improving the accuracy of seal verification and the robustness of the model.

[0147] Step S203, input all the above historical image data, the authenticity label of the above historical seal corresponding to the above historical image in the above historical image data, all the above generated image data and the authenticity label of the generated image in the above generated image data into the convolutional neural network for training to obtain the trained neural network;

[0148] Specifically, GAN generates realistic fake seal images, which are part of the CNN training data, to enhance the model's recognition ability.

[0149] Step S204, using the above trained neural network to identify the first target seal image and determine whether the first target seal corresponding to the first target seal image is a fake seal.

[0150] Specifically, the technical problems to be solved by the above steps are mainly focused on improving the accuracy and efficiency of the seal verification process, especially for the problem of inconsistent line thickness caused by ink density changes during seal use. The existing seal verification technology cannot effectively identify the subtle changes caused by different seal use times, which is prone to misjudgment. Therefore, the above steps achieve high-accuracy identification of different ink densities and line thicknesses through in-depth analysis and feature extraction of seal images, thereby improving the accuracy and efficiency of seal verification, reducing the error recognition rate, and adapting to natural wear of seals over time.

[0151] The embodiment of the application provides a processor, which is used for running a program, wherein the program performs the above generated image data method when running.

[0152] Specifically, the generated image data method comprises:

[0153] Step S201, obtaining a plurality of historical image data, the historical image data comprising a plurality of historical images, the historical images being real historical use images of corresponding historical stamps, each of the historical stamps having different use times;

[0154] Specifically, the stamp samples are collected from multiple sources, including newly engraved and long-term used stamps, to ensure that the samples cover all states of the stamps in the use cycle. To solve the problem of limited data sets in the prior art, the collected stamp samples can fully reflect the states of the stamps in different use stages, which greatly improves the generalization ability of the system and the accuracy of new stamp recognition.

[0155] Step S202, inputting all the historical image data into a generative adversarial network for training to obtain a plurality of generated image data generated by the generative adversarial network;

[0156] Specifically, the data augmentation training set generated by GAN is used to improve the recognition ability of the model to complex forgery techniques, thereby improving the accuracy of seal verification and the robustness of the model.

[0157] Step S203, inputting all the historical image data, the authenticity labels of the historical stamps corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data into a convolutional neural network for training to obtain a trained neural network;

[0158] Specifically, GAN is used to generate realistic fake stamp images, which are used as part of the CNN training data to enhance the recognition ability of the model.

[0159] Step S204, using the trained neural network to recognize a first target stamp image and determining whether a first target stamp corresponding to the first target stamp image is a fake stamp.

[0160] Specifically, the technical problems to be solved by the above steps mainly focus on improving the accuracy and efficiency of the stamp verification process, especially for the problem of inconsistent line thickness caused by changes in ink density during stamp use. The existing stamp verification technology cannot effectively identify the subtle changes caused by different use times of the stamp, which is prone to misjudgment. Therefore, the above steps achieve high-accuracy recognition of different ink densities and line thicknesses through in-depth analysis and feature extraction of stamp images, thereby improving the accuracy and efficiency of seal verification, reducing the error recognition rate, and adapting to natural wear of the stamp over time.

[0161] An embodiment of the present application provides a device, the device comprising a processor, a memory, and a program stored on the memory and executable on the processor, the processor implementing at least the following steps when executing the program:

[0162] In step S201, a plurality of historical image data is acquired, the historical image data including a plurality of historical images, the historical images being real historical use images of corresponding historical seals, the use times of the historical seals being different;

[0163] In step S202, all the historical image data is input into a generative adversarial network for training, to obtain a plurality of generated image data generated by the generative adversarial network;

[0164] In step S203, all the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input into a convolutional neural network as training data for training, to obtain a trained neural network;

[0165] In step S204, the trained neural network is used to identify a first target seal image, and it is determined whether a first target seal corresponding to the first target seal image is a fake seal.

[0166] The device herein can be a server, a PC, a PAD, a mobile phone, etc.

[0167] The application also provides a computer program product adapted to execute a program including at least the following method steps when executed on a data processing device:

[0168] In step S201, a plurality of historical image data is acquired, the historical image data including a plurality of historical images, the historical images being real historical use images of corresponding historical seals, the use times of the historical seals being different;

[0169] In step S202, all the historical image data is input into a generative adversarial network for training, to obtain a plurality of generated image data generated by the generative adversarial network;

[0170] In step S203, all the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input into a convolutional neural network as training data for training, to obtain a trained neural network;

[0171] In step S204, the trained neural network is used to identify a first target seal image, and it is determined whether a first target seal corresponding to the first target seal image is a fake seal.

[0172] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with a general purpose computer, and can be centralized in a single computer or distributed among a network of computers, and can be implemented with program code executable by a computer, and thus can be stored in a storage device and executed by a computer, and in some cases, the steps shown or described can be executed in a different order than shown or described, or can be implemented as separate integrated circuit modules or as a single integrated circuit module, and thus the application is not limited to any particular combination of hardware and software.

[0173] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the application can be in the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage media, etc.) embodying computer readable program code.

[0174] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams.

[0175] The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams.

[0176] The flowchart illustrations and / or block diagrams of the methods, apparatus (systems) and computer program products described herein can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams.Figure 1 one or more processes and / or functions specified in one or more blocks Figure 1 one or more processes and / or functions specified in one or more blocks

[0177] In one typical arrangement, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0178] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0179] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0180] It should also be noted that the terms "comprising", "containing", or any other variant thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0181] From the above description, it can be seen that the above-mentioned embodiments of the present application achieve the following technical effects:

[0182] 1) The above image data generation method of the present application first acquires a plurality of historical image data, the historical image data including a plurality of historical images, the historical images being real historical use images of corresponding historical stamps, the use times of the historical stamps being different; then the historical image data is input into a generative adversarial network for training to obtain a plurality of generated image data; then the historical image data, the authenticity labels of the historical stamps corresponding to the historical images, the generated image data and the authenticity labels of the generated images in the generated image data are input into a convolutional neural network as training data for training to obtain a trained neural network; finally, the trained neural network is used to identify a first target stamp image and determine whether the first target stamp corresponding to the first target stamp image is a fake stamp. This method realizes high-accuracy identification of different ink density and line thickness through in-depth analysis and feature extraction of stamp images, thereby improving the accuracy and efficiency of stamp verification, reducing the error recognition rate, and adapting to natural wear of stamps over time, solving the problem that existing stamp verification technology cannot effectively identify subtle changes caused by different use times of stamps, which easily leads to misjudgment.

[0183] 2) The above image data generation device of the present application comprises an acquisition unit, a first training unit, a second training unit and a determination unit, the acquisition unit is used to acquire a plurality of historical image data, the historical image data including a plurality of historical images, the historical images being real historical use images of corresponding historical stamps, the use times of the historical stamps being different; the first training unit is used to input the historical image data into a generative adversarial network for training to obtain a plurality of generated image data; the second training unit is used to input the historical image data, the authenticity labels of the historical stamps corresponding to the historical images, the generated image data and the authenticity labels of the generated images in the generated image data into a convolutional neural network as training data for training to obtain a trained neural network; the determination unit is used to use the trained neural network to identify a first target stamp image and determine whether the first target stamp corresponding to the first target stamp image is a fake stamp. This device realizes high-accuracy identification of different ink density and line thickness through in-depth analysis and feature extraction of stamp images, thereby improving the accuracy and efficiency of stamp verification, reducing the error recognition rate, and adapting to natural wear of stamps over time, solving the problem that existing stamp verification technology cannot effectively identify subtle changes caused by different use times of stamps, which easily leads to misjudgment.

[0184] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A seal recognition method, characterized in that, include: Acquire multiple historical image data, which include multiple historical images. Each historical image is a real historical image of the corresponding historical seal, and the number of times each historical seal has been used is different. All the historical image data are input into a generative adversarial network for training, resulting in multiple generated image data generated by the generative adversarial network. All the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are used as training data and input into a convolutional neural network for training to obtain the trained neural network. The trained neural network is used to identify the first target seal image and determine whether the first target seal corresponding to the first target seal image is a counterfeit seal.

2. The method according to claim 1, characterized in that, Acquire multiple historical image data, including: Acquire multiple historical images of the historical seal, wherein the historical images include at least an initial seal image, which is the image taken when the historical seal was first used; Each of the historical images is preprocessed to obtain the preprocessed historical images; The image processing technology is used to extract features from the preprocessed historical image to obtain corresponding feature data. The image processing technology includes at least edge detection technology and threshold segmentation technology. The feature data includes at least one of the following: the size of the historical seal corresponding to the historical image, the line thickness, line shape, and line texture of the historical image. The preprocessed historical images and the corresponding feature data are determined as the historical image data.

3. The method according to claim 2, characterized in that, Each of the historical images is preprocessed to obtain a preprocessed historical image, including: Each of the historical images is annotated to obtain corresponding annotations. The annotations for the historical images include at least the type of the corresponding historical seal and the ink density level of the historical image. The historical images are digitized to obtain digital images, and the format and resolution of all the digitized images are unified to a standard format and target resolution; The digitized image is subjected to data processing steps to obtain processed data. The data processing steps include at least one of the following: cropping, noise reduction, and contrast adjustment. The processed data is augmented using data augmentation techniques to obtain the preprocessed historical image. The data augmentation techniques include at least one of the following: image distortion, image scaling, image rotation, and color and lighting adjustment.

4. The method according to claim 1, characterized in that, All the historical image data are input into a generative adversarial network for training, resulting in multiple generated image data sets, including: The steps involve determining all the historical image data as training data for the discriminator of the generative adversarial network. The training step involves inputting training data into the discriminator of the generative adversarial network for training to obtain generated image data. The discriminator is used to determine whether the historical image data is a forged seal image. The generation step involves generating an initial generated image based on the generated image data using the generator of the generative adversarial network. The initial generated image includes at least the generated image of the forged seal. All the initially generated images and all the historical image data are determined as the training data for the discriminator of the generative adversarial network, and the training step and the generation step are repeated a first preset number of times, and all the initially generated images are determined as the generated image data.

5. The method according to claim 1, characterized in that, All the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input as training data into a convolutional neural network for training, resulting in a trained neural network, including: All the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data are input into the convolutional neural network as training data. The network is then passed through convolutional layers, pooling layers, fully connected layers, and a classification model in sequence to make predictions and obtain initial prediction results. Determine whether the current iteration number has reached the preset iteration number. If the current iteration number has not reached the preset iteration number, use all the initial prediction results as training data and continue to train the convolutional neural network based on the loss function and optimization function. If the current iteration number has reached the preset iteration number, determine the currently trained convolutional neural network as the trained neural network.

6. The method according to claim 1, characterized in that, After determining whether the target seal corresponding to the target seal image is a counterfeit seal, the method further includes: Acquire new image data, which includes at least image data of incorrectly identified seals; The training dataset of the generative adversarial network is updated based on the newly added image data to obtain a first updated dataset, and the generative adversarial network is optimized and trained using the first updated dataset to obtain an optimized adversarial network. The training dataset of the convolutional neural network is updated based on the newly added image data and the optimized adversarial network to obtain a second updated dataset. The convolutional neural network is then optimized and trained using the second updated dataset to obtain an optimized neural network. The optimized neural network is used to identify the second target seal image and determine whether the second target seal corresponding to the second target seal image is a counterfeit seal.

7. The method according to claim 1, characterized in that, After using the trained neural network to identify the first target seal image and determining whether the first target seal corresponding to the first target seal image is a counterfeit seal, the method further includes: The correctness of the recognition result of the trained neural network is verified in real time, wherein the recognition result is either that the first target seal is a counterfeit seal or that the first target seal is a valid seal; If the recognition result is incorrect or the trained neural network fails to recognize successfully, the trained neural network is used to repeat the recognition a second preset number of times to obtain a repeated recognition result. If all repeated identification results are incorrect or identification fails at all, identification failure is determined and an identification failure log is recorded.

8. A seal recognition device, characterized in that, include: The acquisition unit is used to acquire multiple historical image data, which includes multiple historical images. The historical images are real historical usage images of the corresponding historical seals, and the number of times each historical seal has been used is different. The first training unit is used to input all the historical image data into the generative adversarial network for training, so as to obtain multiple generated image data generated by the generative adversarial network. The second training unit is used to input all the historical image data, the authenticity labels of the historical seals corresponding to the historical images in the historical image data, all the generated image data, and the authenticity labels of the generated images in the generated image data as training data into the convolutional neural network for training, so as to obtain the trained neural network. The determining unit is used to identify the first target seal image using the trained neural network and determine whether the first target seal corresponding to the first target seal image is a counterfeit seal.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the seal recognition method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including methods for performing the seal recognition method according to any one of claims 1 to 7.