Contract seal text recognition method and device for parallel processing and medium
Through the parallel processing of contract seal text recognition method, the seal detection, correction and text recognition modules are used to automatically identify the seal text in the contract, solving the problems of low efficiency and poor accuracy of traditional manual review, and achieving rapid and accurate seal information extraction. Reduced contract management risks.
Patent Information
- Application Number
- CN202411293992.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional contract review method relies on manual page-by-page inspection, which is inefficient and prone to errors, increasing the risk of contract management, especially in the process of fiscal and tax management and business contract signing, which may lead to serious business risks.
Using parallel processing of contract seal text recognition method, the seal recognition model is constructed, including seal detection module, correction module and text recognition module, automatically locate and identify seals, process the circular ring image as a rectangular image, improve the recognition accuracy, and through Multi-channel processing improves efficiency.
It realizes the rapid and accurate extraction of seal text information, improves processing efficiency and identification accuracy, reduces the risk of manual review, and enhances the reliability of contract management.
Smart Images

Figure CN119229449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular to a method, device and medium for recognizing contract seal texts through parallel processing. Background Art
[0002] In business operations, the frequency of seal usage and the areas covered are increasing day by day. From daily business dealings, financial settlements to the signing of cooperation agreements for major projects, seals are everywhere, becoming a bridge of trust and commitment between enterprises. However, with the accelerated development of modern business activities, enterprises are faced with a large number of contract signing and filing tasks in their daily operations. The traditional contract review method - manually checking contract photos page by page to confirm whether both parties have correctly stamped the official seals - has gradually exposed the problems of inefficiency and high costs. On the one hand, manual review is time-consuming, which seriously slows down the speed of contract circulation and affects the operational efficiency of enterprises; on the other hand, manual review relies on individual concentration and accuracy, and is prone to errors due to fatigue or negligence, increasing the risk of contract management. Especially in the process of financial and tax management and business contract signing, the limitations of manual review may lead to serious business risks, such as contract disputes and financial losses.
[0003] Therefore, how to automatically recognize seal text becomes a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a parallel processing contract seal text recognition method, device and medium to solve the following technical problem: how to automatically recognize seal text.
[0005] In the first aspect, an embodiment of the present application provides a parallel processing method for contract seal text recognition, characterized in that the method includes: constructing a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; determining an object to be recognized, locating and cropping the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; processing the seal image based on the seal correction module, mapping the circular image into a rectangular image to obtain a corrected image; recognizing the corrected image based on the seal text recognition module to generate a seal text.
[0006] In one implementation of the present application, a seal recognition model is constructed, which specifically includes: constructing a seal detection module, a seal correction module and a seal text recognition module; obtaining seal data and seal samples; wherein the seal data is annotated seal data, and the seal sample is unannotated seal data; cleaning the seal sample and integrating it into the seal data to construct a seal training set; training the seal detection module, the seal correction module and the seal text recognition module based on the seal training set to construct a seal recognition module.
[0007] In one implementation of the present application, a seal sample is cleaned and integrated into seal data to construct a seal training set, specifically including: screening and labeling seal samples to obtain a first seal sample; wherein the first seal sample is a seal sample from which no seal content is removed; enhancing the first seal sample based on a preset image processing algorithm data to generate a second seal sample; and integrating the second seal sample into the seal data to construct a seal training set.
[0008] In one implementation of the present application, a seal detection module, a seal correction module and a seal text recognition module are trained based on a seal training set to construct a seal recognition module, specifically including: splitting the seal training set according to a preset ratio to generate a training set, a test set and a verification set; integrating the seal detection module, the seal correction module and the seal text module to construct a preliminary seal recognition module; training the preliminary seal recognition module based on the training set to generate a second seal recognition module; verifying the second seal recognition module based on the verification set to determine the accuracy of the second seal recognition module; when the accuracy is less than a preset accuracy threshold, modifying the parameters of the second seal recognition module and repeating the training until the accuracy is greater than or equal to the accuracy threshold, and outputting it as a seal recognition module to be tested; testing the seal recognition module to be tested based on the test set, and outputting it as a seal recognition module when the accuracy is greater than a preset test threshold.
[0009] In one implementation of the present application, an object to be processed is determined, and a seal of the object to be processed is located and cropped to generate a seal image, specifically including: identifying the object to be processed based on a seal detection module to locate the seal; processing the seal based on preset features to determine the range of the seal detection frame and the offset of the seal angle; and cropping the object to be processed based on the range of the seal detection frame and the offset of the seal angle to generate a seal image.
[0010] In one implementation of the present application, a seal image is processed based on a seal correction module, and the circular image is mapped into a rectangular image to obtain a corrected image, specifically including: preprocessing the seal image based on the seal correction module to generate a first corrected image; wherein the preprocessing includes at least one of the following: denoising, binarization and edge detection; identifying the seal image based on a preset Hough transform algorithm to determine the center and radius of the seal image; mapping the first corrected image to a rectangular area based on a preset polar coordinate transformation algorithm to generate a corrected image.
[0011] In one implementation of the present application, the first corrected image is mapped to a rectangular area based on a preset polar coordinate transformation algorithm to generate a corrected image, specifically including: according to the polar coordinate transformation algorithm, the pixel points on the first corrected image are mapped to corresponding pixel points on the rectangular area according to the distance between the pixel points and the center of the circle and the angle between the line connecting the pixel points with the center of the circle and the horizontal line to generate a corrected image.
[0012] In one implementation of the present application, a corrected image is identified based on a seal text recognition module to generate a seal text, specifically including: determining the number of channels and the channel order of the channels in the seal text recognition module; intercepting the corrected image based on the number of channels to generate multiple sub-corrected images; allocating the multiple sub-corrected images to different channels for identification based on the channel order to generate sub-recognition results; and integrating the sub-recognition results based on the channel order to generate a seal text.
[0013] In the second aspect, an embodiment of the present application also provides a parallel processing contract seal text recognition device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: construct a seal recognition model; wherein the seal recognition model comprises a seal detection module, a seal correction module and a seal text recognition module; determine an object to be recognized, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; process the seal image based on the seal correction module, map the circular image into a rectangular image to obtain a corrected image; recognize the corrected image based on the seal text recognition module to generate a seal text.
[0014] In the third aspect, the embodiment of the present application also provides a non-volatile computer storage medium for parallel processing of contract seal text recognition, which stores computer executable instructions, and the computer executable instructions are set to: construct a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; determine the object to be recognized, and locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; process the seal image based on the seal correction module, and map the circular image into a rectangular image to obtain a corrected image; recognize the corrected image based on the seal text recognition module to generate a seal text.
[0015] The embodiment of the present application provides a parallel processing contract seal text recognition method, device and medium, which have at least the following technical effects:
[0016] 1. Through parallel processing, multiple tasks can be processed simultaneously, thereby improving processing efficiency;
[0017] 2. By building a specialized seal recognition model, including a seal detection module, a seal correction module, and a seal text recognition module, each module is optimized for its specific task, thereby ensuring the accuracy of recognition. The seal detection module can accurately locate the seal position in the contract, the seal correction module can effectively correct the circular seal image into a rectangular image to facilitate subsequent text recognition, and the seal text recognition module can accurately recognize the corrected seal text;
[0018] 3. By splitting the seal recognition process into multiple modules, each module can be optimized and updated independently, thus improving the flexibility and scalability of the method;
[0019] 4. Able to quickly and accurately extract text information from the seal. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A flow chart of a contract seal text recognition method for parallel processing provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the internal structure of a parallel processing contract seal text recognition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0024] The embodiments of the present application provide a parallel processing contract seal text recognition method, device and medium to solve the following technical problem: how to automatically recognize seal text.
[0025] The technical solution proposed in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0026] Figure 1 A flowchart of contract seal text recognition for parallel processing provided in the embodiment of the present application. Figure 1 As shown, a parallel processing contract seal text recognition method provided by an embodiment of the present application specifically includes the following steps:
[0027] Step 1: Construct a seal recognition model, which includes a seal detection module, a seal correction module, and a seal text recognition module.
[0028] First, construct the seal detection module, seal correction module and seal text recognition module.
[0029] Seal detection module: The seal detection model can automatically locate the seal position in the object to be processed (such as a contract document), which is a prerequisite for subsequent correction and recognition steps.
[0030] Seal correction module: It can solve the deformation problem of seal images caused by shooting angle, light and other factors to a certain extent. By correcting the seal image to a standard shape (such as a rectangle), the accuracy of text recognition is greatly improved.
[0031] Seal text recognition module: can recognize and output the text information in the corrected seal image.
[0032] Furthermore, seal data and seal samples are obtained, wherein the seal data is the marked seal data, and the seal sample is the unmarked seal data.
[0033] Furthermore, the seal samples are cleaned and integrated into the seal data to construct a seal training set.
[0034] A1. Screen and label the seal samples to obtain the first seal sample. The first seal sample is the seal sample without seal content. By screening and removing the samples without seal content, it is ensured that the remaining seal samples are valid, which can improve the purity of the training data and enable the model to focus more on seal-related feature learning during training.
[0035] Labeling the screened samples can, to a certain extent, enable the model to understand the location and features of the seal during the training process, thereby improving the accuracy of seal detection.
[0036] A2. Data enhancement of the first seal sample based on a preset image processing algorithm to generate a second seal sample. Data enhancement is an existing technology for expanding data sets, which can generate new training samples by transforming the original image (such as rotation, scaling, translation, etc.). Data enhancement of the first seal sample can generate more second seal samples, thereby increasing the diversity and scale of the training set and improving the generalization ability of the model.
[0037] A3. Integrate the second seal sample into the seal data to construct a seal training set. Integrate the enhanced second seal sample with the original annotated seal data to construct a rich and comprehensive seal training set.
[0038] Furthermore, a seal detection module, a seal correction module and a seal text recognition module are trained based on the seal training set to construct a seal recognition module.
[0039] B1. Split the seal training set according to the preset ratio to generate training set, test set and validation set. Splitting the seal training set into training set, test set and validation set according to the preset ratio can ensure that the model has an independent data set for verification and testing during the training process to a certain extent, thereby objectively evaluating the performance and generalization ability of the model.
[0040] B2. Integrate the seal detection module, seal correction module and seal text module to build a preliminary seal recognition module. Integrate the seal detection module, seal correction module and seal text recognition module to form a preliminary seal recognition module.
[0041] B3. Train the preliminary seal recognition module based on the training set to generate the second seal recognition module. Use the training set to train the preliminary seal recognition module, and through continuous iteration and optimization, the model gradually learns the characteristics and recognition rules of the seal to generate the second seal recognition module.
[0042] B4. Verify the second seal recognition module based on the verification set to determine the accuracy of the second seal recognition module. The second seal recognition module is verified using the verification set to objectively evaluate the accuracy of the model.
[0043] B5. When the accuracy is less than the preset accuracy threshold, modify the parameters of the second seal recognition module and repeat the training until the accuracy is greater than or equal to the accuracy threshold, and output the seal recognition module to be tested. If the accuracy of the validation set is lower than the preset accuracy threshold, it means that the model needs to be further optimized. By adjusting the parameters of the model and repeating the training, the accuracy of the model can be continuously improved until it reaches or exceeds the preset threshold.
[0044] B6. Test the seal recognition module to be tested based on the test set, and output it as a seal recognition module when the accuracy is greater than the preset test threshold. After the model reaches the preset accuracy, use an independent test set to perform a final test on the model. If the accuracy of the test set also reaches or exceeds the preset test threshold, the model can be output as the final seal recognition module.
[0045] Step 2: determine the object to be identified, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image, wherein the seal image is a circular image.
[0046] First, the object to be processed is identified based on the seal detection module to locate the seal. The seal detection module trained in step 1 can automatically identify the seal position in the object to be processed. The accuracy of this step is crucial for subsequent operations because it directly determines the quality of the cropped seal image.
[0047] Furthermore, the seal is processed based on preset features to determine the range of the seal detection frame and the offset of the seal angle. By processing preset features (such as the "five-pointed star" graphic in the middle of the seal, the outer circle of the seal), the range of the seal detection frame, that is, the specific boundary of the seal in the image, can be accurately determined.
[0048] At the same time, the offset of the seal angle can be determined based on feature processing, that is, the rotation angle of the seal relative to the normal position.
[0049] Furthermore, the object to be processed is cropped based on the range of the seal detection frame and the offset of the seal angle to generate a seal image. According to the determined seal detection frame range and the offset of the angle, the seal image in the object to be processed can be accurately cropped.
[0050] The cropped seal image is in the shape of a ring, which conforms to the shape characteristics of most actual seals and is helpful for subsequent correction and recognition operations.
[0051] Step 3: Process the seal image based on the seal correction module, map the circular image into a rectangular image to obtain a corrected image.
[0052] First, the seal image is preprocessed based on the seal correction module to generate a first corrected image. The preprocessing includes at least one of the following: denoising, binarization, and edge detection. The seal image is preprocessed by the seal correction module, such as denoising, binarization, and edge detection, to remove interference factors in the image, highlight the outline and features of the seal, and provide more favorable conditions for subsequent recognition operations.
[0053] Furthermore, the seal image is identified based on a preset Hough transform algorithm to determine the center and radius of the seal image. The Hough transform algorithm can accurately identify the center and radius of the seal image, which is the basis for subsequent polar coordinate transformation.
[0054] Furthermore, the first corrected image is mapped to a rectangular area based on a preset polar coordinate transformation algorithm to generate a corrected image.
[0055] According to the polar coordinate transformation algorithm, the pixel points on the first corrected image are mapped to the corresponding pixel points on the rectangular area according to the distance between the pixel points and the center of the circle and the angle between the line connecting the pixel points with the center of the circle and the horizontal line to generate a corrected image. Through the polar coordinate transformation algorithm, the circular seal image can be mapped to a rectangular image. In this process, each pixel point is mapped to the corresponding position on the rectangular area according to its distance from the center of the circle and the angle with the horizontal line.
[0056] This mapping not only retains all the information in the seal image, but also makes the text that was originally distorted by the circular shape straight, thereby improving the accuracy of text recognition.
[0057] Step 4: Recognize the corrected image based on the seal text recognition module to generate the seal text.
[0058] First, determine the number and order of channels in the seal text recognition module. In the seal text recognition module, the number and order of channels are crucial for text recognition.
[0059] Furthermore, the rectified image is intercepted based on the number of channels to generate a plurality of sub-rectified images. According to the number of channels, the rectified seal image is intercepted into a plurality of sub-rectified images to facilitate subsequent recognition processing.
[0060] Furthermore, based on the channel order, multiple sub-rectified images are assigned to different channels for recognition to generate sub-recognition results. The intercepted sub-rectified images are assigned to different channels for recognition according to a predetermined channel order. This makes it possible to fully utilize the processing power of multiple channels and improve the efficiency and accuracy of text recognition.
[0061] Furthermore, the sub-recognition results are integrated based on the channel order to generate the seal text. The sub-recognition results obtained in each channel are integrated according to the channel order to generate the final seal text.
[0062] In a specific embodiment, a company receives a contract document and needs to perform seal text recognition. First, the trained seal detection module is used to automatically identify a circular seal in the lower right corner of the contract document, and the "five-pointed star" pattern in the middle of the seal and the outer circle contour of the seal are recognized, so as to accurately determine the boundary and rotation angle of the seal, and then crop the seal image in the object to be processed, and the cropped seal image is a circular ring.
[0063] The seal image is preprocessed by the seal correction module, including denoising, binarization and edge detection. This removes interference factors in the image to a certain extent, making the outline and features of the seal more prominent. The center and radius of the seal image are identified using the Hough transform algorithm. The circular seal image is mapped to a rectangular image using the polar coordinate transformation algorithm. In this process, each pixel is accurately mapped to the corresponding position on the rectangular area according to its distance from the center of the circle and the angle between the line connecting the center of the circle and the horizontal line, so that the text distorted by the ring shape becomes straight.
[0064] After the correction is completed, the corrected seal is recognized through the seal text recognition module. The seal text recognition module includes three channels. According to the number of channels, the corrected seal image is cut into three sub-corrected images. Each sub-image contains a part of the seal text.
[0065] Then, the sub-rectified images are assigned to different channels for recognition. Each channel independently recognizes the text content in the sub-image it is responsible for and generates a sub-recognition result.
[0066] Finally, the system integrates these sub-recognition results in channel order to generate the final seal text.
[0067] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, this application embodiment also provides a parallel processing contract seal text recognition device, whose structure is as follows: Figure 2 shown.
[0068] Figure 2 A schematic diagram of the internal structure of a parallel processing contract seal text recognition device provided in an embodiment of the present application. Figure 2 As shown, the device includes:
[0069] at least one processor 201;
[0070] and, a memory 202 communicatively connected to the at least one processor;
[0071] The memory 202 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 201 to enable at least one processor 201 to:
[0072] Construct a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; determine the object to be recognized, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; process the seal image based on the seal correction module, and obtain a corrected image from the seal image; recognize the corrected image based on the seal text recognition module to generate a seal text.
[0073] Some embodiments of the present application provide corresponding Figure 1 A non-volatile computer storage medium for parallel processing of contract seal text recognition, storing computer executable instructions, wherein the computer executable instructions are set as follows:
[0074] Construct a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; determine the object to be recognized, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; process the seal image based on the seal correction module, and obtain a corrected image from the seal image; recognize the corrected image based on the seal text recognition module to generate a seal text.
[0075] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the IoT device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0076] The system and medium provided in the embodiments of the present application correspond one-to-one to the method. Therefore, the system and medium also have similar beneficial technical effects to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the system and medium will not be repeated here.
[0077] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0078] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0081] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0082] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0083] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be 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 disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0084] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0085] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A parallel processing contract seal text recognition method, characterized in that: The method comprises: Constructing a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; Determine an object to be identified, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; Processing the seal image based on the seal correction module, mapping the circular image into a rectangular image to obtain a corrected image; The corrected image is recognized based on the seal text recognition module to generate a seal text.
2. A parallel processing contract seal text recognition method according to claim 1, characterized in that: Construct a seal recognition model, including: Construct seal detection module, seal correction module and seal text recognition module; Acquire seal data and seal sample; wherein the seal data is marked seal data, and the seal sample is unmarked seal data; Cleaning the seal sample and integrating it into the seal data to construct a seal training set; The seal detection module, the seal correction module and the seal text recognition module are trained based on the seal training set to construct a seal recognition module.
3. A parallel processing contract seal text recognition method according to claim 2, characterized in that: Cleaning the seal sample and integrating it into the seal data to construct a seal training set, specifically including: Screening and marking the seal samples to obtain a first seal sample; wherein the first seal sample is the seal sample without the seal content; Enhance the first seal sample based on preset image processing algorithm data to generate a second seal sample; The second seal sample is integrated into the seal data to construct a seal training set.
4. The method for recognizing contract seal text by parallel processing according to claim 2, characterized in that: The seal detection module, the seal correction module and the seal text recognition module are trained based on the seal training set to construct a seal recognition module, specifically including: Splitting the seal training set according to a preset ratio to generate a training set, a test set and a validation set; Integrating the seal detection module, seal correction module and seal text module to construct a preliminary seal recognition module; Training the preliminary seal recognition module based on the training set to generate a second seal recognition module; Verifying the second seal recognition module based on the verification set to determine the accuracy of the second seal recognition module; When the accuracy rate is less than a preset accuracy rate threshold, modify the parameters of the second seal recognition module and repeat the training until the accuracy rate is greater than or equal to the accuracy rate threshold, and output it as a seal recognition module to be tested; The seal recognition module to be tested is tested based on the test set, and is output as a seal recognition module when the accuracy is greater than a preset test threshold.
5. The method for contract seal text recognition by parallel processing according to claim 1, characterized in that: Determining an object to be processed, locating and cutting a seal of the object to be processed to generate a seal image, specifically includes: Identifying the object to be processed based on the seal detection module to locate the seal; Processing the seal based on preset features to determine the range of the seal detection frame and the offset of the seal angle; The object to be processed is cropped based on the range of the seal detection frame and the offset of the seal angle to generate a seal image.
6. A parallel processing contract seal text recognition method according to claim 5, characterized in that: Processing the seal image based on the seal correction module, mapping the circular image into a rectangular image to obtain a corrected image, specifically includes: Preprocessing the seal image based on the seal correction module to generate a first corrected image; wherein the preprocessing includes at least one of the following: denoising, binarization and edge detection; Identify the seal image based on a preset Hough transform algorithm to determine the center and radius of the seal image; The first corrected image is mapped to a rectangular area based on a preset polar coordinate transformation algorithm to generate a corrected image.
7. A parallel processing contract seal text recognition method according to claim 6, characterized in that: Mapping the first corrected image to a rectangular area based on a preset polar coordinate transformation algorithm to generate a corrected image specifically includes: According to the polar coordinate transformation algorithm, the pixel points on the first corrected image are mapped to corresponding pixel points on the rectangular area according to the distance between the pixel points and the center of the circle and the angle between the line connecting the pixel points with the center of the circle and the horizontal line, so as to generate a corrected image.
8. The method for contract seal text recognition by parallel processing according to claim 1, characterized in that: Recognizing the corrected image based on the seal text recognition module to generate the seal text specifically includes: Determining the number and order of channels in the seal text recognition module; intercepting the rectified image based on the number of channels to generate a plurality of sub-rectified images; Allocating the plurality of sub-rectified images to different channels for recognition based on the channel sequence to generate sub-recognition results; The sub-recognition results are integrated based on the channel sequence to generate a seal text.
9. A parallel processing contract seal text recognition device, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: Constructing a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; Determine an object to be identified, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; Processing the seal image based on the seal correction module, mapping the circular image into a rectangular image to obtain a corrected image; The corrected image is recognized based on the seal text recognition module to generate a seal text.
10. A non-volatile computer storage medium for parallel processing of contract seal text recognition, storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Constructing a seal recognition model; wherein the seal recognition model includes a seal detection module, a seal correction module and a seal text recognition module; Determine an object to be identified, locate and crop the seal of the object to be processed based on the seal detection module to generate a seal image; wherein the seal image is a circular image; Processing the seal image based on the seal correction module, mapping the circular image into a rectangular image to obtain a corrected image; The corrected image is recognized based on the seal text recognition module to generate a seal text.
Citation Information
Patent Citations
Parallel processing method and apparatus for determining text information from an image
CN103608823A
A seal identification method, device and equipment based on Hough transform, and a storage medium
CN112686255A
Circular seal character recognition method and device, computer equipment and storage medium
CN113627423A
Method and device for identifying seal in image, computer equipment and readable storage medium
CN113627432A
Seal recognition method and apparatus, electronic device, and storage medium
WO2024169397A1
Cited By
Seal identification and original discrimination method and device
CN120997855A