CN109977949A - Text positioning method, device, computer equipment and the storage medium of frame fine tuning - Google Patents
Text positioning method, device, computer equipment and the storage medium of frame fine tuning Download PDFInfo
- Publication number
- CN109977949A CN109977949A CN201910214068.2A CN201910214068A CN109977949A CN 109977949 A CN109977949 A CN 109977949A CN 201910214068 A CN201910214068 A CN 201910214068A CN 109977949 A CN109977949 A CN 109977949A
- Authority
- CN
- China
- Prior art keywords
- text
- fine tuning
- frame
- parameter
- identity card
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000001514 detection method Methods 0.000 claims abstract description 70
- 238000012549 training Methods 0.000 claims abstract description 22
- 230000004807 localization Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 22
- 238000012545 processing Methods 0.000 claims description 20
- 238000013527 convolutional neural network Methods 0.000 claims description 6
- 241000208340 Araliaceae Species 0.000 claims 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims 1
- 235000003140 Panax quinquefolius Nutrition 0.000 claims 1
- 235000008434 ginseng Nutrition 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 210000004744 fore-foot Anatomy 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000006740 morphological transformation Effects 0.000 description 1
- 238000012015 optical character recognition Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
- G06V20/63—Scene text, e.g. street names
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Character Input (AREA)
Abstract
The present invention relates to text positioning method, device, computer equipment and the storage medium of frame fine tuning, this method includes obtaining ID Card Image to be positioned;It is determined text filed Primary Location, to ID Card Image to be positioned to obtain couple candidate detection frame;Parameter is finely tuned using fine tuning model prediction;Couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.After the present invention passes through the determination for carrying out outer rim for the ID Card Image to be positioned obtained, text filed couple candidate detection frame is determined again, the position of couple candidate detection frame is finely adjusted to obtain perfect copy frame using fine tuning model, after the prior information for making full use of the text filed distribution of identity card, carry out text filed positioning, fine tuning model easily restrains, is small and exquisite, speed is fast, realizes that network training is easily restrained, locating speed is fast and precision is high.
Description
Technical field
The present invention relates to identity card recognition methods, more specifically refer to text positioning method, the device, meter of frame fine tuning
Calculate machine equipment and storage medium.
Background technique
Identity card is the certificate for proving holder's identity, mostly gives citizen by various countries or district government's distribution.It will make
For the proof tool of everyone unique citizenship, has text information on identity card, text information is generally shown
The identity information of counterpart personnel.Identity card String localization is the key component in identity card identification algorithm, and text position positioning is
The no effect for accurately directly affecting Text region.
Existing identity card text positioning method is to carry out String localization with traditional images recognition methods, such as first to image into
Row denoising, then gray processing is carried out, binaryzation, contours extract, the determining identity card text position of the methods of morphological transformation.It should
Method accuracy rate is low, is not suitable for commercialization.Another localization method is to carry out String localization, the party using depth learning technology
Method is broadly divided into two ways again, and one is String localizations end to end, i.e., only directly exports body in picture by a network
The line of text position positioned needed for part card, this method are not easy to restrain in duplication scene lower network training, and are easy to happen identity card
Line of text misrecognition other than region;Another way is first to detect identity card region, then orients text in the zone,
Detection identity card region generally uses common object detection network such as Faster RCNN, and Yolo, SSD etc. carry out zone location
Try to carry out angle correction again.Carrying out String localization again in identity card region, also there are two types of methods, one is considering to work as
Forefoot area has been limited to identity card region, can be positioned with traditional images processing method, but conventional method encounter spot,
Uneven illumination is even, situations such as blocking equally still is difficult to obtain preferable effect, secondly being to continue with object detection network even
Proprietary line of text detects network to carry out String localization, this kind of method complicates problem, does not make good use of identity card text
The prior information being inherently distributed, and whole detection speed can be reduced using large size detection network in the step.
Therefore, it is necessary to design a kind of new method, realize that network training is easily restrained, locating speed is fast and precision is high.
Summary of the invention
It is an object of the invention to overcome the deficiencies of existing technologies, text positioning method, the device, meter of frame fine tuning are provided
Calculate machine equipment and storage medium.
To achieve the above object, the invention adopts the following technical scheme: the text positioning method of frame fine tuning, comprising:
Obtain ID Card Image to be positioned;
It is determined text filed Primary Location, to ID Card Image to be positioned to obtain couple candidate detection frame;
Parameter is finely tuned using fine tuning model prediction;
Couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.
Its further technical solution are as follows: it is described that text filed Primary Location is determined to ID Card Image to be positioned,
To obtain couple candidate detection frame, comprising:
Determine the identity card outer rim of ID Card Image to be positioned;
Obtain ID Card Image to be positioned identity card outer rim and text filed relative position information, to obtain text
Parameter;
Determine text filed location information, according to text parameter to form candidate text box;
The extension of width and height is carried out, to candidate text box to form couple candidate detection frame.
Its further technical solution are as follows: the identity card outer rim for obtaining ID Card Image to be positioned and text filed
Relative position information, to obtain text parameter, comprising:
By training set obtain ID Card Image to be positioned identity card outer rim and text filed relative position information,
To obtain text parameter;
Wherein, the training set is by several location informations and identity card outer rim text filed with mark
The identity card picture of location information is trained resulting.
Its further technical solution are as follows: before the model prediction fine tuning parameter using fine tuning, comprising:
Gray processing processing is carried out to couple candidate detection frame.
Its further technical solution are as follows: the fine tuning model is to carry out shape by having marked the text box of text filed position
The resulting model of training in convolutional neural networks is inputted after change.
Its further technical solution are as follows: it is described that couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information
Later, further includes:
ID Card Image to be positioned is intercepted according to text position information, to form text image;
Text image is identified, to obtain identity card text.
The present invention also provides the String localization devices of frame fine tuning, comprising:
Image acquisition unit, for obtaining ID Card Image to be positioned;
Candidate frame forms unit, for being determined text filed Primary Location to ID Card Image to be positioned, with
To couple candidate detection frame;
Parameter prediction unit, for finely tuning parameter using fine tuning model prediction;
Adjustment unit, for adjusting couple candidate detection frame according to fine tuning parameter, to obtain text position information.
Its further technical solution are as follows: the candidate frame forms unit and includes:
Outer rim determines subelement, for determining the identity card outer rim of ID Card Image to be positioned;
Parameter forms subelement, for obtain the identity card outer rim of ID Card Image to be positioned with it is text filed opposite
Location information, to obtain text parameter;
Location information determines subelement, for determining text filed location information according to text parameter, to form candidate
Text box;
Subelement is extended, for carrying out the extension of width and height to candidate text box, to form couple candidate detection frame.
The present invention also provides a kind of computer equipment, the computer equipment includes memory and processor, described to deposit
Computer program is stored on reservoir, the processor realizes above-mentioned method when executing the computer program.
The present invention also provides a kind of storage medium, the storage medium is stored with computer program, the computer journey
Sequence can realize above-mentioned method when being executed by processor.
Compared with the prior art, the invention has the advantages that: the present invention passes through for the ID Card Image to be positioned obtained
After the determination for carrying out outer rim, then text filed couple candidate detection frame is determined, using fine tuning model to the position of couple candidate detection frame
It is finely adjusted to obtain perfect copy frame, after the prior information for making full use of the text filed distribution of identity card, it is text filed fixed to carry out
Position, fine tuning model easily restrains, is small and exquisite, speed is fast, realizes that network training is easily restrained, locating speed is fast and precision is high.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field
For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of the text positioning method of frame provided in an embodiment of the present invention fine tuning;
Fig. 2 is the flow diagram of the text positioning method of frame provided in an embodiment of the present invention fine tuning;
Fig. 3 is the sub-process schematic diagram of the text positioning method of frame provided in an embodiment of the present invention fine tuning;
Fig. 4 is the schematic diagram one of couple candidate detection frame provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram two of couple candidate detection frame provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram three of couple candidate detection frame provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of the candidate text box after extension provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of text parameter provided in an embodiment of the present invention;
Fig. 9 is the training schematic diagram that model is finely tuned in the present invention;
Figure 10 be another embodiment of the present invention provides frame fine tuning text positioning method flow diagram;
Figure 11 is the schematic block diagram of the String localization device of frame provided in an embodiment of the present invention fine tuning;
Figure 12 be another embodiment of the present invention provides frame fine tuning String localization device schematic block diagram;
Figure 13 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is the applied field of the text positioning method of frame provided in an embodiment of the present invention fine tuning
Scape schematic diagram.Fig. 2 is the schematic flow chart of the text positioning method of frame provided in an embodiment of the present invention fine tuning.The frame is micro-
The text positioning method of tune is applied in server, which interacts with terminal, and identity to be positioned is obtained from terminal
Image to be demonstrate,proved, then is primarily determined to ID Card Image to be positioned progress is text filed, text filed couple candidate detection frame is drawn a circle to approve in fine tuning,
To obtain the identity card text of high accuracy.
Fig. 2 is the flow diagram of the text positioning method of frame fine tuning provided in an embodiment of the present invention.As shown in Fig. 2,
This approach includes the following steps S110 to S150.
S110, ID Card Image to be positioned is obtained.
In the present embodiment, ID Card Image to be positioned refers to the image with identity card and background, usually by having
The terminal of camera function shoots gained.
S120, text filed Primary Location is determined to ID Card Image to be positioned, to obtain couple candidate detection frame.
In the present embodiment, couple candidate detection frame refer to area be greater than it is text filed and it is internal include it is text filed external more
Side shape frame, as shown in Figure 4.
In one embodiment, referring to Fig. 3, above-mentioned step S120 may include step S121~S124.
S121, the identity card outer rim for determining ID Card Image to be positioned.
In the present embodiment, identity card outer rim generally use common object detection network such as Faster RCNN,
Yolo, SSD etc. carry out zone location carries out angle correction again can be obtained.
S122, the identity card outer rim for obtaining ID Card Image to be positioned and text filed relative position information, with
To text parameter.
In the present embodiment, text parameter refers to identity card outer rim and text filed relative position.
Specifically, by training set obtain ID Card Image to be positioned identity card outer rim and text filed opposite position
Confidence breath, to obtain text parameter;
Wherein, the training set is by several location informations and identity card outer rim text filed with mark
The identity card picture of location information is trained resulting.
The identity card samples pictures that a batch marked text filed location information are sent in object detection network, according to
The location information for the identity card outer rim that object detection network obtains can be in conjunction with the text filed location information of mark
Obtaining each text filed relative position information with outer rim, identity card outer rim in each identity card samples pictures is level
Rectangle frame is, it is specified that each text filed frame also should be horizontal rectangular frame, if the text filed rectangle frame phase actually marked
Slightly have angle to the outer rim detected, takes the external horizontal rectangular of this article one's respective area as text box to be used.Each text
The rectangle frame of one's respective area is described by four parameters: starting point x coordinate, starting point y-coordinate, terminal x coordinate, terminal y-coordinate.
By taking the rectangle frame in name text region as an example, if the rectangle frame width of outer rim is width, a height of height, outside
The starting point coordinate of frame is (x_zero, y_zero), and the rectangle frame starting point coordinate in name text region is (x_nameStart, y_
NameStart), the relative position information that can obtain the rectangle frame starting point coordinate in name text region is ((x_nameStart-x_
zero)/width,(y_nameStart-y_zero)/height).The location information of its terminal point coordinate can equally be got,
All identity card samples similarly, are finally obtained station-keeping data and are averaged by his text filed rectangle frame of position
Obtain text parameter.
S123, text filed location information is determined according to text parameter, to form candidate text box.
In the present embodiment, candidate text box refers to the rectangle frame with text information.
The location information that candidate text box can be obtained according to text parameter and identity card outer rim, such as Fig. 6 and Fig. 7 institute
Show.
S124, the extension that width and height are carried out to candidate text box, to form couple candidate detection frame.
By Fig. 6 and Fig. 7, it is found that candidate text box is understood, there is a certain error, will appear part text envelope in certain situation
The case where breath is not within candidate text box, it is therefore desirable to the center of candidate text box is fixed, it will be to candidate text
The width and height of frame carry out a certain proportion of extension, it is ensured that the text information of Yao Dingwei is within couple candidate detection frame, to improve
The accuracy of positioning.Couple candidate detection frame arranges in certain sequence, according to its specific object of sequence, no longer needs to candidate
The attribute of detection block is classified.
S130, gray processing processing is carried out to couple candidate detection frame.
In the present embodiment, in RGB model, if when R=G=B, colour indicates a kind of greyscale color, wherein R=
The value of G=B is gray value, and therefore, each pixel of gray level image only needs byte storage gray value (also known as an intensity value, brightness
Value), tonal range 0-255.General important four kinds of methods of method maximum value process mean value method weighted mean method are to color image
Gray processing is carried out, preferably to identify the Gradient Features of image, and then improves the accuracy of entire String localization.
S140, parameter is finely tuned using fine tuning model prediction.
In the present embodiment, the effect for finely tuning model is the position for correcting couple candidate detection frame.Above-mentioned fine tuning model is logical
The resulting model of training in convolutional neural networks is inputted after the text box for having marked text filed position carries out deformation.
It since couple candidate detection frame is expanded, needs accurately to be scaled, zooming in and out a rectangle frame position needs
Four parameters are wanted, as shown in figure 8, needing to export the beginning and end x of couple candidate detection frame, y-coordinate is relative to text filed standard
Couple candidate detection frame length and width are normalized to 1 by the offset parameter of frame starting point.
The input of network extends and gray processing treated couple candidate detection frame, and output should be four floating type numerical value, generation
Table the rectangle frame starting point in institute's localization of text region, terminal point coordinate with respect to couple candidate detection frame starting point deviant.
The parameter of trained convolutional neural networks is as follows:
Input layer: 150 × 50 × 1 (picture after input gray level);
Convolutional layer 1:150 × 50 × 1 × 64 (5 × 5 convolution);
Pond layer 1:75 × 25 × 1 × 64 (2 × 2 step-length);
Convolutional layer 2:75 × 25 × 1 × 128 (5 × 5 convolution);
Pond layer 2:38 × 13 × 1 × 128 (2 × 2 step-length);
Convolutional layer 3:38 × 13 × 1 × 256 (3 × 3 convolution);
Pond layer 3:19 × 7 × 1 × 256 (2 × 2 step-length);
Convolutional layer 4:19 × 7 × 1 × 512 (3 × 3 convolution);
Pond layer 4:10 × 4 × 1 × 512 (2 × 2 step-length);
Full articulamentum: 4000;
Output layer: 4;
In order to train the convolutional neural networks, on the basis of the position for having marked text filed rectangle frame, randomly will
It has marked text filed rectangle frame progress to shake up and down and the transformation of scale, as shown in figure 9, obtaining different location
Interception area, be re-fed into convolutional network and be trained, to obtain output offset value, utilize the penalty values and the text that actually marks
The parameter value of the rectangle frame position adjustment convolutional neural networks of one's respective area, so that the deviant of output is close to 0, then the convolution
Neural network is to finely tune model.Particularly, in practice address field can three row of Shortcomings situation, therefore it is hollow in address field
White position can also intercept some pictures and be sent into training, and the corresponding mark value of four parameters should be 0.Network structure is simple, inputs ruler
Very little smaller, input information is more concentrated, and is easy to make network convergence and output is good.Model is small in size, and arithmetic speed is also than general
Model is faster.
S150, couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.
In the present embodiment, text position information refers to four vertex point coordinate informations of text filed rectangle frame.
Specifically successively the position on four vertex of couple candidate detection frame is pressed according to the fine tuning parameter of fine tuning model output
It is moved according to offset.
When actually carrying out text position information prediction, each text area first is obtained by oriented identity card outer rim
The candidate text box in domain, then it is sequentially sent to fine tuning model after each candidate text box is carried out height and width extension, further according to
The output valve of fine tuning model is adjusted correspondingly couple candidate detection frame, and accurate text box field can be obtained, if fine tuning
The output valve of model illustrates that this article current row is not present all close to 0.
The text positioning method of above-mentioned frame fine tuning, by carrying out outer rim for the ID Card Image to be positioned obtained
Determination after, then determine text filed couple candidate detection frame, the position of couple candidate detection frame be finely adjusted using fine tuning model
To perfect copy frame, after the prior information for making full use of the text filed distribution of identity card, text filed positioning is carried out, finely tunes model
Easy convergence, small and exquisite, speed is fast, realizes that network training is easily restrained, locating speed is fast and precision is high.
Figure 10 be another embodiment of the present invention provides a kind of frame fine tuning text positioning method flow diagram.Such as
Shown in Figure 10, the text positioning method of the frame fine tuning of the present embodiment includes step S210-S270.Wherein step S210-S250
Similar with the step S110-S150 in above-described embodiment, details are not described herein.It is increased the following detailed description of institute in the present embodiment
Step S260-S270.
S260, ID Card Image to be positioned is intercepted according to text position information, to form text image.
Identity card figure to be positioned is cut according to text position information, to obtain figure only comprising identity card text
Picture.
S270, text image is identified, to obtain identity card text.
In the present embodiment, optical character recognition technology can be used to identify text image, to obtain identity card text
This, identity card text output to terminal is shown.
Figure 11 is a kind of schematic block diagram of the String localization device 300 of frame fine tuning provided in an embodiment of the present invention.Such as
Shown in Figure 11, corresponding to the text positioning method finely tuned with upper side frame, the present invention also provides a kind of String localizations of frame fine tuning
Device 300.The String localization device 300 of frame fine tuning includes the list for executing the text positioning method of above-mentioned frame fine tuning
Member, the device can be configured in server.
Specifically, Figure 11 is please referred to, the String localization device 300 of frame fine tuning includes:
Image acquisition unit 301, for obtaining ID Card Image to be positioned;
Candidate frame forms unit 302, for being determined text filed Primary Location to ID Card Image to be positioned, with
Obtain couple candidate detection frame;
Parameter prediction unit 304, for finely tuning parameter using fine tuning model prediction;
Adjustment unit 305, for adjusting couple candidate detection frame according to fine tuning parameter, to obtain text position information.
In one embodiment, as shown in fig. 6, candidate frame formation unit 302 includes:
Outer rim determines subelement, for determining the identity card outer rim of ID Card Image to be positioned;
Parameter forms subelement, for obtain the identity card outer rim of ID Card Image to be positioned with it is text filed opposite
Location information, to obtain text parameter;
Location information determines subelement, for determining text filed location information according to text parameter, to form candidate
Text box;
Subelement is extended, for carrying out the extension of width and height to candidate text box, to form couple candidate detection frame.
In one embodiment, above-mentioned device further include:
Gray processing processing unit 303, for carrying out gray processing processing to couple candidate detection frame.
Figure 12 be another embodiment of the present invention provides a kind of frame fine tuning String localization device 300 schematic frame
Figure.As shown in figure 12, the String localization device 300 of the frame fine tuning of the present embodiment is to increase sanction on the basis of above-described embodiment
Cut unit 306 and recognition unit 307.
Unit 306 is cut, for intercepting ID Card Image to be positioned according to text position information, to form text image;
Recognition unit 307, for being identified to text image, to obtain identity card text.
It should be noted that it is apparent to those skilled in the art that, the text of above-mentioned frame fine tuning is fixed
The specific implementation process of position device 300 and each unit, can be with reference to the corresponding description in preceding method embodiment, for description
Convenienct and succinct, details are not described herein.
The String localization device 300 of above-mentioned frame fine tuning can be implemented as a kind of form of computer program, the computer
Program can be run in computer equipment as shown in fig. 13 that.
Figure 13 is please referred to, Figure 13 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The calculating
Machine equipment 500 can be server.
Refering to fig. 13, which includes processor 502, memory and the net connected by system bus 501
Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program
5032 include program instruction, which is performed, and processor 502 may make to execute a kind of String localization of frame fine tuning
Method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should
When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of String localization side of frame fine tuning
Method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Figure 13
The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme
The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure
Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step
It is rapid:
Obtain ID Card Image to be positioned;
It is determined text filed Primary Location, to ID Card Image to be positioned to obtain couple candidate detection frame;
Parameter is finely tuned using fine tuning model prediction;
Couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.
Wherein, the fine tuning model is refreshing by input convolution after having marked the text box progress deformation of text filed position
The resulting model of training in network.
In one embodiment, processor 502 realize it is described ID Card Image to be positioned is determined it is text filed
Primary Location is implemented as follows step when obtaining couple candidate detection frame step:
Determine the identity card outer rim of ID Card Image to be positioned;
Obtain ID Card Image to be positioned identity card outer rim and text filed relative position information, to obtain text
Parameter;
Determine text filed location information, according to text parameter to form candidate text box;
The extension of width and height is carried out, to candidate text box to form couple candidate detection frame.
In one embodiment, processor 502 realize the identity card outer rim for obtaining ID Card Image to be positioned with
Text filed relative position information is implemented as follows step when obtaining text parameter step:
By training set obtain ID Card Image to be positioned identity card outer rim and text filed relative position information,
To obtain text parameter;
Wherein, the training set is by several location informations and identity card outer rim text filed with mark
The identity card picture of location information is trained resulting.
In one embodiment, processor 502 is also real before realizing the model prediction fine tuning parameter step using fine tuning
Existing following steps:
Gray processing processing is carried out to couple candidate detection frame.
In one embodiment, processor 502 is described according to fine tuning parameter adjustment couple candidate detection frame in realization, to obtain text
After location information step, following steps are also realized:
ID Card Image to be positioned is intercepted according to text position information, to form text image;
Text image is identified, to obtain identity card text.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or
Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process,
It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey
Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science
At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited
Storage media is stored with computer program, and processor is made to execute following steps when wherein the computer program is executed by processor:
Obtain ID Card Image to be positioned;
It is determined text filed Primary Location, to ID Card Image to be positioned to obtain couple candidate detection frame;
Parameter is finely tuned using fine tuning model prediction;
Couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.
Wherein, the fine tuning model is refreshing by input convolution after having marked the text box progress deformation of text filed position
The resulting model of training in network.
In one embodiment, the processor is realized described to identity card figure to be positioned in the execution computer program
As being determined text filed Primary Location, to obtain couple candidate detection frame, when step, it is implemented as follows step:
Determine the identity card outer rim of ID Card Image to be positioned;
Obtain ID Card Image to be positioned identity card outer rim and text filed relative position information, to obtain text
Parameter;
Determine text filed location information, according to text parameter to form candidate text box;
The extension of width and height is carried out, to candidate text box to form couple candidate detection frame.
In one embodiment, the processor realizes the acquisition identity card to be positioned executing the computer program
The identity card outer rim of image and text filed relative position information are implemented as follows when obtaining text parameter step
Step:
By training set obtain ID Card Image to be positioned identity card outer rim and text filed relative position information,
To obtain text parameter;
Wherein, the training set is by several location informations and identity card outer rim text filed with mark
The identity card picture of location information is trained resulting.
In one embodiment, the processor is realized described using fine tuning model prediction in the execution computer program
Before finely tuning parameter step, following steps are also realized:
Gray processing processing is carried out to couple candidate detection frame.
In one embodiment, the processor is realized described according to fine tuning parameter adjustment in the execution computer program
Couple candidate detection frame also realizes following steps after obtaining text position information step:
ID Card Image to be positioned is intercepted according to text position information, to form text image;
Text image is identified, to obtain identity card text.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk
Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair
Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention
Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with
It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill
The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.
Claims (10)
1. the text positioning method of frame fine tuning characterized by comprising
Obtain ID Card Image to be positioned;
It is determined text filed Primary Location, to ID Card Image to be positioned to obtain couple candidate detection frame;
Parameter is finely tuned using fine tuning model prediction;
Couple candidate detection frame is adjusted according to fine tuning parameter, to obtain text position information.
2. the text positioning method of frame fine tuning according to claim 1, which is characterized in that described to identity card to be positioned
Image is determined text filed Primary Location, to obtain couple candidate detection frame, comprising:
Determine the identity card outer rim of ID Card Image to be positioned;
Obtain ID Card Image to be positioned identity card outer rim and text filed relative position information, to obtain text ginseng
Number;
Determine text filed location information, according to text parameter to form candidate text box;
The extension of width and height is carried out, to candidate text box to form couple candidate detection frame.
3. the text positioning method of frame fine tuning according to claim 2, which is characterized in that described to obtain identity to be positioned
The identity card outer rim of card image and text filed relative position information, to obtain text parameter, comprising:
By training set obtain ID Card Image to be positioned identity card outer rim and text filed relative position information, with
To text parameter;
Wherein, the training set is by several location informations and identity card outer rim position text filed with mark
The identity card picture of information is trained resulting.
4. the text positioning method of frame fine tuning according to claim 1, which is characterized in that described pre- using fine tuning model
Before micrometer tune parameter, comprising:
Gray processing processing is carried out to couple candidate detection frame.
5. the text positioning method of frame fine tuning according to claim 4, which is characterized in that the fine tuning model is to pass through
The resulting model of training in convolutional neural networks is inputted after having marked the text box progress deformation of text filed position.
6. the text positioning method of frame fine tuning according to any one of claims 1 to 5, which is characterized in that the basis
It finely tunes parameter and adjusts couple candidate detection frame, after obtaining text position information, further includes:
ID Card Image to be positioned is intercepted according to text position information, to form text image;
Text image is identified, to obtain identity card text.
7. the String localization device of frame fine tuning characterized by comprising
Image acquisition unit, for obtaining ID Card Image to be positioned;
Candidate frame forms unit, for being determined text filed Primary Location to ID Card Image to be positioned, to be waited
Select detection block;
Parameter prediction unit, for finely tuning parameter using fine tuning model prediction;
Adjustment unit, for adjusting couple candidate detection frame according to fine tuning parameter, to obtain text position information.
8. the String localization device of frame fine tuning according to claim 7, which is characterized in that the candidate frame forms unit
Include:
Outer rim determines subelement, for determining the identity card outer rim of ID Card Image to be positioned;
Parameter forms subelement, for obtain ID Card Image to be positioned identity card outer rim and text filed relative position
Information, to obtain text parameter;
Location information determines subelement, for determining text filed location information according to text parameter, to form candidate text
Frame;
Subelement is extended, for carrying out the extension of width and height to candidate text box, to form couple candidate detection frame.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory
It is stored with computer program, the processor is realized as described in any one of claims 1 to 6 when executing the computer program
Method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program quilt
Processor can be realized when executing such as method described in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910214068.2A CN109977949B (en) | 2019-03-20 | 2019-03-20 | Frame fine adjustment text positioning method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910214068.2A CN109977949B (en) | 2019-03-20 | 2019-03-20 | Frame fine adjustment text positioning method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109977949A true CN109977949A (en) | 2019-07-05 |
CN109977949B CN109977949B (en) | 2024-01-26 |
Family
ID=67079720
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910214068.2A Active CN109977949B (en) | 2019-03-20 | 2019-03-20 | Frame fine adjustment text positioning method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109977949B (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110516541A (en) * | 2019-07-19 | 2019-11-29 | 金蝶软件(中国)有限公司 | Text positioning method, device, computer readable storage medium and computer equipment |
CN110738238A (en) * | 2019-09-18 | 2020-01-31 | 平安科技(深圳)有限公司 | certificate information classification positioning method and device |
CN111160240A (en) * | 2019-12-27 | 2020-05-15 | 腾讯科技(深圳)有限公司 | Image object recognition processing method and device, intelligent device and storage medium |
CN111178346A (en) * | 2019-11-22 | 2020-05-19 | 京东数字科技控股有限公司 | Character area positioning method, device, equipment and storage medium |
CN111598091A (en) * | 2020-05-20 | 2020-08-28 | 北京字节跳动网络技术有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
CN112232336A (en) * | 2020-09-02 | 2021-01-15 | 深圳前海微众银行股份有限公司 | Certificate identification method, device, equipment and storage medium |
CN112418158A (en) * | 2020-02-11 | 2021-02-26 | 支付宝实验室(新加坡)有限公司 | System suitable for detecting identity card and device and processing method associated with same |
CN112749529A (en) * | 2019-10-29 | 2021-05-04 | 西安诺瓦星云科技股份有限公司 | Method and device for character self-adaption special-shaped edit box |
CN112836696A (en) * | 2019-11-22 | 2021-05-25 | 搜狗(杭州)智能科技有限公司 | Text data detection method and device and electronic equipment |
CN112987994A (en) * | 2021-03-31 | 2021-06-18 | 维沃移动通信有限公司 | Frame selection annotation method, frame selection annotation device, electronic equipment and storage medium |
CN113111839A (en) * | 2021-04-25 | 2021-07-13 | 上海商汤智能科技有限公司 | Behavior recognition method and device, equipment and storage medium |
CN113469161A (en) * | 2020-03-31 | 2021-10-01 | 顺丰科技有限公司 | Method, device and storage medium for processing logistics list |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107679442A (en) * | 2017-06-23 | 2018-02-09 | 平安科技(深圳)有限公司 | Method, apparatus, computer equipment and the storage medium of document Data Enter |
CN108229397A (en) * | 2018-01-04 | 2018-06-29 | 华南理工大学 | Method for text detection in image based on Faster R-CNN |
CN108549893A (en) * | 2018-04-04 | 2018-09-18 | 华中科技大学 | A kind of end-to-end recognition methods of the scene text of arbitrary shape |
CN109086756A (en) * | 2018-06-15 | 2018-12-25 | 众安信息技术服务有限公司 | A kind of text detection analysis method, device and equipment based on deep neural network |
CN109308476A (en) * | 2018-09-06 | 2019-02-05 | 邬国锐 | Billing information processing method, system and computer readable storage medium |
CN109448007A (en) * | 2018-11-02 | 2019-03-08 | 北京迈格威科技有限公司 | Image processing method, image processing apparatus and storage medium |
CN109492643A (en) * | 2018-10-11 | 2019-03-19 | 平安科技(深圳)有限公司 | Certificate recognition methods, device, computer equipment and storage medium based on OCR |
-
2019
- 2019-03-20 CN CN201910214068.2A patent/CN109977949B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107679442A (en) * | 2017-06-23 | 2018-02-09 | 平安科技(深圳)有限公司 | Method, apparatus, computer equipment and the storage medium of document Data Enter |
CN108229397A (en) * | 2018-01-04 | 2018-06-29 | 华南理工大学 | Method for text detection in image based on Faster R-CNN |
CN108549893A (en) * | 2018-04-04 | 2018-09-18 | 华中科技大学 | A kind of end-to-end recognition methods of the scene text of arbitrary shape |
CN109086756A (en) * | 2018-06-15 | 2018-12-25 | 众安信息技术服务有限公司 | A kind of text detection analysis method, device and equipment based on deep neural network |
CN109308476A (en) * | 2018-09-06 | 2019-02-05 | 邬国锐 | Billing information processing method, system and computer readable storage medium |
CN109492643A (en) * | 2018-10-11 | 2019-03-19 | 平安科技(深圳)有限公司 | Certificate recognition methods, device, computer equipment and storage medium based on OCR |
CN109448007A (en) * | 2018-11-02 | 2019-03-08 | 北京迈格威科技有限公司 | Image processing method, image processing apparatus and storage medium |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110516541B (en) * | 2019-07-19 | 2022-06-10 | 金蝶软件(中国)有限公司 | Text positioning method and device, computer readable storage medium and computer equipment |
CN110516541A (en) * | 2019-07-19 | 2019-11-29 | 金蝶软件(中国)有限公司 | Text positioning method, device, computer readable storage medium and computer equipment |
CN110738238A (en) * | 2019-09-18 | 2020-01-31 | 平安科技(深圳)有限公司 | certificate information classification positioning method and device |
CN110738238B (en) * | 2019-09-18 | 2023-05-26 | 平安科技(深圳)有限公司 | Classification positioning method and device for certificate information |
CN112749529A (en) * | 2019-10-29 | 2021-05-04 | 西安诺瓦星云科技股份有限公司 | Method and device for character self-adaption special-shaped edit box |
CN112836696A (en) * | 2019-11-22 | 2021-05-25 | 搜狗(杭州)智能科技有限公司 | Text data detection method and device and electronic equipment |
CN111178346A (en) * | 2019-11-22 | 2020-05-19 | 京东数字科技控股有限公司 | Character area positioning method, device, equipment and storage medium |
CN111178346B (en) * | 2019-11-22 | 2023-12-08 | 京东科技控股股份有限公司 | Text region positioning method, text region positioning device, text region positioning equipment and storage medium |
CN111160240A (en) * | 2019-12-27 | 2020-05-15 | 腾讯科技(深圳)有限公司 | Image object recognition processing method and device, intelligent device and storage medium |
CN111160240B (en) * | 2019-12-27 | 2024-05-24 | 腾讯科技(深圳)有限公司 | Image object recognition processing method and device, intelligent device and storage medium |
CN112418158A (en) * | 2020-02-11 | 2021-02-26 | 支付宝实验室(新加坡)有限公司 | System suitable for detecting identity card and device and processing method associated with same |
CN113469161A (en) * | 2020-03-31 | 2021-10-01 | 顺丰科技有限公司 | Method, device and storage medium for processing logistics list |
CN111598091A (en) * | 2020-05-20 | 2020-08-28 | 北京字节跳动网络技术有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
CN112232336A (en) * | 2020-09-02 | 2021-01-15 | 深圳前海微众银行股份有限公司 | Certificate identification method, device, equipment and storage medium |
CN112987994A (en) * | 2021-03-31 | 2021-06-18 | 维沃移动通信有限公司 | Frame selection annotation method, frame selection annotation device, electronic equipment and storage medium |
CN113111839A (en) * | 2021-04-25 | 2021-07-13 | 上海商汤智能科技有限公司 | Behavior recognition method and device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109977949B (en) | 2024-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109977949A (en) | Text positioning method, device, computer equipment and the storage medium of frame fine tuning | |
CN106920279B (en) | Three-dimensional map construction method and device | |
CN105917353B (en) | Feature extraction and matching for biological identification and template renewal | |
CN107633526A (en) | A kind of image trace point acquisition methods and equipment, storage medium | |
CN110110715A (en) | Text detection model training method, text filed, content determine method and apparatus | |
US11972506B2 (en) | Product image generation system | |
CN107507216A (en) | The replacement method of regional area, device and storage medium in image | |
CN110390260A (en) | Picture scanning part processing method, device, computer equipment and storage medium | |
CN107507217A (en) | Preparation method, device and the storage medium of certificate photo | |
CN109325538A (en) | Object detection method, device and computer readable storage medium | |
CN110033332A (en) | A kind of face identification method, system and electronic equipment and storage medium | |
CN103839058A (en) | Information locating method for document image based on standard template | |
CN107944324A (en) | A kind of Quick Response Code distortion correction method and device | |
CN109598234A (en) | Critical point detection method and apparatus | |
WO2021051868A1 (en) | Target location method and apparatus, computer device, computer storage medium | |
CN105955733B (en) | A kind of method, apparatus and mobile terminal for modifying icon | |
CN106796653A (en) | The electronic installation of image processing method and support the method | |
US20190220234A1 (en) | Methods, systems, apparatuses and devices for facilitating printing of a digital image based on image splitting | |
CN104834459B (en) | The system and method for auxiliary of drawing are provided using feature detection and semantic tagger | |
JP7379684B2 (en) | Image generation method and device and computer program | |
CN103049731A (en) | Decoding method for point-distributed color coding marks | |
CN108830888A (en) | Thick matching process based on improved multiple dimensioned covariance matrix Feature Descriptor | |
CN109146967A (en) | The localization method and device of target object in image | |
CN110298402A (en) | A kind of small target deteection performance optimization method | |
CN106371614A (en) | Gesture recognition optimizing method and device |
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: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.) Applicant after: Shenzhen Huafu Technology Co.,Ltd. Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.) Applicant before: SHENZHEN HUAFU INFORMATION TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |