A seal identification method, device, equipment and storage medium

CN115995022BActive Publication Date: 2026-09-11DATAGRAND TECH INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310032151.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2026-09-11
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

[0004]但传统方案往往需要人工参与,设计不同阶段之间的数据转换等后处理流程,这些后处理操作繁琐的同时降低了印章识别的效率,同时人工的方式出错概率高,进而导致级联系统的误差累积

Benefits of technology

[0024]本发明实施例的技术方案,通过对待识别图像进行特征识别获取印章文本特征和印章位置信息,然后通过对印章文本特征和印章位置信息进行编码生成印章的第二关联信息,最后通过对第二关联信息进行解码生成印章识别结果,不需要人工进行参与,降低了人工工作量的同时也降低了维护成本,避免了误差累计,提高了印章识别效率也提高了印章识别结果生成的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115995022B_ABST
    Figure CN115995022B_ABST
Patent Text Reader

Abstract

The application discloses a seal identification method, device and equipment and a storage medium. The method comprises the following steps: performing feature identification on a to-be-identified image to obtain first associated information of a seal, wherein the first associated information comprises seal text features and seal position information; encoding the first associated information to generate second associated information of the seal, wherein the second associated information comprises encoded seal text features and seal position information; and generating a seal identification result according to the second associated information. The seal text features and the seal position information are obtained by performing feature identification on the to-be-identified image, the second associated information of the seal is generated by encoding the seal text features and the seal position information, and finally, the seal identification result is generated by decoding the second associated information. The method does not require manual participation, reduces the workload of manual work, reduces the maintenance cost, avoids error accumulation, improves the seal identification efficiency, and improves the accuracy of the generated seal identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and more particularly to a method, apparatus, device, and storage medium for seal recognition. Background Technology

[0002] Seals serve as authentication and signing documents, are convenient to use, and are commonly found on various official documents and invoices. When reviewing and verifying these documents with seals, it is often necessary to obtain the content of the seal. Traditional manual methods are time-consuming and labor-intensive, so there is a need to complete the task of identifying the content of the seal more efficiently and accurately.

[0003] Traditional solutions employ a process of text detection, text correction, and text recognition to complete seal recognition. There are two main types of text detection methods: regression and segmentation.

[0004] However, traditional solutions often require manual intervention, involving the design of post-processing procedures such as data conversion between different stages. These post-processing operations are cumbersome and reduce the efficiency of seal recognition. Furthermore, manual methods have a high probability of error, leading to the accumulation of errors in the cascaded system. In addition, text correction requires high precision in matching points; even slight errors can cause distortion in the corrected text, further increasing the final error and resulting in inaccurate seal recognition. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for recognizing seals in images.

[0006] According to one aspect of the present invention, a seal recognition method is provided, the method comprising:

[0007] The first associated information of the seal is obtained by performing feature recognition on the image to be recognized, wherein the first associated information includes the seal text features and the seal position information;

[0008] The first associated information is encoded to generate the second associated information of the seal, wherein the second associated information includes the encoded seal text features and seal position information;

[0009] The seal recognition result is generated based on the second associated information.

[0010] Optionally, the first associated information of the seal is obtained by performing feature recognition on the image to be recognized, including: inputting the image to be recognized into a feature extraction model to obtain the seal text features corresponding to the image to be recognized; and determining the seal position information corresponding to the seal text features based on the image to be recognized.

[0011] Optionally, determining the seal position information corresponding to the seal text features based on the image to be recognized includes: segmenting the image to be recognized to generate segmented images, and generating slice codes based on the corresponding positions of each segmented image in the image to be recognized; selecting target segmented images from each segmented image, and determining the target slice code corresponding to the target segmented image, wherein the target segmented image contains seal text features; establishing a coordinate system for the target segmented image, and obtaining the position coordinates of the seal text features based on the coordinate system; and using the target slice code and position coordinates as seal position information.

[0012] Optionally, encoding the first associated information to generate the second associated information of the seal includes: splicing the seal text features and seal position information to generate spliced ​​information; encoding the spliced ​​information and using the encoded spliced ​​information as the second associated information.

[0013] Optionally, generating a seal recognition result based on the second association information includes: determining the seal area and seal text based on the second association information; and using the seal area and seal text as the seal recognition result.

[0014] Optionally, determining the seal area and seal text based on the second association information includes: splitting the second association information to generate coded seal text features and coded seal position information; performing coordinate decoding on the coded seal position information to generate seal coordinates; determining the seal area in the image to be identified based on the seal coordinates; and performing text decoding on the coded seal text information to generate seal text.

[0015] According to another aspect of the present invention, a seal recognition device is provided, the device comprising:

[0016] The first association information acquisition module is used to perform feature recognition on the image to be recognized to obtain the first association information of the seal, wherein the first association information includes seal text features and seal position information.

[0017] The second association information generation module is used to encode the first association information to generate the second association information of the seal, wherein the second association information includes the encoded seal text features and seal position information.

[0018] The seal recognition result generation module is used to generate seal recognition results based on the second associated information.

[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0020] At least one processor; and

[0021] A memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform a seal recognition method according to any embodiment of the present invention.

[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement a seal recognition method according to any embodiment of the present invention.

[0024] The technical solution of this invention obtains seal text features and seal position information by performing feature recognition on the image to be recognized, then generates second associated information of the seal by encoding the seal text features and seal position information, and finally generates seal recognition result by decoding the second associated information. This eliminates the need for manual intervention, reduces manual workload and maintenance costs, avoids error accumulation, improves seal recognition efficiency, and enhances the accuracy of seal recognition result generation.

[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a seal recognition method provided in Embodiment 1 of the present invention;

[0028] Figure 2 This is a flowchart of another seal recognition method provided according to Embodiment 1 of the present invention;

[0029] Figure 3 This is a flowchart of a seal recognition method provided in Embodiment 2 of the present invention;

[0030] Figure 4 This is a schematic diagram of the structure of a seal recognition device according to Embodiment 3 of the present invention;

[0031] Figure 5 This is a schematic diagram of the structure of an electronic device that implements a seal recognition method according to an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] Example 1

[0035] Figure 1 This is a flowchart of a seal recognition method provided in Embodiment 1 of the present invention. This embodiment is applicable to recognizing seals in images. The method can be executed by a seal recognition device, which can be implemented in hardware and / or software and can be configured in a computer. Figure 1 As shown, the method includes:

[0036] S110. Perform feature recognition on the image to be recognized to obtain the first associated information of the seal, wherein the first associated information includes the seal text features and the seal position information.

[0037] A seal is a tool affixed to documents to indicate authentication or signature, commonly found in various official documents and invoices. The image to be identified refers to the image containing the seal that the user wants to identify. The image contains the seal's content. The user is the person performing the seal identification. The user inputs the image to be identified through a user terminal connected to the controller, allowing the controller to perform feature recognition to obtain the first associated information of the seal. This first associated information includes the seal text features and the seal location information. The seal text features refer to the text features of the target seal contained in the image to be identified, and the seal location information refers to the position of the seal text features within the image to be identified.

[0038] It should be noted that the seal recognition method in this implementation scheme is an end-to-end method. This means that after the user uploads the image to be recognized through their user terminal, the controller can process the image to generate the seal recognition result. User terminals include, but are not limited to, mobile terminal devices such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Tablet PCs), and PMPs (Portable Multimedia Players). Compared to multi-stage cascaded systems, the end-to-end architecture has lower system complexity. Multi-stage cascaded systems require optimization of different stages of the process, resulting in high maintenance costs. The end-to-end architecture only requires optimization of one model, reducing maintenance costs. The end-to-end architecture can share feature extraction layers, resulting in a smaller overall model size. Furthermore, the end-to-end architecture allows for one-step model prediction, eliminating the need for frequent data conversion between the GPU and CPU, thus reducing processing time and increasing overall speed.

[0039] S120. Encode the first associated information to generate the second associated information of the seal, wherein the second associated information includes the encoded seal text features and seal position information.

[0040] Optionally, encoding the first associated information to generate the second associated information of the seal includes: splicing the seal text features and seal position information to generate spliced ​​information; encoding the spliced ​​information and using the encoded spliced ​​information as the second associated information.

[0041] Encoding refers to the process of using an encoder to encode extracted text features into semantic information. The controller can encode the first associated information to generate second associated information, which consists of the encoded seal text features and seal position information. The controller concatenates the seal text features and seal position information to generate concatenated information, which can be done by addition. Then, the concatenated information is encoded. During encoding, the controller inputs the concatenated information into the encoder's multi-layer multi-head self-attention mechanism to output the second associated information.

[0042] Furthermore, the encoder module adopts a transformer architecture. Since the transformer architecture is insensitive to position, positional information needs to be incorporated to help the model learn positional information. That is, the seal text features and seal position information are used as the primary associated information for encoding by the encoder. The transformer employs a self-attention mechanism, which can solve the problem of information loss caused by excessively long information. Therefore, even if the text content of the seal is very long, the model can still completely recognize the entire text content. The query, keyword, and value (QKV) of the self-attention mechanism all come from the input features. Through matrix multiplication between QKV, the model can autonomously learn the relationships between different features. While learning local features, it can also take into account global features, that is, it can utilize global semantic information to make the recognition results more accurate.

[0043] S130. Generate seal recognition results based on the second associated information.

[0044] Figure 2 A flowchart for seal recognition is provided for Embodiment 1 of the present invention. Step S130 mainly includes the following steps S131 to S132:

[0045] S131. Determine the seal area and seal text based on the second associated information.

[0046] Optionally, determining the seal area and seal text based on the second association information includes: splitting the second association information to generate coded seal text features and coded seal position information; performing coordinate decoding on the coded seal position information to generate seal coordinates; determining the seal area in the image to be identified based on the seal coordinates; and performing text decoding on the coded seal text information to generate seal text.

[0047] Specifically, the controller uses a decoder to decode the second association information. The decoder also employs a transformer architecture. The controller performs coordinate decoding and text decoding on the second association information to determine the stamp region and stamp text. First, the controller splits the second association information to generate coded stamp text features and coded stamp location information. When performing coordinate decoding on the coded stamp location information, the coded stamp location information is input into the coordinate decoder. The coordinate decoder performs embedding processing and multi-head self-attention decoding, and finally, a feedforward network (FFN) to generate stamp coordinates. Then, the stamp region in the image to be recognized is determined based on the stamp coordinates. When performing text decoding on the coded stamp text information, the coded stamp text features are input into the text decoder. The text decoder also performs embedding processing and multi-head self-attention decoding, and finally, a feedforward network (FFN) to generate the stamp text.

[0048] S132. Use the seal area and seal text as the seal recognition result.

[0049] Specifically, the seal area and seal text generated by decoding the second associated information can be used as the final seal recognition result. When outputting the result, the controller can output the seal text content of different seal areas separately as the seal recognition result, which can be displayed to the user through the user terminal.

[0050] Furthermore, users can configure the controller as needed to better assess the seal recognition results and meet their specific requirements. For example, in contract review, it's necessary to determine whether both parties to the contract have affixed their official seals. This can be achieved by scanning or obtaining an image of the contract from an electronic document. This image is then transmitted to the controller in this implementation as the image to be recognized. The controller can perform intelligent review based on the returned text content of the official seal, thereby replacing manual review and reducing labor costs. Similarly, in general document recognition tasks, the seal recognition results can be used to classify and authenticate documents.

[0051] The technical solution of this invention obtains seal text features and seal position information by performing feature recognition on the image to be recognized, then generates second associated information of the seal by encoding the seal text features and seal position information, and finally generates seal recognition result by decoding the second associated information. This eliminates the need for manual intervention, reduces manual workload and maintenance costs, avoids error accumulation, improves seal recognition efficiency, and enhances the accuracy of seal recognition result generation.

[0052] Example 2

[0053] Figure 3 This is a flowchart of a seal recognition method provided in Embodiment 2 of the present invention. Based on Embodiment 1, this embodiment specifically describes the process of obtaining the first associated information of the seal by performing feature recognition on the image to be recognized. The specific content of steps S230-S240 is largely the same as steps S120-S130 in Embodiment 1, therefore, it will not be repeated in this embodiment. Figure 3 As shown, the method includes:

[0054] S210. Input the image to be identified into the feature extraction model to obtain the seal text features corresponding to the image to be identified.

[0055] Specifically, the controller extracts the seal text features corresponding to the image to be recognized using a feature extraction model. Before inputting the image to be recognized into the feature extraction model to obtain the corresponding seal text features, the controller builds the feature extraction model. This model is based on deep learning, which refers to algorithms that use neural networks as an architecture to learn representations of data. The neural network model uses ResNet50. The residual modules of the ResNet architecture can effectively alleviate the degradation problem that occurs as the network depth increases. The ResNet50 residual structure is a bottleneck, which can effectively reduce the amount of computation and accelerate the convergence speed of the model.

[0056] Furthermore, since the feature extraction model includes text feature extraction rules corresponding to the image, the controller can obtain the seal text features corresponding to the image to be identified simply by inputting the image to be identified into the feature extraction model. For example, the feature extraction model can distinguish the color of the seal in the image from the color of the surrounding background to accurately identify the seal text features included in the image to be identified.

[0057] S220. Determine the seal position information corresponding to the seal text features based on the image to be identified.

[0058] Optionally, determining the seal position information corresponding to the seal text features based on the image to be recognized includes: segmenting the image to be recognized to generate segmented images, and generating slice codes based on the corresponding positions of each segmented image in the image to be recognized; selecting target segmented images from each segmented image, and determining the target slice code corresponding to the target segmented image, wherein the target segmented image contains seal text features; establishing a coordinate system for the target segmented image, and obtaining the position coordinates of the seal text features based on the coordinate system; and using the target slice code and position coordinates as seal position information.

[0059] Specifically, the encoder module adopts a transformer architecture. Since the transformer architecture is insensitive to position, position information needs to be added to help the model learn positional information. When adding position information, the controller will segment the image to be recognized to generate segmented images. Segmentation refers to the process of dividing the image to be recognized into equal parts according to the number set by the user. For example, the user can set the image to be recognized to be segmented into 3*3 blocks. In this case, the controller will segment the image to be recognized to generate 9 segmented images and generate slice codes according to the corresponding positions of each segmented image in the image to be recognized. For example, the slice code corresponding to the top left corner of the image to be recognized is 1. The slice codes are sequentially increased from left to right and from top to bottom, that is, the 9 segmented images correspond to slice codes 1-9.

[0060] Furthermore, the controller uses the segmented image containing the seal text features as the target segmented image and establishes a coordinate system for the target segmented image. The method for establishing the coordinate system can be learned autonomously by the model. The following example aims to illustrate a possible implementation principle within the model. For instance, the upper left corner of the target segmented image is used as the origin of the coordinate system, the positive x-axis is the axis extending to the right from the origin, and the positive y-axis is the axis extending downward from the origin. An interval of 0.5cm is used, where each 0.5cm represents the number 1. This embodiment only uses the upper left corner of the target segmented image as the origin for illustration and does not limit the specific method of establishing the coordinate system. After establishing the coordinate system for the target segmented image, the position coordinates of the seal text features in the coordinate system can be obtained. The controller uses the target slice code and position coordinates as the seal position information. For instance, the target slice code can be 8, and the position coordinates corresponding to the seal text feature A are (5,3), then the seal position information is 8-(5,3).

[0061] S230. Encode the first associated information to generate the second associated information of the seal, wherein the second associated information includes the encoded seal text features and seal position information.

[0062] Optionally, encoding the first associated information to generate the second associated information of the seal includes: splicing the seal text features and seal position information to generate spliced ​​information; encoding the spliced ​​information and using the encoded spliced ​​information as the second associated information.

[0063] S240. Generate seal recognition results based on the second associated information.

[0064] Optionally, generating a seal recognition result based on the second association information includes: determining the seal area and seal text based on the second association information; and using the seal area and seal text as the seal recognition result.

[0065] Optionally, determining the seal area and seal text based on the second association information includes: splitting the second association information to generate coded seal text features and coded seal position information; performing coordinate decoding on the coded seal position information to generate seal coordinates; determining the seal area in the image to be identified based on the seal coordinates; and performing text decoding on the coded seal text information to generate seal text.

[0066] The technical solution of this invention uses a feature extraction model to identify the features of the image to be identified, thereby obtaining the seal text features and seal position information. Then, the seal text features and seal position information are encoded to generate the second associated information of the seal. Finally, the seal recognition result is generated by decoding the second associated information. This eliminates the need for manual intervention, reduces the workload and maintenance costs, avoids error accumulation, and improves the efficiency and accuracy of seal recognition results.

[0067] Example 3

[0068] Figure 4 This is a schematic diagram of the structure of a seal recognition device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a first association information acquisition module 310, used to acquire first association information of the seal by performing feature recognition on the image to be recognized, wherein the first association information includes seal text features and seal position information; a second association information generation module 320, used to encode the first association information to generate second association information of the seal, wherein the second association information includes encoded seal text features and seal position information; and a seal recognition result generation module 330, used to generate a seal recognition result based on the second association information.

[0069] Optionally, the first associated information acquisition module 310 specifically includes: a seal text feature acquisition unit, used to input the image to be identified into a feature extraction model to obtain the seal text features corresponding to the image to be identified; and a seal position information determination unit, used to determine the seal position information corresponding to the seal text features based on the image to be identified.

[0070] Optionally, the seal position information determination unit is specifically used for: segmenting the image to be recognized to generate segmented images, and generating slice codes based on the corresponding positions of each segmented image in the image to be recognized; selecting target segmented images from each segmented image, and determining the target slice code corresponding to the target segmented image, wherein the target segmented image contains seal text features; establishing a coordinate system for the target segmented image, and obtaining the position coordinates of the seal text features based on the coordinate system; and using the target slice code and position coordinates as seal position information.

[0071] Optionally, the second associated information generation module 320 is specifically used to: concatenate the seal text features and seal position information to generate concatenated information; encode the concatenated information, and use the encoded concatenated information as the second associated information.

[0072] Optionally, the seal recognition result generation module 330 specifically includes: a seal area and seal text determination unit, used to determine the seal area and seal text based on the second association information; and a seal recognition result generation unit, used to use the seal area and seal text as the seal recognition result.

[0073] Optionally, the seal area and seal text determination unit is specifically used for: splitting the second associated information to generate coded seal text features and coded seal position information; performing coordinate decoding on the coded seal position information to generate seal coordinates, and determining the seal area in the image to be identified based on the seal coordinates; and performing text decoding on the coded seal text information to generate seal text.

[0074] The technical solution of this invention obtains seal text features and seal position information by performing feature recognition on the image to be recognized, then generates second associated information of the seal by encoding the seal text features and seal position information, and finally generates seal recognition result by decoding the second associated information. This eliminates the need for manual intervention, reduces manual workload and maintenance costs, avoids error accumulation, improves seal recognition efficiency, and enhances the accuracy of seal recognition result generation.

[0075] The seal recognition device provided in this embodiment of the invention can execute a seal recognition method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0076] Example 4

[0077] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0078] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0079] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0080] Processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a seal recognition method. That is: performing feature recognition on the image to be recognized to obtain first associated information of the seal, wherein the first associated information includes seal text features and seal position information; encoding the first associated information to generate second associated information of the seal, wherein the second associated information includes encoded seal text features and seal position information; and generating a seal recognition result based on the second associated information.

[0081] In some embodiments, a seal recognition method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the seal recognition method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform a seal recognition method by any other suitable means (e.g., by means of firmware).

