CN110826488A - Image identification method and device for electronic document and storage equipment - Google Patents

Image identification method and device for electronic document and storage equipment Download PDF

Info

Publication number
CN110826488A
CN110826488A CN201911075895.4A CN201911075895A CN110826488A CN 110826488 A CN110826488 A CN 110826488A CN 201911075895 A CN201911075895 A CN 201911075895A CN 110826488 A CN110826488 A CN 110826488A
Authority
CN
China
Prior art keywords
page image
block
image blocks
document
document page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911075895.4A
Other languages
Chinese (zh)
Other versions
CN110826488B (en
Inventor
李程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Speech Information Technology Co Ltd
Original Assignee
Suzhou Speech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Speech Information Technology Co Ltd filed Critical Suzhou Speech Information Technology Co Ltd
Priority to CN201911075895.4A priority Critical patent/CN110826488B/en
Publication of CN110826488A publication Critical patent/CN110826488A/en
Application granted granted Critical
Publication of CN110826488B publication Critical patent/CN110826488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)

Abstract

The invention discloses an image identification method, device and computer storage equipment for electronic documents, which comprises the steps of firstly, carrying out block segmentation on a document page image to obtain a plurality of page image blocks; then, respectively extracting the features of the page image blocks to obtain a plurality of corresponding feature vectors; further performing labeling data sampling according to the plurality of feature vectors; performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and finally, carrying out image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image.

Description

