Method, device, equipment and storage medium for identifying information in images
By sorting document pictures, rotating processing and intercepting segmented network models, the problem of low recognition accuracy in the prior art is solved, and a higher information recognition accuracy is achieved.
Patent Information
- Application Number
- CN202011391985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-12-01
AI Technical Summary
The prior art recognizes documents containing more text information and complex image backgrounds, and has low recognition accuracy.
By obtaining document pictures, using pre-trained classifiers for classification, rotating the documents to be placed in a state of being placed, using the segmented network model to obtain coordinate information of the key information area, intercept the pending pictures, and detect and identify them.
By removing complex backgrounds, the input complexity of the text information detector is reduced, the image processing range is reduced, and the accuracy of information recognition is significantly improved.
Smart Images

Figure CN112434689B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for identifying information in an image. Background Art
[0002] Financial institutions generally need to process documents submitted by customers, identify the text within them, and analyze or archive them. For example, bank loan and lending businesses require verification of customer financial statements to verify the authenticity of information, including customer information, asset profiles, and transaction history. However, documents often contain a large amount of text. Currently, optical character recognition (OCR) is often used to identify text within documents. This method achieves good results for documents with less text or simple text, but its accuracy needs to be further improved for documents with more text and complex backgrounds. Summary of the Invention
[0003] The present invention aims to provide a method, apparatus, device and storage medium for identifying information in an image, so as to improve the accuracy of image information recognition.
[0004] The present invention provides a method for identifying information in a picture, comprising:
[0005] Obtain the uploaded document image, classify the document image using a pre-trained classifier, and obtain the document type corresponding to the document image;
[0006] Analyzing whether the document in the document image is in an upright position, and if not, rotating the document image so that the document is in an upright position;
[0007] Obtaining a pre-trained segmentation network model corresponding to the document type, inputting the document image into the segmentation network model, obtaining coordinate information corresponding to the region where each key information is located in the document image output by the segmentation network model, and intercepting the document image based on the respective coordinate information to obtain respective images to be processed that contain respective key information;
[0008] Detect and identify each image to be processed to obtain key information in each image to be processed.
[0009] The present invention also provides a device for identifying information in a picture, comprising:
[0010] The classification module is used to obtain the uploaded document image and classify the document image using a pre-trained classifier to obtain the document type corresponding to the document image;
[0011] a rotation module for analyzing whether the document in the document image is in an upright position, and if not, rotating the document image so that the document is in an upright position;
[0012] a capture module configured to obtain a pre-trained segmentation network model corresponding to the document type, input the document image into the segmentation network model, obtain coordinate information corresponding to regions of each key information in the document image output by the segmentation network model, and capture the document image based on the respective coordinate information to obtain images to be processed that contain respective key information;
[0013] The recognition module is used to detect and recognize each image to be processed to obtain key information in each image to be processed.
[0014] The present invention also provides a computer device, which includes a memory and a processor connected to the memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method for identifying information in an image as described above are implemented.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for identifying information in an image are implemented.
[0016] The beneficial effects of the present invention are as follows: when identifying information in an image, the present invention first classifies the document image to obtain the corresponding document type, then rotates the document image that is not in the upright position so that the document is in the upright position, then uses a segmentation network model to obtain the coordinate information corresponding to the area where each key information is located in the document image, intercepts the image to be processed based on the coordinate information, and finally detects and identifies each image to be processed to obtain the key information. The present invention intercepts the image to be processed where each text area is located from the original document image, and then detects and identifies the image to be processed, which can remove most of the complex background, reduce the complexity of the text information detector input, reduce the image processing range, and thus improve the accuracy of information recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of an embodiment of a method for identifying information in a picture according to the present invention;
[0018] Figure 2 for Figure 1 A detailed flow chart of the steps of detecting and identifying each image to be processed to obtain key information in each image to be processed;
[0019] Figure 3 This is a schematic structural diagram of an embodiment of a device for identifying information in a picture according to the present invention;
[0020] Figure 4 FIG. 1 is a schematic diagram of the hardware architecture of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0022] It should be noted that the descriptions of "first", "second", etc. in the present invention are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0023] See Figure 1 FIG. 1 is a flow chart of an embodiment of a method for identifying information in an image according to the present invention. In this embodiment, the method includes:
[0024] Step S1: Obtain an uploaded document image, classify the document image using a pre-trained classifier, and obtain the document type corresponding to the document image;
[0025] After obtaining the uploaded document image, the document image can be processed. The processing of the document image includes denoising the image (for example, using one or more predetermined filters for denoising), enhancing pre-processing to improve image clarity, etc.
[0026] Denoising generally involves filtering to remove noise from document images. Enhancement preprocessing involves adding information or transforming data to the document image through certain means, selectively highlighting interesting features or suppressing (masking) unwanted features, thereby aligning the image with visual response characteristics. Image enhancement can be divided into two main categories: frequency domain and spatial domain. Frequency domain methods treat the image as a two-dimensional signal and perform signal enhancement based on a two-dimensional Fourier transform. Low-pass filtering (which only allows low-frequency signals to pass) can remove noise from the image, while high-pass filtering can enhance high-frequency signals such as edges, sharpening blurred images. Representative algorithms in spatial domain methods include local averaging and median filtering (taking the median pixel value in a local neighborhood), which can be used to remove or attenuate noise.
[0027] The classifier can be constructed by collecting a large number (e.g., 100,000) of document images containing key information. Each collected document image is first labeled with its type, and then the labeled document images are used as sample data and input into the classifier for training. The classifier can use common classification models such as CNN (convolutional neural network model), RNN (recurrent neural network model), SVM (support vector machine model), etc. Its input is the document image, and its output is the document type corresponding to the input document image, or the output is the score of the input document image belonging to various document types. In the latter case, the document type with the highest score can be taken as the document type to which the corresponding document image belongs.
[0028] Step S2, analyzing whether the document in the document image is in an upright position; if not, rotating the document image so that the document is in an upright position;
[0029] Specifically, whether the document image is in the correct position can be determined by the following implementation: detecting the edge line below the document in the document image, obtaining the angle between the edge line and the horizontal direction, if the angle is equal to 0 degrees, the document in the document image is in the correct position, if the angle is not equal to 0 degrees, the document in the document image is not in the correct position. In this case, the document image is rotated clockwise by an angle equal to the angle, and the document in the rotated document image is in the correct position; or
[0030] A deep learning model is provided, and a document image is input into a pre-trained deep learning model. The orientation and angle of the document in the document image output by the deep learning model are obtained, and the document image is rotated based on the orientation and angle so that the document is in an upright position. The orientation of the document in the document image, for example, includes a first orientation of 0-90 degrees, a second orientation of 90-180 degrees, a third orientation of 180-270 degrees, and a fourth orientation of 270-360 degrees. After obtaining the orientation of the document in the document image, the corresponding angle is obtained, and then the document is rotated to 0 degrees according to the orientation and angle. In order to improve accuracy, after adopting this method, further rotation processing can be performed by using the above-mentioned method of detecting the edge line below the document in the document image.
[0031] Among them, deep learning models include CNN (convolutional neural network model), RNN (recurrent neural network model), etc.
[0032] Step S3: Obtain a pre-trained segmentation network model corresponding to the document type, input the document image into the segmentation network model, obtain the coordinate information corresponding to the area where each key information in the document image is located output by the segmentation network model, and intercept the document image based on the respective coordinate information to obtain each image to be processed containing each key information;
[0033] Each document type corresponds to a segmentation network model, and the segmentation network model is used to locate the area where each key information in the document of this document type is located.
[0034] The segmentation network model can be a convolutional neural network (CNN) or other deep learning models, such as Region-CNN, U-net, or Mask R-CNN. The segmentation network model can be constructed by collecting a large number of document images corresponding to each document type. First, the coordinates of the areas containing key information in the collected document images for each document type are annotated. The annotated document images are then used as sample data and fed into the segmentation network model for training.
[0035] Document images contain a variety of key information. For example, for a bank financial statement, key information includes the customer's name, residential address, date, bank account number, account transaction history, asset profile, asset summary, and so on. This key information is located in different locations on the document. Since document images contain a large amount of text and other information (such as background or images), useful key information may only exist in certain specific areas, while the content in other areas is irrelevant information. Therefore, it is necessary to cut out the document image to extract the useful key information area, reduce the image processing range, and thus improve the accuracy and recognition speed of the subsequent recognition process. By inputting the document image into the segmentation network model, the coordinate information corresponding to the area where each key information is located can be obtained. Generally speaking, this coordinate information includes four coordinates, and the lines connecting these four coordinates form a rectangular area.
[0036] After determining the coordinate information corresponding to the area where each key information is located, the area at the corresponding position in the document image is intercepted according to the coordinate information corresponding to each key information to obtain the image to be processed corresponding to each key information.
[0037] Step S4: Detect and identify each image to be processed to obtain key information in each image to be processed.
[0038] In this embodiment, by intercepting the document image to obtain the image to be processed corresponding to each key information, and then detecting and identifying the image to be processed, the complexity of the image background can be reduced, especially for documents with more text information and more complex image background, which can improve the accuracy of text recognition.
[0039] When identifying information in an image, this embodiment first classifies the document image to determine the corresponding document type. It then rotates any documents that are not in an upright position to position them in an upright position. A segmentation network model is then used to obtain the coordinate information corresponding to the areas of key information in the document image. Based on this coordinate information, the image to be processed is intercepted to obtain each image to be processed. Finally, each image to be processed is detected and identified to obtain the key information. This embodiment intercepts the image to be processed containing each text area from the original document image and then performs detection and identification on the image to be processed. This removes most of the complex background, reduces the complexity of the text information detector input, and reduces the image processing range, thereby improving the accuracy of information recognition.
[0040] Specifically, if Figure 2 As shown, step S4 includes the following detailed steps:
[0041] S41, performing text detection on each image to be processed, obtaining a text box of each image to be processed, as well as the number of characters and position information of the characters in each text box, and intercepting the text box of each image to be processed;
[0042] S42, analyzing whether the number of characters in each text box is greater than or equal to a preset first number threshold;
[0043] S43: If the number of characters in a text box is greater than or equal to the first number threshold, splitting the text box with the number of characters greater than or equal to the first number threshold into at least two sub-pictures, wherein the number of characters in each of the at least two sub-pictures is within a predetermined number range;
[0044] S44, inputting each sub-image into a pre-trained recognition model, and obtaining text corresponding to each sub-image output by the recognition model;
[0045] S45 , splicing the texts corresponding to the sub-pictures according to the position information of the characters to obtain the key information corresponding to the text box.
[0046] Furthermore, step S4 also includes the following detailed steps:
[0047] If the number of characters in a text box is less than the first quantity threshold, the text box with the number of characters less than the first quantity threshold is input into the recognition model, the text output by the recognition model is obtained, and the key information in the text box is obtained.
[0048] In this embodiment, the text detection of each image to be processed is performed using an improved method based on the DBnet detection network model. Not only the position of the text box in the image is learned, but also the position of each character in the text box and the number of characters are learned. The detection network model can be constructed by collecting a large number of text images. First, the coordinate information of the text box area in the collected image is marked, and then the position of the characters and the number of characters in the text box are marked. The marked sample data is input into the detection network model for training. After detection, the text box with the number of characters greater than or equal to the first quantity threshold (for example, the first quantity threshold is 20) is cut so that the number of characters in each sub-image after cutting is within a predetermined quantity range, for example, the predetermined quantity range is 1-19. For the text box with the number of characters less than the first quantity threshold, it can be directly input into the recognition model for recognition to obtain the text in the text box, which is the key information.
[0049] For the cut sub-images, they are input into the recognition model for recognition respectively to obtain the text corresponding to each sub-image. Finally, according to the position information of the characters obtained by the above detection, the text corresponding to each sub-image is spliced together. The spliced text is the key information.
[0050] This embodiment takes into account that the length of the characters affects the function of the memory unit of the recognition model. If the character length is too long, the memory unit of the recognition model will find it difficult to learn the relationship between long-distance characters, affecting the recognition performance. Therefore, the image to be processed with a number of characters greater than or equal to the first number threshold is cut to control the character length of the characters in each sub-image, thereby further improving the recognition accuracy.
[0051] In one embodiment, the present invention provides a device for identifying information in a picture, and the device for identifying information in a picture corresponds to the method for identifying information in a picture in the above embodiment. Figure 3 As shown, the device for identifying information in a picture includes:
[0052] Classification module 101 is used to obtain the uploaded document image and classify the document image using a pre-trained classifier to obtain the document type corresponding to the document image;
[0053] The rotation module 102 is used to analyze whether the document in the document image is in an upright position. If not, the document image is rotated so that the document is in an upright position.
[0054] The interception module 103 is configured to obtain a pre-trained segmentation network model corresponding to the document type, input the document image into the segmentation network model, obtain coordinate information corresponding to the region where each key information is located in the document image output by the segmentation network model, and intercept the document image based on the respective coordinate information to obtain respective images to be processed containing respective key information;
[0055] The recognition module 104 is used to detect and recognize each picture to be processed to obtain key information in each picture to be processed.
[0056] Furthermore, the identification module 104 includes:
[0057] A detection unit is used to perform text detection on each image to be processed, obtain the text box of each image to be processed, and the number of characters and the position information of the characters in each text box, and intercept the text box of each image to be processed;
[0058] An analyzing unit, configured to analyze whether the number of characters in each text box is greater than or equal to a preset first number threshold;
[0059] a cutting unit, configured to, if the number of characters in a text box is greater than or equal to the first number threshold, cut the text box having the number of characters greater than or equal to the first number threshold into at least two sub-pictures, wherein the number of characters in each of the at least two sub-pictures is within a predetermined number range;
[0060] A recognition unit, configured to input each sub-image into a pre-trained recognition model and obtain text corresponding to each sub-image output by the recognition model;
[0061] The splicing unit is used to splice the texts corresponding to the sub-pictures according to the position information of the characters to obtain the corresponding key information in the text box.
[0062] The specific definition of the device for identifying information in an image can be found in the definition of the method for identifying information in an image above and will not be repeated here. The various modules in the above-mentioned device for identifying information in an image can be implemented in whole or in part through software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.
[0063] In one embodiment, a computer device is provided, capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. The computer device may be a personal computer (PC), a smartphone, a tablet, a computer, a single network server, a server group consisting of multiple network servers, or a cloud-based computing system consisting of a large number of hosts or network servers. Cloud computing is a type of distributed computing that consists of a group of loosely coupled computers forming a super virtual computer.
[0064] like Figure 4 As shown, the computer device may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be interconnected via a system bus. The memory 11 stores a computer program that can be run on the processor 12. It should be noted that Figure 4 Only a computer device having components 11 - 13 is shown, but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0065] Memory 11 may be non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM). In this embodiment, the readable storage medium of memory 11 is typically used to store an operating system and various application software installed on a computer device, such as the program code of a computer program in an embodiment of the present invention. In addition, memory 11 may also be used to temporarily store various types of data that have been output or are about to be output.
[0066] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, configured to execute program codes stored in the memory 11 or process data, such as executing a computer program.
[0067] The network interface 13 may include a standard wireless network interface or a wired network interface. The network interface 13 is generally used to establish a communication connection between the computer device and other electronic devices.
[0068] The computer program is stored in the memory 11 and includes at least one computer-readable instruction stored in the memory 11. The at least one computer-readable instruction can be executed by the processor 12 to implement the methods of various embodiments of the present application, including:
[0069] Obtain the uploaded document image, classify the document image using a pre-trained classifier, and obtain the document type corresponding to the document image;
[0070] Analyzing whether the document in the document image is in an upright position, and if not, rotating the document image so that the document is in an upright position;
[0071] Obtaining a pre-trained segmentation network model corresponding to the document type, inputting the document image into the segmentation network model, obtaining coordinate information corresponding to the region where each key information is located in the document image output by the segmentation network model, and intercepting the document image based on the respective coordinate information to obtain respective images to be processed that contain respective key information;
[0072] Detect and identify each image to be processed to obtain key information in each image to be processed.
[0073] Furthermore, the step of detecting and identifying each image to be processed to obtain key information in each image to be processed specifically includes:
[0074] Perform text detection on each image to be processed, obtain the text box of each image to be processed, as well as the number of characters and the position information of the characters in each text box, and intercept the text box of each image to be processed;
[0075] Analyze whether the number of characters in each text box is greater than or equal to a preset first number threshold;
[0076] If the number of characters in a text box is greater than or equal to the first number threshold, dividing the text box with the number of characters greater than or equal to the first number threshold into at least two sub-pictures, the number of characters in each of the at least two sub-pictures being within a predetermined number range;
[0077] Inputting each sub-image into a pre-trained recognition model, and obtaining the text corresponding to each sub-image output by the recognition model;
[0078] The texts corresponding to the sub-pictures are spliced according to the position information of the characters to obtain the key information corresponding to the text box.
[0079] Furthermore, the step of detecting and identifying each image to be processed to obtain key information in each image to be processed further includes: if the number of characters in a text box is less than the first number threshold, then the text box with the number of characters less than the first number threshold is input into the recognition model, the text output by the recognition model is obtained, and the key information in the text box is obtained.
[0080] Furthermore, the method for identifying information in an image further includes training a classifier in the following manner, including:
[0081] Collect document images larger than a preset second quantity threshold, label each collected document image with a document type, and input the labeled document image as sample data into the classifier for training to obtain a trained classifier.
[0082] Furthermore, the step of analyzing whether the document in the document image is in an upright position, and if not, rotating the document image so that the document is in an upright position, specifically includes:
[0083] Detect the edge line below the document in the document image and obtain the angle between the edge line and the horizontal direction. If the angle is not equal to 0 degrees, rotate the document image in a clockwise direction, and the rotation angle is equal to the angle of the angle.
[0084] Furthermore, the step of analyzing whether the document in the document image is in an upright position, and if not, rotating the document image so that the document is in an upright position, specifically includes:
[0085] The document image is input into a pre-trained deep learning model, the orientation and angle of the document in the document image output by the deep learning model are obtained, and the document image is rotated based on the orientation and angle so that the document is in an upright position.
[0086] In one embodiment, the present invention provides a computer-readable storage medium, which may be a non-volatile and / or volatile memory, storing a computer program. When the computer program is executed by a processor, the steps of the method for identifying information in an image in the above embodiment are implemented, for example Figure 1 Alternatively, when the computer program is executed by the processor, the functions of the modules / units of the apparatus for identifying information in a picture in the above embodiment are realized, for example Figure 3 The functions of modules 101 to 104 are shown in FIG. 1 and will not be described in detail here to avoid repetition.
[0087] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and when the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0088] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0089] It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, apparatus, article or method that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements that are inherent to such process, apparatus, article or method.
[0090] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for identifying information in a picture, characterized in that: include: Obtain the uploaded document image, classify the document image using a pre-trained classifier, and obtain the document type corresponding to the document image; Analyzing whether the document in the document image is in a correct state, and if not, rotating the document image so that the document is in a correct state; Obtaining a pre-trained segmentation network model corresponding to the document type, inputting the document image into the segmentation network model, obtaining coordinate information corresponding to an area where each key information in the document image is located output by the segmentation network model, and based on the coordinate information corresponding to the area where each key information is located, cutting out a to-be-processed image containing the key information from the document image, thereby obtaining one or more to-be-processed images; Perform text detection on the one or more images to be processed to obtain text boxes of each image to be processed, as well as the number of characters and position information of characters in each text box, analyze whether the number of characters in each text box is greater than or equal to a preset first quantity threshold, and if there is a text box with the number of characters greater than or equal to the first quantity threshold, cut the text box with the number of characters greater than or equal to the first quantity threshold into at least two sub-pictures, the number of characters in each of the at least two sub-pictures is within a predetermined quantity range, input each sub-picture into a pre-trained recognition model, obtain text corresponding to each sub-picture output by the recognition model, splice the text corresponding to each sub-picture according to the position information of the characters, and obtain key information in the one or more images to be processed.
2. The method for identifying information in a picture according to claim 1, characterized in that: The method further includes: if the number of characters in a text box is less than the first number threshold, inputting the text box with the number of characters less than the first number threshold into the recognition model, obtaining the text output by the recognition model, and obtaining the key information in the text box.
3. The method for identifying information in a picture according to any one of claims 1 to 2, characterized in that: The method for identifying information in a picture also includes training a classifier in the following manner, including: Collect document images whose number is greater than a preset second quantity threshold, label each collected document image with a document type, and input the labeled document image as sample data into the classifier for training to obtain a trained classifier.
4. The method for identifying information in a picture according to any one of claims 1 to 2, characterized in that: The step of analyzing whether the document in the document image is in a correct state, and if not, rotating the document image so that the document is in a correct state, specifically includes: Detect the edge line below the document in the document image, obtain the angle between the edge line and the horizontal direction, and if the angle is not equal to 0 degrees, rotate the document image in a clockwise direction, and the rotation angle is equal to the angle of the angle.
5. The method for identifying information in a picture according to any one of claims 1 to 2, characterized in that: The step of analyzing whether the document in the document image is in a correct state, and if not, rotating the document image so that the document is in a correct state, specifically includes: The document image is input into a pre-trained deep learning model, the orientation and angle of the document in the document image output by the deep learning model are obtained, and the document image is rotated based on the orientation and angle so that the document is in an upright position.
6. A device for identifying information in a picture, characterized in that: include: A classification module is used to obtain the uploaded document image, classify the document image using a pre-trained classifier, and obtain the document type corresponding to the document image; A rotation module is used to analyze whether the document in the document image is in a correct state. If it is not in a correct state, the document image is rotated so that the document is in a correct state. An interception module is used to obtain a pre-trained segmentation network model corresponding to the document type, input the document image into the segmentation network model, obtain coordinate information corresponding to the area where each key information is located in the document image output by the segmentation network model, and based on the coordinate information corresponding to the area where each key information is located, intercept a to-be-processed image containing the key information from the document image to obtain one or more to-be-processed images; A recognition module is used to perform text detection on the one or more images to be processed, obtain text boxes of each image to be processed, and the number of characters and position information of the characters in each text box, analyze whether the number of characters in each text box is greater than or equal to a preset first quantity threshold, and if there is a text box with a number of characters greater than or equal to the first quantity threshold, cut the text box with a number of characters greater than or equal to the first quantity threshold into at least two sub-pictures, the number of characters in each of the at least two sub-pictures is within a predetermined quantity range, input each sub-picture into a pre-trained recognition model, obtain text corresponding to each sub-picture output by the recognition model, splice the text corresponding to each sub-picture according to the position information of the characters, and obtain key information in the one or more images to be processed.
7. A computer device, comprising a memory and a processor connected to the memory, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the steps of the method for identifying information in a picture according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for identifying information in a picture according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Bill information identification method, electronic device and readable storage medium
CN107798299A
Bill identification method, server and computer readable storage medium
CN108446621A
Invoice picture summarizing method, electronic device and readable storage medium
CN110334596A
Text picture analysis method and device, computer equipment and storage medium
CN111382740A