[0082] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0083] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0084] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0086] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0087] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0088] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0089] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A seal identification method characterized by comprising: include: The first associated information of the seal is obtained by performing feature recognition on the image to be recognized, wherein the first associated information includes seal text features and seal position information; The first associated information is encoded to generate the second associated information of the seal, wherein the second associated information includes the encoded seal text features and seal position information; Generate seal recognition results based on the second associated information; The step of obtaining the first associated information of the seal by performing feature recognition on the image to be recognized includes: The image to be identified is input into a feature extraction model to obtain the seal text features corresponding to the image to be identified. The feature extraction model can distinguish the color of the seal in the image from the surrounding background and identify the seal text features included in the image to be identified. Determine the seal location information corresponding to the seal text features based on the image to be identified; The step of determining the seal location information corresponding to the seal text features based on the image to be identified includes: The image to be identified is segmented to generate segmented images, and a slice code is generated according to the corresponding position of each segmented image in the image to be identified. Select a target segmented image from each of the segmented images and determine the target slice code corresponding to the target segmented image, wherein the target segmented image contains the seal text features; A coordinate system is established for the target segmented image, and the position coordinates of the seal text features are obtained based on the coordinate system. The target slice code and the position coordinates are used as the seal position information; The step of generating a seal recognition result based on the second associated information includes: The second associated information is split to generate coded seal text features and coded seal location information; The coded seal position information is decoded to generate seal coordinates, and the seal area in the image to be identified is determined based on the seal coordinates. The encoded seal text information is decoded to generate seal text; The seal area and the seal text are used as the seal recognition result; The step of generating seal coordinates by performing coordinate decoding on the encoded seal position information includes: inputting the encoded seal position information into a coordinate decoder, and the coordinate decoder performing embedding processing, multi-layer multi-head self-attention mechanism decoding, and feedforward network processing to generate seal coordinates.

2. The method of claim 1, wherein, The step of encoding the first associated information to generate the second associated information for the seal includes: The seal text features and the seal position information are spliced ​​together to generate spliced ​​information; The spliced ​​information is encoded, and the encoded spliced ​​information is used as the second associated information.

3. A seal identification device, characterized by include: The first association information acquisition module is used to perform feature recognition on the image to be recognized to obtain the first association information of the seal, wherein the first association information includes seal text features and seal position information. The second association information generation module is used to encode the first association information to generate the second association information of the seal, wherein the second association information includes the encoded seal text features and seal position information; The seal recognition result generation module is used to generate a seal recognition result based on the second associated information; The first associated information acquisition module specifically includes: a seal text feature acquisition unit, used to input the image to be identified into a feature extraction model to obtain the seal text features corresponding to the image to be identified, wherein the feature extraction model can distinguish the color of the seal in the image and the surrounding background, and identify the seal text features included in the image to be identified. A seal location information determination unit is used to determine the seal location information corresponding to the seal text features based on the image to be identified. The seal position information determination unit is specifically used for: The image to be identified is segmented to generate segmented images, and a slice code is generated according to the corresponding position of each segmented image in the image to be identified. Select a target segmented image from each of the segmented images and determine the target slice code corresponding to the target segmented image, wherein the target segmented image contains the seal text features; A coordinate system is established for the target segmented image, and the position coordinates of the seal text features are obtained based on the coordinate system. The target slice code and the position coordinates are used as the seal position information; Specifically, the seal recognition result generation module is used to: split the second associated information to generate coded seal text features and coded seal location information; perform coordinate decoding on the coded seal location information to generate seal coordinates, and determine the seal area in the image to be recognized based on the seal coordinates; perform text decoding on the coded seal text information to generate seal text; and use the seal area and the seal text as the seal recognition result. Specifically, the seal recognition result generation module is used to: input the coded seal position information into the coordinate decoder, and the coordinate decoder performs embedding processing, multi-layer multi-head self-attention mechanism decoding, and feedforward network processing to generate seal coordinates.

4. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-2.

5. A computer storage medium, characterized in that The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-2.

Citation Information

Patent Citations

  • Image-text splitting method and system

    CN102456136A

  • Character identification method and device for image, equipment and medium

    CN113762261A