Image identification method and device for electronic document and storage equipment
Technical Field
The present invention relates to electronic document application technologies, and in particular, to an image recognition method and apparatus for an electronic document, and a computer storage device.
Background
With the rapid development of computer and network technologies, electronic documents are more and more widely applied, especially format documents in PDF and other formats. At present, the image recognition mode for a document page mainly includes an XY tree-based global recursive cutting algorithm and a deep learning-based object detection algorithm.
However, the above method of image recognition for document pages currently has the following defects: 1) the XY tree-based global recursive cutting algorithm cannot effectively cut a specific format (such as a table and a dividing line); 2) the segmentation is mainly carried out according to the blank interval of the projection, and the interval of which is taken as the segmentation threshold value is totally dependent on experience, so that the block segmentation accuracy is low, and the problem of image identification is not solved; 3) object detection algorithms based on deep learning (such as the YOLO algorithm) require a large amount of training data, are lack of labeling data, and are high in calculation cost.
Disclosure of Invention
The embodiment of the invention provides an image identification method and device for an electronic document and a computer storage device, aiming at effectively overcoming various problems existing in the existing image identification for document pages.
According to a first aspect of the embodiments of the present invention, there is provided an image recognition method for an electronic document, the method including: performing block segmentation on the document page image to obtain a plurality of page image blocks; respectively extracting the features of the page image blocks to obtain a plurality of corresponding feature vectors; performing labeling data sampling according to the plurality of feature vectors; performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and carrying out image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image.
According to an embodiment of the present invention, the block division of the document page image to obtain a plurality of page image blocks includes: the method comprises the steps of firstly, obtaining two projection arrays of a document page image, wherein the two projection arrays respectively comprise projection values of the document page image on an X axis and a Y axis; a second operation of preprocessing the two projection arrays; and thirdly, performing block segmentation on the document page image according to the blank position in the middle of the two preprocessed projection arrays to obtain a plurality of page image blocks after primary segmentation.
According to an embodiment of the present invention, the block segmentation of the document page image according to a blank position between the two preprocessed projection arrays includes: detecting whether a blank exists between the two preprocessed projection arrays or not; if the blank exists, block segmentation is carried out on the document page image according to the blank position in the middle of the two preprocessed projection arrays; if no blank exists, the block division flow is ended.
According to an embodiment of the present invention, the block dividing of the document page image to obtain a plurality of page image blocks further includes: and repeating the first operation to the third operation aiming at each page image block in the plurality of page image blocks to obtain a plurality of N divided page image blocks, wherein the value of N is a positive integer greater than 1.
According to an embodiment of the present invention, the preprocessing the two projection arrays includes: determining a mode of all array elements in each projection array; subtracting the mode from the value corresponding to each array element in the projected array; and if the array element corresponding value obtained by subtracting the mode value is a negative value, marking the array element corresponding value as zero.
According to an embodiment of the present invention, the performing feature extraction on the plurality of page image blocks respectively to obtain a plurality of corresponding feature vectors includes: performing feature extraction on each page image block in the plurality of page image blocks to obtain the length and the width of the page image block and position coordinates in the document page image; and determining the length and the width of the page image block and the position coordinates in the document page image as corresponding characteristic vectors.
According to a second aspect of the embodiments of the present invention, there is also provided an image recognition apparatus for an electronic document, the apparatus including: the block segmentation module is used for carrying out block segmentation on the document page image to obtain a plurality of page image blocks; the characteristic extraction module is used for respectively extracting the characteristics of the page image blocks to obtain a plurality of corresponding characteristic vectors; the sampling module is used for sampling the labeled data according to the vectors; the training module is used for carrying out model training according to the plurality of characteristic vectors and the labeled data obtained by sampling to obtain a prediction model; and the prediction identification module is used for carrying out image identification on the plurality of page image blocks by utilizing the prediction model to obtain a target prediction image.
According to an embodiment of the present invention, the block division module includes: the device comprises a first unit, a second unit and a third unit, wherein the first unit is used for acquiring two projection arrays of a document page image, and the two projection arrays respectively comprise projection values of the document page image on an X axis and a Y axis; the second unit is used for preprocessing the two projection arrays; and the third unit is used for carrying out block segmentation on the document page image according to the blank position in the middle of the two preprocessed projection arrays to obtain a plurality of page image blocks after primary segmentation.
According to an embodiment of the present invention, the third unit includes: the detection subunit is used for detecting whether a blank exists between the two preprocessed projection arrays; the block segmentation subunit is used for carrying out block segmentation on the document page image according to a blank position in the middle of the two preprocessed projection arrays if blanks exist; if no blank exists, the block division flow is ended.
According to an embodiment of the present invention, the block division module is further configured to repeat operations of the first unit to the third unit for each page image block of the plurality of page image blocks to obtain a plurality of N divided page image blocks, where a value of N is a positive integer greater than 1.
According to an embodiment of the present invention, the second unit is specifically configured to determine a mode of all array elements in each projection array; subtracting the mode from the value corresponding to each array element in the projected array; and if the array element corresponding value obtained by subtracting the mode value is a negative value, marking the array element corresponding value as zero.
According to an embodiment of the present invention, the feature extraction module is specifically configured to perform feature extraction on each of the plurality of page image blocks to obtain the length and width of the page image block and a position coordinate in the document page image; and determining the length and the width of the page image block and the position coordinates in the document page image as corresponding characteristic vectors.
According to a third aspect of embodiments of the present invention, there is provided a computer storage device comprising a set of computer executable instructions for performing any of the image recognition methods for electronic documents described above when executed.
The embodiment of the invention aims at an image identification method, an image identification device and computer storage equipment of an electronic document, and comprises the steps of firstly, carrying out block segmentation on a document page image to obtain a plurality of page image blocks; then, respectively extracting the features of the page image blocks to obtain a plurality of corresponding feature vectors; further performing labeling data sampling according to the plurality of feature vectors; then, performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and finally, carrying out image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image. In this way, the invention performs image recognition by sampling the labeled data and training the model based on the feature vector of the page image block on the basis of block segmentation of the document page image. Compared with a YOLO algorithm, the model is simple in calculation process, does not need much labeling data, and greatly reduces the image prediction cost.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a first flow chart illustrating an implementation of an image recognition method for an electronic document according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a second specific implementation of the image recognition method for an electronic document according to an embodiment of the present invention;
FIG. 3 is a schematic diagram showing a component structure of an image recognition apparatus for an electronic document according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
FIG. 1 is a first flow chart illustrating an implementation of an image recognition method for an electronic document according to an embodiment of the present invention; fig. 2 is a schematic diagram illustrating a specific implementation flow of the image recognition method for an electronic document according to the embodiment of the present invention.
Referring to fig. 1, an embodiment of the present invention is directed to an image recognition method of an electronic document, including: operation 101, performing block segmentation on a document page image to obtain a plurality of page image blocks; operation 102, performing feature extraction on the plurality of page image blocks respectively to obtain a plurality of corresponding feature vectors; operation 103, performing label data sampling according to the plurality of feature vectors; operation 104, performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and operation 105, performing image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image.
In operation 101, referring to fig. 2, the block segmentation is performed on the document page image through a recursive algorithm to obtain a plurality of page image blocks, which specifically includes: a first operation 1011, obtaining two projection arrays of the document page image, where the two projection arrays respectively include projection values of the document page image on an X axis and a Y axis; a second operation 1012, preprocessing the two projection arrays; in a third operation 1013, the document page image is block-divided according to a blank position between the two preprocessed projection arrays, so as to obtain a plurality of page image blocks after one division.
Specifically, before the first operation 1011 is implemented, firstly, the document page image is subjected to gray scale processing to obtain a corresponding gray scale image; then, carrying out binarization on the gray level image, namely, setting the value of the gray level value larger than the gray level threshold value as 0, and otherwise, setting the value of the gray level value as 1; furthermore, the behavior of the unknown words is projected in the X-axis direction and the Y-axis direction respectively to obtain two projection arrays which correspond to the projection values in the X direction and the Y direction respectively. In practical application, the value of the grayscale threshold may be 200.
At a second operation 1012, determining a mode of all array elements in each projected array; subtracting the mode from the value corresponding to each array element in the projected array; if the array element corresponding value obtained by subtracting the mode value is a negative value, the array element corresponding value is recorded as zero (namely, if the value is less than 0, the value is 0). The value of the mode is usually 0, and if there is a table or a frame, the value should be the width of the table line or the frame. Therefore, the invention can effectively cut specific formats (such as tables and dividing lines), thereby improving the block dividing performance.
In a third operation 1013, detecting whether a blank exists in the middle of the preprocessed two projection arrays; if the blank exists, block segmentation is carried out on the document page image according to the blank position in the middle of the two preprocessed projection arrays; if no blank exists, the block division flow is ended.
Specifically, if continuous blank exists in the middle of the projection array, the positions of the continuous blank are recorded, and if N sections of continuous blank exist in the projection array, the projection array is divided into N-1 sections, and the original image (namely the document page image) is subjected to block division according to the blank positions to obtain N-1 page image blocks. Therefore, the blank space of the block division does not depend on experience any more, but effective block division is carried out according to the page layout (such as line spacing intervals), and therefore the block division performance is greatly improved.
Further, in operation 101, referring to fig. 2, the method further includes: the first operation 1011 to the third operation 1013 are repeated for each of the plurality of page image blocks to obtain a plurality of N-time divided page image blocks, where a value of N is a positive integer greater than 1.
In this way, the present invention continuously iterates the operations 1011 to 1013 in the operation 101, and finally cuts the original image (i.e. the document page image) into the non-repartitionable page image blocks. The page image blocks cut by the recursive algorithm form a tree structure, and a rule-based comparative classic XY tree-based global recursive cutting algorithm in the prior art generates a binary tree, so that a sub-tree generated by the recursive algorithm is more than or equal to 2, and the performance and the calculation efficiency of block segmentation can be effectively improved.
Further, on the basis of performing block segmentation of the recursive algorithm, continuing to operate 102, firstly, performing feature extraction on each page image block of the plurality of page image blocks to obtain the length and width of the page image block and the position coordinates in the document page image; and then determining the length and width of the page image block and the position coordinates in the document page image as corresponding feature vectors.
In operation 103, label data sampling is performed according to the plurality of feature vectors, specifically, a sample image block that meets the condition is marked as 1, otherwise, the sample image block is marked as 0.
In operation 104-105, fitting the plurality of feature vectors and the sampled labeled data by using a random forest algorithm, and training a model; and then, performing image recognition on the page image blocks obtained in the operation 101 by using the trained prediction model, so as to obtain a final desired figure, namely a target prediction image.
The embodiment of the invention is directed to an image identification method of an electronic document, firstly, a document page image is subjected to block segmentation to obtain a plurality of page image blocks; then, respectively extracting the features of the page image blocks to obtain a plurality of corresponding feature vectors; further performing labeling data sampling according to the plurality of feature vectors; then, performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and finally, carrying out image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image. In this way, the invention performs image recognition by sampling the labeled data and training the model based on the feature vector of the page image block on the basis of block segmentation of the document page image. In practical applications, the labeled data volume of the YOLO is hundreds of thousands of levels, while the labeled data volume of the method of the present invention is hundreds to thousands of levels. Compared with a YOLO algorithm, the model is simple in calculation process, does not need much labeling data, and greatly reduces the image prediction cost. The efficient and accurate image recognition provided by the invention can lay a good drawing extraction foundation for constructing an image search engine.
Also, based on the image recognition method for an electronic document as described above, an embodiment of the present invention further provides a computer-readable storage medium storing a program that, when executed by a processor, causes the processor to perform at least the operation steps of: operation 101, performing block segmentation on a document page image to obtain a plurality of page image blocks; operation 102, performing feature extraction on the plurality of page image blocks respectively to obtain a plurality of corresponding feature vectors; performing labeling data sampling according to the plurality of feature vectors; operation 103, performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model; and operation 104, performing image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image.
Further, based on the image recognition method for electronic documents as described above, the present invention also provides an image recognition apparatus for electronic documents, as shown in fig. 3, the apparatus 30 includes: a block division module 301, configured to perform block division on a document page image to obtain a plurality of page image blocks; a feature extraction module 302, configured to perform feature extraction on the multiple page image blocks respectively to obtain multiple corresponding feature vectors; a sampling module 303, configured to perform labeling data sampling according to the multiple vectors; a training module 304, configured to perform model training according to the multiple feature vectors and the sampled labeled data to obtain a prediction model; and a prediction identification module 305, configured to perform image identification on the multiple page image blocks by using the prediction model, so as to obtain a target prediction image.
According to an embodiment of the present invention, the block division module 301 includes: the device comprises a first unit, a second unit and a third unit, wherein the first unit is used for acquiring two projection arrays of a document page image, and the two projection arrays respectively comprise projection values of the document page image on an X axis and a Y axis; the second unit is used for preprocessing the two projection arrays; and the third unit is used for carrying out block segmentation on the document page image according to the blank position in the middle of the two preprocessed projection arrays to obtain a plurality of page image blocks after primary segmentation.
According to an embodiment of the present invention, the third unit includes: the detection subunit is used for detecting whether a blank exists between the two preprocessed projection arrays; the block segmentation subunit is used for carrying out block segmentation on the document page image according to a blank position in the middle of the two preprocessed projection arrays if blanks exist; if no blank exists, the block division flow is ended.
According to an embodiment of the present invention, the block segmentation module 301 is further configured to repeat the operations of the first unit to the third unit for each page image block of the plurality of page image blocks, so as to obtain a plurality of N times of segmented page image blocks, where a value of N is a positive integer greater than 1.
According to an embodiment of the present invention, the second unit is specifically configured to determine a mode of all array elements in each projection array; subtracting the mode from the value corresponding to each array element in the projected array; and if the array element corresponding value obtained by subtracting the mode value is a negative value, marking the array element corresponding value as zero.
According to an embodiment of the present invention, the feature extraction module 302 is specifically configured to perform feature extraction on each page image block of the plurality of page image blocks to obtain a length and a width of the page image block and a position coordinate of the page image block in the document page image; and determining the length and the width of the page image block and the position coordinates in the document page image as corresponding characteristic vectors.
Here, it should be noted that: the above description of the embodiment of the image recognition apparatus is similar to the description of the embodiment of the method shown in fig. 1 and 2, and has similar beneficial effects to the embodiment of the method shown in fig. 1 and 2, and therefore, the description is omitted. For technical details that are not disclosed in the embodiment of the image recognition apparatus of the present invention, please refer to the description of the method embodiment shown in fig. 1 and 2 of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another device, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An image recognition method for an electronic document, the method comprising:
performing block segmentation on the document page image to obtain a plurality of page image blocks;
respectively extracting the features of the page image blocks to obtain a plurality of corresponding feature vectors;
performing labeling data sampling according to the plurality of feature vectors;
performing model training according to the plurality of feature vectors and the sampled labeled data to obtain a prediction model;
and carrying out image identification on the plurality of page image blocks by using the prediction model to obtain a target prediction image.
2. The method of claim 1, wherein the block-dividing the document page image to obtain a plurality of page image blocks comprises:
the method comprises the steps of firstly, obtaining two projection arrays of a document page image, wherein the two projection arrays respectively comprise projection values of the document page image on an X axis and a Y axis;
a second operation of preprocessing the two projection arrays;
and thirdly, performing block segmentation on the document page image according to the blank position in the middle of the two preprocessed projection arrays to obtain a plurality of page image blocks after primary segmentation.
3. The method of claim 2, wherein the block segmenting the document page image according to the blank position in the middle of the two preprocessed projection arrays comprises:
detecting whether a blank exists between the two preprocessed projection arrays or not;
if the blank exists, block segmentation is carried out on the document page image according to the blank position in the middle of the two preprocessed projection arrays;
and if no blank exists, ending the block segmentation process.
4. The method according to claim 2 or 3, wherein the block dividing of the document page image to obtain a plurality of page image blocks further comprises:
and repeating the first operation to the third operation aiming at each page image block in the plurality of page image blocks to obtain a plurality of N divided page image blocks, wherein the value of N is a positive integer greater than 1.
5. The method of claim 2, wherein the pre-processing the two projection arrays comprises:
determining a mode of all array elements in each projection array;
subtracting the mode from the value corresponding to each array element in the projected array;
and if the array element corresponding value obtained by subtracting the mode value is a negative value, marking the array element corresponding value as zero.
6. The method according to claim 1, wherein the performing feature extraction on the plurality of page image blocks respectively to obtain a plurality of corresponding feature vectors comprises:
performing feature extraction on each page image block in the plurality of page image blocks to obtain the length and the width of the page image block and position coordinates in the document page image;
and determining the length and the width of the page image block and the position coordinates in the document page image as corresponding characteristic vectors.
7. An image recognition apparatus for an electronic document, the apparatus comprising:
the block segmentation module is used for carrying out block segmentation on the document page image to obtain a plurality of page image blocks;
the characteristic extraction module is used for respectively extracting the characteristics of the page image blocks to obtain a plurality of corresponding characteristic vectors;
the sampling module is used for sampling the labeled data according to the vectors;
the training module is used for carrying out model training according to the plurality of characteristic vectors and the labeled data obtained by sampling to obtain a prediction model;
and the prediction identification module is used for carrying out image identification on the plurality of page image blocks by utilizing the prediction model to obtain a target prediction image.
8. The apparatus of claim 7, wherein the block partitioning module comprises:
the device comprises a first unit, a second unit and a third unit, wherein the first unit is used for acquiring two projection arrays of a document page image, and the two projection arrays respectively comprise projection values of the document page image on an X axis and a Y axis;
the second unit is used for preprocessing the two projection arrays;
and the third unit is used for carrying out block segmentation on the document page image according to the blank position in the middle of the two preprocessed projection arrays to obtain a plurality of page image blocks after primary segmentation.
9. The apparatus of claim 8, wherein the third unit comprises:
the detection subunit is used for detecting whether a blank exists between the two preprocessed projection arrays;
the block segmentation subunit is used for carrying out block segmentation on the document page image according to a blank position in the middle of the two preprocessed projection arrays if blanks exist; and if no blank exists, ending the block segmentation process.
10. A computer storage medium comprising a set of computer executable instructions which when executed perform the method of image recognition for an electronic document of any one of claims 1 to 6.
CN201911075895.4A 2019-11-06 2019-11-06 Image identification method and device for electronic document and storage equipment Active CN110826488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911075895.4A CN110826488B (en) 2019-11-06 2019-11-06 Image identification method and device for electronic document and storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911075895.4A CN110826488B (en) 2019-11-06 2019-11-06 Image identification method and device for electronic document and storage equipment

Publications (2)

Publication Number Publication Date
CN110826488A true CN110826488A (en) 2020-02-21
CN110826488B CN110826488B (en) 2022-07-26

Family

ID=69552986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911075895.4A Active CN110826488B (en) 2019-11-06 2019-11-06 Image identification method and device for electronic document and storage equipment

Country Status (1)

Country Link
CN (1) CN110826488B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036412A (en) * 2020-08-28 2020-12-04 绿盟科技集团股份有限公司 Webpage identification method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325401A (en) * 2018-08-03 2019-02-12 成都准星云学科技有限公司 The method and system for being labeled, identifying to title field are positioned based on edge
CN109816118A (en) * 2019-01-25 2019-05-28 上海深杳智能科技有限公司 A kind of method and terminal of the creation structured document based on deep learning model

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325401A (en) * 2018-08-03 2019-02-12 成都准星云学科技有限公司 The method and system for being labeled, identifying to title field are positioned based on edge
CN109816118A (en) * 2019-01-25 2019-05-28 上海深杳智能科技有限公司 A kind of method and terminal of the creation structured document based on deep learning model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036412A (en) * 2020-08-28 2020-12-04 绿盟科技集团股份有限公司 Webpage identification method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110826488B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN110738207B (en) Character detection method for fusing character area edge information in character image
US8965127B2 (en) Method for segmenting text words in document images
CN113657274B (en) Table generation method and device, electronic equipment and storage medium
RU2697649C1 (en) Methods and systems of document segmentation
CN111191649A (en) Method and equipment for identifying bent multi-line text image
CN112560862A (en) Text recognition method and device and electronic equipment
CN111507337A (en) License plate recognition method based on hybrid neural network
CN111415364A (en) Method, system and storage medium for converting image segmentation samples in computer vision
CN113688837A (en) Image desensitization method, device, electronic equipment and computer readable storage medium
CN115546809A (en) Table structure identification method based on cell constraint and application thereof
CN112990792B (en) Method and device for automatically detecting infringement risk and electronic equipment
CN110826488B (en) Image identification method and device for electronic document and storage equipment
CN112560856B (en) License plate detection and identification method, device, equipment and storage medium
CN113537192A (en) Image detection method, image detection device, electronic equipment and storage medium
CN110929647B (en) Text detection method, device, equipment and storage medium
CN115908363B (en) Tumor cell statistics method, device, equipment and storage medium
CN112560849B (en) Neural network algorithm-based grammar segmentation method and system
CN115861809A (en) Rod detection and training method and device for model thereof, electronic equipment and medium
CN114511862A (en) Form identification method and device and electronic equipment
CN108475339B (en) Method and system for classifying objects in an image
CN113627124A (en) Processing method and device for font migration model and electronic equipment
CN112434700A (en) License plate recognition method, device, equipment and storage medium
CN112861874A (en) Expert field denoising method and system based on multi-filter denoising result
CN112287763A (en) Image processing method, apparatus, device and medium
CN111967460A (en) Text detection method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Building 14, Tengfei science and Technology Park, 388 Xinping street, Suzhou Industrial Park, Suzhou area, China (Jiangsu) pilot Free Trade Zone, Suzhou, Jiangsu 215000

Applicant after: Sipic Technology Co.,Ltd.

Address before: 215024 building 14, Tengfei Innovation Park, No. 388, Xinping street, Suzhou Industrial Park, Jiangsu Province

Applicant before: AI SPEECH Co.,Ltd.

GR01 Patent grant
GR01 Patent grant