CN111382734B - Method and device for detecting and identifying telephone number and storage medium - Google Patents
Method and device for detecting and identifying telephone number and storage medium Download PDFInfo
- Publication number
- CN111382734B CN111382734B CN201811640552.3A CN201811640552A CN111382734B CN 111382734 B CN111382734 B CN 111382734B CN 201811640552 A CN201811640552 A CN 201811640552A CN 111382734 B CN111382734 B CN 111382734B
- Authority
- CN
- China
- Prior art keywords
- candidate
- telephone number
- area
- region
- determining
- 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.)
- Active
Links
Images
Classifications
-
- 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/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The disclosure relates to a method, an apparatus and a storage medium for detecting and identifying a telephone number. The method for detecting and identifying the telephone number comprises the following steps: detecting a telephone number candidate area in a target image; correcting the telephone number candidate area to obtain an area to be identified; determining a category to which the region to be identified belongs; under the condition that the category to which the area to be identified belongs is a telephone number category, identifying the area to be identified to obtain a candidate telephone number corresponding to the area to be identified and the probability corresponding to the candidate telephone number; and determining a telephone number identification result corresponding to the target image according to the standard structure information of the telephone number and the probability corresponding to the candidate telephone number. The method and the device can avoid identifying the area of the non-telephone number, can avoid missing the marginal digit of the telephone number or externally expanding the area containing excessive background, and therefore can improve the accuracy and effectiveness of identifying the telephone number.
Description
Technical Field
The present disclosure relates to the field of image recognition technologies, and in particular, to a method and an apparatus for detecting and recognizing a phone number, and a storage medium.
Background
Telephone numbers are found in large numbers around people's lives, such as envelopes, express parcels, store door plaques, and the like. Automatically detecting and identifying telephone numbers in images is an important application of image recognition technology.
At present, the deep learning algorithm is widely applied to various aspects of image processing. In a plurality of application scenes, the effect of the deep learning algorithm is superior to that of the traditional image algorithm. In recent years, technologies with better performance, such as fast R-CNN (Faster Convolutional Neural network based on Region), YOLO (You need to see one eye), and R-FCN (global Convolutional network based on Region), have appeared in the field of target detection, and there are also many improved versions based on them, which can be applied to detection of telephone number regions. In the related art, in the detection process, the detection performance of fast R-CNN or YOLO can be improved by optimizing a multi-size and multi-aspect-ratio reference frame. However, the rectangular frame obtained by detection is not beneficial to the recognition task in the later period, which results in lower accuracy of detection and recognition of the telephone number in the related art.
Disclosure of Invention
In view of the above, the present disclosure provides a method, an apparatus, and a storage medium for detecting and identifying a phone number.
According to an aspect of the present disclosure, there is provided a method for detecting and identifying a phone number, including:
detecting a telephone number candidate area in a target image;
correcting the telephone number candidate area to obtain an area to be identified;
determining the category of the area to be identified;
under the condition that the category to which the area to be identified belongs is a telephone number category, identifying the area to be identified to obtain a candidate telephone number corresponding to the area to be identified and the probability corresponding to the candidate telephone number;
and determining a telephone number identification result corresponding to the target image according to the standard structure information of the telephone number and the probability corresponding to the candidate telephone number.
In one possible implementation, detecting a phone number candidate region in a target image includes:
detecting a candidate region in the target image through a candidate region network;
determining a class to which the candidate region belongs by a classification layer of a region-based convolutional neural network;
and determining the candidate area with the category as the telephone number candidate area.
In a possible implementation manner, the correcting the telephone number candidate region to obtain a region to be identified includes:
enlarging the telephone number candidate area according to a specified proportion to obtain an externally expanded area;
determining four end points of a minimum circumscribed quadrangle of a telephone number region in the extension region through a regression layer of a region-based convolutional neural network;
and determining the area to be identified according to the four end points of the minimum external quadrilateral of the telephone number area in the external expansion area.
In a possible implementation manner, determining a category to which the to-be-identified region belongs includes:
and determining the category of the region to be identified by adopting a two-classification network, wherein the two-classification network is obtained by training according to the positive sample and the negative sample needing to be filtered.
In a possible implementation manner, determining a phone number recognition result corresponding to the target image according to standard structure information of phone numbers and a probability corresponding to the candidate phone number includes:
and when the structure information of a first candidate telephone number meets the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all candidate telephone numbers meeting the standard structure information of the telephone number, and the probability corresponding to the first candidate telephone number is larger than a first threshold value, taking the first candidate telephone number as the telephone number identification result corresponding to the target image.
In a possible implementation manner, determining a phone number recognition result corresponding to the target image according to standard structure information of phone numbers and a probability corresponding to the candidate phone number includes:
and under the condition that the structure information of a first candidate phone number accords with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is the largest in all candidate phone numbers which accord with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is larger than a first threshold value, and the difference value between the probability corresponding to the first candidate phone number and the probability corresponding to a second candidate phone number is larger than a second threshold value, taking the first candidate phone number as the phone number identification result corresponding to the target image, wherein the second candidate phone number is the next candidate phone number to the first candidate phone number in all candidate phone numbers which accord with the standard structure information of the phone number.
According to another aspect of the present disclosure, there is provided a phone number detection and identification apparatus including:
the detection module is used for detecting a telephone number candidate area in the target image;
the correction module is used for correcting the telephone number candidate area to obtain an area to be identified;
the first determining module is used for determining the category of the area to be identified;
the identification module is used for identifying the area to be identified under the condition that the category to which the area to be identified belongs is a telephone number category to obtain a candidate telephone number corresponding to the area to be identified and the probability corresponding to the candidate telephone number;
and the second determining module is used for determining a phone number identification result corresponding to the target image according to the standard structure information of the phone number and the probability corresponding to the candidate phone number.
In one possible implementation, the detection module includes:
the detection sub-module is used for detecting a candidate region in the target image through a candidate region network;
a first determining submodule for determining a category to which the candidate region belongs through a classification layer of a region-based convolutional neural network;
and the second determining submodule is used for determining the candidate area of which the category is the telephone number category as the telephone number candidate area.
In one possible implementation, the correction module includes:
the expansion submodule is used for expanding the telephone number candidate area according to the specified proportion to obtain an external expansion area;
a third determining submodule, configured to determine four end points of a minimum enclosing quadrilateral of a telephone number region in the extension region through a regression layer of a convolutional neural network based on the region;
and the fourth determining submodule is used for determining the area to be identified according to the four end points of the minimum external quadrilateral of the telephone number area in the external expansion area.
In one possible implementation manner, the first determining module is configured to:
and determining the category of the region to be identified by adopting a two-classification network, wherein the two-classification network is obtained by training according to the positive sample and the negative sample needing to be filtered.
In one possible implementation manner, the second determining module is configured to:
and when the structure information of a first candidate phone number meets the standard structure information of the phone number, the probability corresponding to the first candidate phone number is the largest in all candidate phone numbers meeting the standard structure information of the phone number, and the probability corresponding to the first candidate phone number is larger than a first threshold, taking the first candidate phone number as the phone number identification result corresponding to the target image.
In one possible implementation manner, the second determining module is configured to:
and under the condition that the structure information of a first candidate phone number accords with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is the largest in all candidate phone numbers which accord with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is larger than a first threshold value, and the difference value between the probability corresponding to the first candidate phone number and the probability corresponding to a second candidate phone number is larger than a second threshold value, taking the first candidate phone number as the phone number identification result corresponding to the target image, wherein the second candidate phone number is the next candidate phone number to the first candidate phone number in all candidate phone numbers which accord with the standard structure information of the phone number.
According to another aspect of the present disclosure, there is provided a device for detecting and identifying a phone number, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
The method and the device for detecting and identifying the telephone number in each aspect of the disclosure obtain the to-be-identified area by correcting the candidate area of the telephone number, determine the category to which the to-be-identified area belongs, further identify the telephone number under the condition that the category to which the to-be-identified area belongs is the category of the telephone number, and determine the identification result of the telephone number according to the standard structure information of the telephone number, thereby avoiding identifying the area without the telephone number, avoiding missing the edge number of the telephone number or externally expanding the background containing too much, and improving the accuracy and the effectiveness of identifying the telephone number.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 illustrates a flow chart of a method for detecting and identifying a phone number according to an embodiment of the present disclosure.
Fig. 2 shows an exemplary flowchart of the detecting and identifying method step S11 of the phone number according to an embodiment of the disclosure.
Fig. 3 shows an exemplary flowchart of the detecting and identifying method step S12 of the phone number according to an embodiment of the disclosure.
Fig. 4 is a schematic diagram illustrating correction of the phone number candidate area in the phone number detection and identification method according to an embodiment of the disclosure.
Fig. 5a is a schematic diagram illustrating a target image in a method for detecting and recognizing a phone number according to an embodiment of the present disclosure.
Fig. 5b is a schematic diagram illustrating a phone number candidate region in a phone number detection and identification method according to an embodiment of the disclosure.
Fig. 5c is a schematic diagram illustrating an extension area in a method for detecting and identifying a phone number according to an embodiment of the disclosure.
Fig. 5d is a schematic diagram illustrating an area to be identified in a method for detecting and identifying a phone number according to an embodiment of the disclosure.
Fig. 6 shows a block diagram of a device for detecting and identifying a phone number according to an embodiment of the present disclosure.
Fig. 7 is a block diagram illustrating an apparatus 800 for detection and identification of telephone numbers in accordance with an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 illustrates a flow chart of a method for detecting and identifying a phone number according to an embodiment of the present disclosure. As shown in fig. 1, the method includes steps S11 through S15.
In step S11, a telephone number candidate region in the target image is detected.
The target image may be an image that needs to be subjected to phone number detection and identification.
In one possible implementation, a Faster Region-based Convolutional Neural network (Convolutional Neural network) may be employed to detect the phone number candidate Region in the target image.
In other possible implementations, the phone number candidate area in the target image may also be detected by YOLO (You need to Look at one), YOLO9000, or R-FCN (Region-based full convolution Networks), and the like.
In another possible implementation manner, the target image may be segmented by using a segmentation method such as FCN (full volume Networks), deep lab, or deep lab-Crf, so as to obtain a polygonal area containing the phone number, and the polygonal area containing the phone number is used as a phone number candidate area.
In step S12, the telephone number candidate area is corrected to obtain an area to be recognized.
In a possible implementation manner, the telephone number candidate region can be corrected through a regression layer of the Faster R-CNN, so that a region to be identified is obtained.
In this embodiment, by correcting the candidate area of the phone number, missing of the edge digits of the phone number or the inclusion of excessive background by the extension can be avoided, so that the accuracy of phone number identification can be improved.
In step S13, the category to which the region to be recognized belongs is determined.
In the present embodiment, after the region to be recognized is obtained, the category to which the region to be recognized belongs is determined again, so that it is possible to avoid recognizing a region other than a telephone number (for example, english, chinese characters, symbols, or the like), and it is possible to reduce the possibility of erroneous detection and improve the validity of telephone number recognition.
In one possible implementation manner, determining a category to which the to-be-identified region belongs includes: and determining the category of the area to be identified by adopting a two-classification network, wherein the two-classification network is obtained according to the training of the positive sample and the negative sample needing to be filtered. Wherein, the positive sample refers to the sample belonging to the telephone number category, and the negative sample to be filtered refers to the sample not belonging to the telephone number category to be filtered. In the implementation mode, a two-classification network is obtained according to the training of the positive and negative samples, and the class to which the region to be identified belongs is determined by adopting the two-classification network, so that the possibility of false detection can be reduced.
In step S14, when the category to which the to-be-recognized region belongs is a phone number category, the to-be-recognized region is recognized, and a candidate phone number corresponding to the to-be-recognized region and a probability corresponding to the candidate phone number are obtained.
In this embodiment, the region to be recognized may be recognized through one or more of a current Neural network (RNN), a Long-Term Recurrent computational network (LRCN), a Long-Term Memory (LSTM), and a Short-Term Memory (LSTM) Neural network, so as to obtain a candidate phone number corresponding to the region to be recognized and a probability corresponding to the candidate phone number.
In a possible implementation manner, a feature map of a region to be recognized may be extracted through a CNN (Convolutional neural network) in the LRCN, the feature map is divided into a plurality of sub-maps, and the plurality of sub-maps are input into the RNN for recognition according to a specified order, so as to obtain a number recognition result corresponding to each sub-map. And according to the number recognition result corresponding to each sub-image, obtaining the candidate telephone number corresponding to the area to be recognized. For example, M telephone numbers with the highest probability are taken as candidate telephone numbers, where M is a positive integer.
In another possible implementation, an OCR (Optical Character Recognition) method may be employed to recognize a phone number in the region to be recognized.
In step S15, a phone number recognition result corresponding to the target image is determined according to the standard structure information of the phone numbers and the probability corresponding to the candidate phone numbers.
The standard structure information of the telephone number may include one or more of the digit number of the telephone number, the area code, the mobile access code, the identification code, the mobile subscriber number and the like. If the phone Number is a Mobile phone Number, the phone Number needs to conform to the standard structure information of MDN (Mobile Directory Number). The standard structure information of the MDN comprises a 3-bit mobile access code, a 4-bit identification code and a 4-bit mobile subscriber number, wherein the first bit of the mobile access code is 1.
In a possible implementation manner, determining a phone number recognition result corresponding to the target image according to the standard structure information of the phone number and the probability corresponding to the candidate phone number may include: and when the structure information of the first candidate telephone number conforms to the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all the candidate telephone numbers conforming to the standard structure information of the telephone number, and the probability corresponding to the first candidate telephone number is larger than a first threshold value, taking the first candidate telephone number as the telephone number identification result corresponding to the target image.
In another possible implementation manner, determining a phone number recognition result corresponding to the target image according to the standard structure information of the phone number and the probability corresponding to the candidate phone number may include: and under the condition that the structure information of the first candidate telephone number accords with the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all candidate telephone numbers which accord with the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is larger than a first threshold value, and the difference value between the probability corresponding to the first candidate telephone number and the probability corresponding to the second candidate telephone number is larger than a second threshold value, taking the first candidate telephone number as the identification result of the telephone number corresponding to the target image, wherein the second candidate telephone number is the candidate telephone number of which the probability is only next to the first candidate telephone number in all candidate telephone numbers which accord with the standard structure information of the telephone number.
In another possible implementation manner, determining a phone number recognition result corresponding to the target image according to the standard structure information of the phone number and the probability corresponding to the candidate phone number may include: and under the condition that the structure information of the candidate telephone numbers all accords with the standard structure information of the telephone numbers, the probabilities corresponding to the candidate telephone numbers are all larger than a first threshold value, and the probability difference corresponding to the candidate telephone numbers is small, taking the candidate telephone numbers as the telephone number identification results corresponding to the target image, and providing the telephone number identification results for the user to manually verify according to the candidate telephone numbers.
In the embodiment, the candidate area of the telephone number is corrected to obtain the area to be identified, the category to which the area to be identified belongs is determined, the telephone number is further identified under the condition that the category to which the area to be identified belongs is the category of the telephone number, and the identification result of the telephone number is determined according to the standard structure information of the telephone number, so that the area which is not the telephone number can be prevented from being identified, the edge number of the telephone number can be prevented from being missed or excessive background contained in the extension, and the accuracy and the effectiveness of identifying the telephone number can be improved.
In addition, the embodiment unifies detection and identification in a set of frames, and the accuracy of identification can be improved by optimizing the detection result; and training the two-classification network according to the negative samples in the recognition result, which is beneficial to improving the accuracy of detection.
Fig. 2 shows an exemplary flowchart of the step S11 of the method for detecting and identifying a phone number according to an embodiment of the disclosure. As shown in fig. 2, step S11 may include step S111 to step S113.
In step S111, a candidate region in the target image is detected by the candidate region network.
In one possible implementation, the candidate Region in the target image may be detected by a Region candidate Network (RPN) of Faster R-CNN.
As an example of this implementation, the candidate area network may align the size and aspect ratio of the reference frame according to the actual application scenario. For example, the reference frame may include 5 sizes, 16 pixels, 32 pixels, 64 pixels, 128 pixels, and 256 pixels, respectively; the reference frame may include 3 aspect ratios, 5:1, 2:1, and 1:1, respectively.
In one possible implementation, VGGNet may be employed to extract features of the region to be identified. Because the features extracted by deep networks such as VGGNet and the like are richer, the detected candidate region is more accurate.
In step S112, the category to which the candidate region belongs is determined by the classification layer of the region-based convolutional neural network.
In one possible implementation, the Region-based Convolutional Neural network (R-CNN) may be Faster R-CNN.
In one possible implementation, after the candidate area network provides a large number of candidate areas, whether the category to which each candidate area belongs is a phone number candidate area may be determined by the classification layer of the Faster R-CNN.
In step S113, a candidate area to which the category belongs is a telephone number category is determined as a telephone number candidate area.
Fig. 3 shows an exemplary flowchart of the step S12 of the method for detecting and identifying a phone number according to an embodiment of the disclosure. As shown in fig. 3, step S12 may include steps S121 to S123.
In step S121, the telephone number candidate area is enlarged in a predetermined ratio to obtain an expanded area.
Fig. 4 is a schematic diagram illustrating correction of a phone number candidate area in a phone number detection and identification method according to an embodiment of the disclosure. As shown in fig. 4, the extended area 42 may be obtained by extending the height of the telephone number candidate area 41 to 2 times the original height and extending the width of the telephone number candidate area 41 to 1.2 times the original width. The candidate area of the telephone number is enlarged according to the designated proportion to obtain the expanded area, so that the missing of the marginal digits of the telephone number can be avoided.
In step S122, four end points of a minimum bounding quadrilateral of the telephone number region in the flaring region are determined by the regression layer of the region-based convolutional neural network.
As shown in fig. 4, the regression layer may extract features of the flaring region to determine the four endpoints A, B, C and D of the smallest circumscribing quadrilateral of the telephone number region 43. Wherein the coordinates of the end point may be equal to the ratio of the distance of the end point from the origin to the quadrant length. For example, the coordinates of endpoint A may be (W/W, H/H), where W represents the horizontal distance of endpoint A from the origin, W represents the horizontal length of the quadrant, H represents the vertical distance of endpoint A from the origin, and H represents the vertical height of the quadrant.
In step S123, the area to be identified is determined based on the four end points of the minimum bounding rectangle of the telephone number area in the extension area.
In this embodiment, the area to be identified may be determined as a rectangle, and four end points of a minimum enclosing quadrangle of the telephone number area in the extension area are respectively used as four end points of the area to be identified, thereby determining the area to be identified.
The method for detecting and identifying the telephone number can efficiently detect and identify the telephone number in a natural scene. In the embodiment, by detecting whether the target image contains the telephone number, the image not containing the telephone number can be filtered, and the image containing the telephone number is reserved. By determining the telephone number recognition result corresponding to the target image, the telephone number in the target image can be extracted to provide support for later data application. The embodiment combines the two processes of detection and identification, and can meet the requirement of industrial available precision on the premise of ensuring high recall.
Application example:
taking the identification of the shop phone number in the street view photo as an example, fig. 5a is a schematic diagram illustrating a target image in the method for detecting and identifying a phone number according to an embodiment of the disclosure. Fig. 5b is a schematic diagram illustrating a phone number candidate region in a phone number detection and identification method according to an embodiment of the disclosure. Fig. 5c is a schematic diagram illustrating an extension area in a method for detecting and identifying a phone number according to an embodiment of the disclosure. Fig. 5d is a schematic diagram illustrating an area to be identified in a method for detecting and identifying a phone number according to an embodiment of the disclosure. As shown in fig. 5a-5d, the telephone number candidate area 51 in the target image may be obtained using fast R-CNN. The extension area 52 can be obtained by expanding the telephone number candidate area 51 by a prescribed ratio. The region to be identified 53 can be determined by determining the four end points of the minimum bounding rectangle of the telephone number region in the extension region 52 using the regression layer. As can be seen from fig. 5d, the determined region 53 to be identified can reduce background interference, and can avoid missing edge digits of the phone number, which is beneficial to improving the accuracy of phone number identification. After determining that the category to which the region 53 to be recognized belongs is a telephone number category, the region 53 to be recognized is recognized, and the 3 candidate telephone numbers with the highest probability are "75027279508", "15027279508" and "16027279508". According to the standard structure information of the telephone numbers, the first bit of the mobile access code is 1, so that 75027279508 is filtered out, and 15027279508 with higher probability in the remaining two candidate telephone numbers is selected as the corresponding telephone number identification result of the target image.
Fig. 6 shows a block diagram of a device for detecting and identifying a phone number according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus includes: a detection module 61, configured to detect a phone number candidate region in a target image; the correction module 62 is configured to correct the telephone number candidate region to obtain a region to be identified; a first determining module 63, configured to determine a category to which the to-be-identified region belongs; the identification module 64 is configured to identify the region to be identified when the category to which the region to be identified belongs is a telephone number category, and obtain a candidate telephone number corresponding to the region to be identified and a probability corresponding to the candidate telephone number; and a second determining module 65, configured to determine a phone number identification result corresponding to the target image according to the standard structure information of the phone number and the probability corresponding to the candidate phone number.
In one possible implementation, the detection module 61 includes: the detection submodule is used for detecting a candidate region in the target image through a candidate region network; a first determining submodule for determining a category to which the candidate region belongs through a classification layer of the region-based convolutional neural network; and the second determining submodule is used for determining the candidate area of which the category belongs to be the telephone number category as the telephone number candidate area.
In one possible implementation, the correction module 62 includes: the expansion submodule is used for expanding the telephone number candidate area according to the specified proportion to obtain an external expansion area; a third determining submodule for determining four end points of a minimum circumscribed quadrangle of the telephone number region in the extension region through a regression layer of the convolutional neural network based on the region; and the fourth determining submodule is used for determining the area to be identified according to the four end points of the minimum external quadrilateral of the telephone number area in the external expansion area.
In one possible implementation, the first determining module 63 is configured to: and determining the category of the area to be identified by adopting a two-classification network, wherein the two-classification network is obtained according to the training of the positive sample and the negative sample needing to be filtered.
In one possible implementation, the second determining module 65 is configured to: and when the structure information of the first candidate telephone number conforms to the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all the candidate telephone numbers conforming to the standard structure information of the telephone number, and the probability corresponding to the first candidate telephone number is larger than a first threshold value, taking the first candidate telephone number as the telephone number identification result corresponding to the target image.
In one possible implementation, the second determining module 65 is configured to: and under the condition that the structure information of the first candidate telephone number accords with the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all candidate telephone numbers which accord with the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is larger than a first threshold value, and the difference value between the probability corresponding to the first candidate telephone number and the probability corresponding to the second candidate telephone number is larger than a second threshold value, taking the first candidate telephone number as the identification result of the telephone number corresponding to the target image, wherein the second candidate telephone number is the candidate telephone number of which the probability is only next to the first candidate telephone number in all candidate telephone numbers which accord with the standard structure information of the telephone number.
In the embodiment, the candidate area of the telephone number is corrected to obtain the area to be identified, the category to which the area to be identified belongs is determined, the telephone number is further identified under the condition that the category to which the area to be identified belongs is the category of the telephone number, and the identification result of the telephone number is determined according to the standard structure information of the telephone number, so that the area which is not the telephone number can be prevented from being identified, the edge number of the telephone number can be prevented from being missed or excessive background contained in the extension, and the accuracy and the effectiveness of identifying the telephone number can be improved.
Fig. 7 is a block diagram illustrating an apparatus 800 for detection and identification of telephone numbers in accordance with an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a Microphone (MIC) configured to receive external audio signals when apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer-readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (8)
1. A method for detecting and identifying a telephone number, comprising:
detecting a telephone number candidate area in a target image;
correcting the telephone number candidate area to obtain an area to be identified;
determining a category to which the region to be identified belongs;
under the condition that the category to which the area to be identified belongs is a telephone number category, identifying the area to be identified to obtain a candidate telephone number corresponding to the area to be identified and the probability corresponding to the candidate telephone number;
determining a phone number identification result corresponding to the target image according to standard structure information of phone numbers and the probability corresponding to the candidate phone numbers;
the correcting the telephone number candidate area to obtain an area to be identified includes:
enlarging the telephone number candidate area according to a specified proportion to obtain an externally expanded area;
determining four end points of a minimum circumscribed quadrangle of a telephone number region in the extension region through a regression layer of a region-based convolutional neural network;
and determining the area to be identified according to the four end points of the minimum external quadrilateral of the telephone number area in the external expansion area.
2. The method of claim 1, wherein detecting a phone number candidate region in a target image comprises:
detecting a candidate region in the target image through a candidate region network;
determining a class to which the candidate region belongs by a classification layer of a region-based convolutional neural network;
and determining the candidate area with the category as the telephone number candidate area.
3. The method of claim 1, wherein determining the phone number recognition result corresponding to the target image according to the standard structure information of the phone numbers and the probability corresponding to the candidate phone numbers comprises:
and when the structure information of a first candidate telephone number meets the standard structure information of the telephone number, the probability corresponding to the first candidate telephone number is the largest in all candidate telephone numbers meeting the standard structure information of the telephone number, and the probability corresponding to the first candidate telephone number is larger than a first threshold value, taking the first candidate telephone number as the telephone number identification result corresponding to the target image.
4. The method of claim 1, wherein determining the phone number recognition result corresponding to the target image according to the standard structure information of the phone numbers and the probability corresponding to the candidate phone numbers comprises:
and under the condition that the structure information of a first candidate phone number accords with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is the largest in all candidate phone numbers which accord with the standard structure information of the phone number, the probability corresponding to the first candidate phone number is larger than a first threshold value, and the difference value between the probability corresponding to the first candidate phone number and the probability corresponding to a second candidate phone number is larger than a second threshold value, taking the first candidate phone number as the phone number identification result corresponding to the target image, wherein the second candidate phone number is the next candidate phone number to the first candidate phone number in all candidate phone numbers which accord with the standard structure information of the phone number.
5. A device for detecting and identifying telephone numbers, comprising:
the detection module is used for detecting a telephone number candidate area in the target image;
the correction module is used for correcting the telephone number candidate area to obtain an area to be identified;
the first determining module is used for determining the category of the to-be-identified region;
the identification module is used for identifying the area to be identified under the condition that the category to which the area to be identified belongs is a telephone number category to obtain a candidate telephone number corresponding to the area to be identified and the probability corresponding to the candidate telephone number;
the second determining module is used for determining a phone number identification result corresponding to the target image according to standard structure information of phone numbers and the probability corresponding to the candidate phone numbers;
wherein the correction module comprises:
the expansion submodule is used for expanding the telephone number candidate area according to the specified proportion to obtain an external expansion area;
a third determining submodule, configured to determine four end points of a minimum enclosing quadrilateral of a telephone number region in the extension region through a regression layer of a convolutional neural network based on the region;
and the fourth determining submodule is used for determining the area to be identified according to the four end points of the minimum external quadrilateral of the telephone number area in the external expansion area.
6. The apparatus of claim 5, wherein the detection module comprises:
the detection sub-module is used for detecting a candidate region in the target image through a candidate region network;
a first determining submodule for determining a category to which the candidate region belongs through a classification layer of a region-based convolutional neural network;
and the second determining submodule is used for determining the candidate area of which the category is the telephone number category as the telephone number candidate area.
7. A device for detecting and identifying telephone numbers, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 4.
8. A computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811640552.3A CN111382734B (en) | 2018-12-29 | 2018-12-29 | Method and device for detecting and identifying telephone number and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811640552.3A CN111382734B (en) | 2018-12-29 | 2018-12-29 | Method and device for detecting and identifying telephone number and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111382734A CN111382734A (en) | 2020-07-07 |
CN111382734B true CN111382734B (en) | 2022-08-23 |
Family
ID=71216625
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811640552.3A Active CN111382734B (en) | 2018-12-29 | 2018-12-29 | Method and device for detecting and identifying telephone number and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111382734B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113780043A (en) * | 2020-11-27 | 2021-12-10 | 北京京东尚科信息技术有限公司 | Object detection method, system, computer system, and computer-readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102761668A (en) * | 2012-07-13 | 2012-10-31 | 青岛海信传媒网络技术有限公司 | Method and device for dialing telephone call based on telephone number information in pictures |
CN107862251A (en) * | 2017-10-20 | 2018-03-30 | 惠州Tcl移动通信有限公司 | A kind of method, mobile terminal and the storage medium of telephone number typing processing |
CN108229267A (en) * | 2016-12-29 | 2018-06-29 | 北京市商汤科技开发有限公司 | Object properties detection, neural metwork training, method for detecting area and device |
CN109034266A (en) * | 2018-08-16 | 2018-12-18 | 新智数字科技有限公司 | A kind of target image detection method, apparatus and system |
-
2018
- 2018-12-29 CN CN201811640552.3A patent/CN111382734B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102761668A (en) * | 2012-07-13 | 2012-10-31 | 青岛海信传媒网络技术有限公司 | Method and device for dialing telephone call based on telephone number information in pictures |
CN108229267A (en) * | 2016-12-29 | 2018-06-29 | 北京市商汤科技开发有限公司 | Object properties detection, neural metwork training, method for detecting area and device |
CN107862251A (en) * | 2017-10-20 | 2018-03-30 | 惠州Tcl移动通信有限公司 | A kind of method, mobile terminal and the storage medium of telephone number typing processing |
CN109034266A (en) * | 2018-08-16 | 2018-12-18 | 新智数字科技有限公司 | A kind of target image detection method, apparatus and system |
Also Published As
Publication number | Publication date |
---|---|
CN111382734A (en) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111339846B (en) | Image recognition method and device, electronic equipment and storage medium | |
US20210042474A1 (en) | Method for text recognition, electronic device and storage medium | |
CN110287874B (en) | Target tracking method and device, electronic equipment and storage medium | |
CN112001321B (en) | Network training method, pedestrian re-identification method, device, electronic equipment and storage medium | |
US10157326B2 (en) | Method and device for character area identification | |
CN113538407B (en) | Anchor point determining method and device, electronic equipment and storage medium | |
US10216976B2 (en) | Method, device and medium for fingerprint identification | |
CN109934275B (en) | Image processing method and device, electronic equipment and storage medium | |
CN109615006B (en) | Character recognition method and device, electronic equipment and storage medium | |
CN110990801B (en) | Information verification method and device, electronic equipment and storage medium | |
CN110781813B (en) | Image recognition method and device, electronic equipment and storage medium | |
CN108062547B (en) | Character detection method and device | |
CN112465843A (en) | Image segmentation method and device, electronic equipment and storage medium | |
CN110532956B (en) | Image processing method and device, electronic equipment and storage medium | |
CN111126108B (en) | Training and image detection method and device for image detection model | |
US20210326649A1 (en) | Configuration method and apparatus for detector, storage medium | |
CN110569835A (en) | Image identification method and device and electronic equipment | |
CN111523599B (en) | Target detection method and device, electronic equipment and storage medium | |
CN112085097A (en) | Image processing method and device, electronic equipment and storage medium | |
CN113538310A (en) | Image processing method and device, electronic equipment and storage medium | |
CN111382734B (en) | Method and device for detecting and identifying telephone number and storage medium | |
CN110929545A (en) | Human face image sorting method and device | |
CN113283343A (en) | Crowd positioning method and device, electronic equipment and storage medium | |
CN110826463B (en) | Face recognition method and device, electronic equipment and storage medium | |
CN113506324B (en) | Image processing method and device, electronic equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |