CN111814514A - Number identification device, method and electronic device - Google Patents

Number identification device, method and electronic device Download PDF

Info

Publication number
CN111814514A
CN111814514A CN201910288456.5A CN201910288456A CN111814514A CN 111814514 A CN111814514 A CN 111814514A CN 201910288456 A CN201910288456 A CN 201910288456A CN 111814514 A CN111814514 A CN 111814514A
Authority
CN
China
Prior art keywords
training
image
digit
numbers
model
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.)
Pending
Application number
CN201910288456.5A
Other languages
Chinese (zh)
Inventor
祝贤坦
谭志明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201910288456.5A priority Critical patent/CN111814514A/en
Priority to JP2020011823A priority patent/JP7396076B2/en
Publication of CN111814514A publication Critical patent/CN111814514A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • G06V20/42Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items of sport video content
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/62Text, e.g. of license plates, overlay texts or captions on TV images
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/28Character recognition specially adapted to the type of the alphabet, e.g. Latin alphabet
    • G06V30/293Character recognition specially adapted to the type of the alphabet, e.g. Latin alphabet of characters other than Kanji, Hiragana or Katakana

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Image Analysis (AREA)
  • Character Input (AREA)
  • Character Discrimination (AREA)

Abstract

本发明实施例提供一种号码识别装置、方法以及电子设备。所述方法包括:使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;使用所述训练模型对待检测图像中的号码进行单数字检测;以及将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。由此,即使在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且具有较高的识别精度。

Figure 201910288456

Embodiments of the present invention provide a number identification device, method, and electronic device. The method includes: using training images to train a training model for number recognition; performing coordinate transformation on a training image, and using one or more coordinate transformed images as positive samples of training data; using the The training model performs single-digit detection on the number in the image to be detected; and combines one or more numbers obtained through the single-digit detection to obtain the number in the image to be detected. Therefore, even in the case of few training samples, the training of the classifier can be completed simply and quickly, and has high recognition accuracy.

Figure 201910288456

Description

号码识别装置、方法以及电子设备Number identification device, method and electronic device

技术领域technical field

本发明实施例涉及图像识别技术,尤其涉及一种号码识别装置、方法以及电子设备。Embodiments of the present invention relate to image recognition technology, and in particular, to a number recognition device, method, and electronic device.

背景技术Background technique

随着信息技术的不断发展,号码识别(或号码检测)的应用也日益广泛。例如,标志牌、运动员、工作人员、考生等需要检测对象(或称为待检测物体)上具有由一个或多个数字组成的号码,在一些场景下需要对这些号码进行自动识别,由此进行各种应用。With the continuous development of information technology, the application of number identification (or number detection) is also increasingly widespread. For example, signs, athletes, staff, candidates, etc. need to detect objects (or called objects to be detected) with numbers consisting of one or more numbers. In some scenarios, these numbers need to be automatically identified. various applications.

例如,在篮球比赛中,通过对运动员的球服上的号码进行检测和识别,可以根据识别结果确定相应的运动员。这样,能够通过整个比赛的视频来跟踪和描绘每个运动员的轨迹,从而提供更好的技术辅助。For example, in a basketball game, by detecting and recognizing the numbers on the players' jerseys, the corresponding players can be determined according to the recognition results. In this way, each athlete's trajectory can be tracked and depicted through video of the entire game, providing better technical assistance.

在传统的号码识别方法中,一般使用分类器对所有可能的号码进行分类。例如,对于篮球运动员而言,其可能的号码为0至99,那��对这种号码进行分类的分类器的类别需要100种。即,需要针对每个类别收集大量的训练数据并进行训练。In traditional number recognition methods, a classifier is generally used to classify all possible numbers. For example, for a basketball player, whose possible numbers are 0 to 99, there would need to be 100 classes of classifiers to classify such numbers. That is, a large amount of training data needs to be collected and trained for each class.

应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。It should be noted that the above description of the technical background is only for the convenience of clearly and completely describing the technical solutions of the present invention and facilitating the understanding of those skilled in the art. It should not be assumed that the above-mentioned technical solutions are well known to those skilled in the art simply because these solutions are described in the background section of the present invention.

发明内容SUMMARY OF THE INVENTION

发明人发现,传统的号码识别方法需要收集大量训练数据,因此耗费时间和精力;并且,有些类别的训练数据难以收集,例如对于某些很少被使用的号码,很难收集这些号码的训练数据进行分类器的训练。The inventor found that the traditional number recognition method needs to collect a large amount of training data, so it consumes time and energy; and some categories of training data are difficult to collect, for example, for some rarely used numbers, it is difficult to collect the training data of these numbers Train the classifier.

针对上述技术问题的至少之一,本发明实施例提供一种号码识别装置、方法以及电子设备;期待在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且具有较高的识别精度。Aiming at at least one of the above technical problems, the embodiments of the present invention provide a number identification device, method, and electronic device; it is expected that the training of the classifier can be completed simply and quickly under the condition of few training samples, and it has a high performance. recognition accuracy.

根据本发明实施例的第一个方面,提供一种号码识别装置,包括:According to a first aspect of the embodiments of the present invention, a number identification device is provided, including:

训练单元,其使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;A training unit, which uses a training image to train a training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of the training data;

检测单元,其使用所述训练模型对待检测图像中的号码进行单数字检测;以及a detection unit, which uses the training model to perform single-digit detection on the numbers in the images to be detected; and

合并单元,其将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。A merging unit, which merges one or more numbers obtained by the single-digit detection to obtain the numbers in the image to be detected.

根据本发明实施例的第二个方面,提供一种号码识别方法,包括:According to a second aspect of the embodiments of the present invention, a number identification method is provided, including:

使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;Using the training image to train the training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of the training data;

使用所述训练模型对待检测图像中的号码进行单数字检测;以及using the training model to perform single digit detection on the number in the image to be detected; and

将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。One or more numbers obtained by the single-digit detection are combined to obtain the number in the image to be detected.

根据本发明实施例的第三个方面,提供一种电子设备,包括如上所述的号码识别装置。According to a third aspect of the embodiments of the present invention, an electronic device is provided, including the above-mentioned number identification device.

本发明实施例的有益效果之一在于:对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;使用训练模型对待检测图像中的号码进行单数字检测;以及将通过所述单数字检测得到的一个或多个数字进行合并以获得待检测图像中的号码。由此,即使在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且具有较高的识别精度。One of the beneficial effects of the embodiments of the present invention is: performing coordinate transformation on a certain training image, and using one or more images after coordinate transformation as positive samples of training data; detecting; and combining one or more numbers obtained by the single-digit detection to obtain the number in the image to be detected. Therefore, even in the case of few training samples, the training of the classifier can be completed simply and quickly, and has high recognition accuracy.

参照后文的说明和附图,详细公开了本发明实施例的特定实施方式,指明了本发明实施例的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。With reference to the following description and drawings, specific implementations of embodiments of the present invention are disclosed in detail, indicating the manner in which the principles of the embodiments of the present invention may be employed. It should be understood that embodiments of the present invention are not thereby limited in scope. Embodiments of the invention include many changes, modifications and equivalents within the spirit and scope of the appended claims.

针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。Features described and/or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, in combination with, or instead of features in other embodiments .

应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个���更多个其它特征、整件、步骤或组件的存在或附加。It should be emphasized that the term "comprising/comprising" when used herein refers to the presence of a feature, integer, step or component, but does not exclude the presence or addition of one or more other features, integers, steps or components.

附图说明Description of drawings

所包括的附图用来提供对本发明实施例的进一步的理解,其构成了说明书的一部分,用于例示本发明的实施方式,并与文字描述一起来阐释本发明的原理。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。在附图中:The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention, constitute a part of the specification, are used to illustrate embodiments of the invention, and together with the written description, serve to explain the principles of the invention. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort. In the attached image:

图1是本发明实施例的号码识别方法的一个示意图;1 is a schematic diagram of a number identification method according to an embodiment of the present invention;

图2是本发明实施例的待检测图像的一个示意图;2 is a schematic diagram of an image to be detected according to an embodiment of the present invention;

图3是图2中的待检测物体所在检测框及单数字检测结果的一个示意图;Fig. 3 is a schematic diagram of the detection frame where the object to be detected is located and the single-digit detection result in Fig. 2;

图4是本发明实施例的训练图像的一个示例图;4 is an exemplary diagram of a training image according to an embodiment of the present invention;

图5是本发明实施例的将该训练图像坐标变换后的一个示意图;5 is a schematic diagram of the training image coordinate transformed according to an embodiment of the present invention;

图6是本发明实施例的训练图像的另一个示例图;6 is another example diagram of a training image according to an embodiment of the present invention;

图7是本发明实施例的将该训练图像坐标变换后的一个示意图;7 is a schematic diagram of the training image coordinate transformed according to an embodiment of the present invention;

图8是本发明实施例的训练图像的另一个示例图;8 is another example diagram of a training image according to an embodiment of the present invention;

图9是本发明实施例的号码识别装置的一个示意图;9 is a schematic diagram of a number identification device according to an embodiment of the present invention;

图10是本发明实施例的电子设备的示意图。FIG. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

参照附图,通过下面的说明书,本发明实施例的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明实施例的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明实施例包括落入所附权利要求的范围内的全部修改、变型以及等同物。The foregoing and other features of embodiments of the present invention will become apparent from the following description with reference to the accompanying drawings. In the specification and drawings, specific embodiments of the invention are disclosed in detail, which are indicative of some of the embodiments in which the principles of the embodiments of the invention may be employed, it being understood that the invention is not limited to the described embodiments, but rather , the embodiments of the present invention include all modifications, variations and equivalents falling within the scope of the appended claims.

在本发明实施例中,术语“第一”、“第二”等用于对不同元素从称谓上进行区分,但并不表示这些元素的空间排列或时间顺序等,这些元素不应被这些术语所限制。术语“和/或”包括相关联列出的术语的一种或多个中的任何一个和所有组合。术语“包含”、“包括”、“具有”等是指所陈述的特征、元素、元件或组件的存在,但并不排除存在或添加一个或多个其他特征、元素、元件或组件。In the embodiments of the present invention, the terms "first", "second", etc. are used to distinguish different elements in terms of appellation, but do not indicate the spatial arrangement or temporal order of these elements, and these elements should not be used by these terms restricted. The term "and/or" includes any and all combinations of one or more of the associated listed items. The terms "comprising", "including", "having", etc. refer to the presence of stated features, elements, elements or components, but do not preclude the presence or addition of one or more other features, elements, elements or components.

在本发明实施例中,单数形式“一”、“该”等包括复数形式,应广义地理解为“一种”或“一类”而并不是限定为“一个”的含义;此外术语“所述”应理解为既包括单数形式也包括复数形式,除非上下文另外明确指出。此外术语“根据”应理解为“至少部分根据……”,术语“基于”应理解为“至少部分基于……”,除非上下文另外明确指出。In the embodiments of the present invention, the singular forms "a", "the", etc. include plural forms, and should be broadly understood as "a" or "a class" rather than being limited to the meaning of "an"; in addition, the term "the" "" is understood to include both the singular and the plural, unless the context clearly dictates otherwise. In addition, the term "based on" should be understood as "at least in part based on..." and the term "based on" should be understood as "based at least in part on..." unless the context clearly dictates otherwise.

在本发明实施例中,以卷积神经网络(CNN,Convolutional Neural Network)为例对训练模型进行示例性说明;例如,该卷积神经网络可以是Faster R-CNN、FPN(FeaturePyramid Networks for object Detection)或YOLO(You Only Look Once:Unified,Real-Time Object Detection),等等,本发明不限于此。关于训练模型、训练样本、训练图像等基本概念和内容可以参考相关技术。In this embodiment of the present invention, a convolutional neural network (CNN, Convolutional Neural Network) is used as an example to illustrate the training model; for example, the convolutional neural network may be Faster R-CNN, FPN (Feature Pyramid Networks for object Detection ) or YOLO (You Only Look Once: Unified, Real-Time Object Detection), etc., the present invention is not limited thereto. For basic concepts and content such as training models, training samples, and training images, you can refer to related technologies.

实施例1Example 1

本发明实施例提供一种号码识别方法。图1是本发明实施例的号码识别方法的一个示意图,如图1所示,所述方法包括:The embodiment of the present invention provides a number identification method. FIG. 1 is a schematic diagram of a number identification method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:

步骤101,使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;Step 101, using training images to train a training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of training data;

步骤102,使用所述训练模型对待检测图像中的号码进行单数字检测;以及Step 102, using the training model to perform single-digit detection on the number in the image to be detected; and

步骤103,将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。Step 103: Combine one or more numbers obtained through the single-digit detection to obtain the numbers in the image to be detected.

在一个实施例中,待检测物体可以是具有识别号码的需求的任何物体。例如,该待检测物体是车牌、比赛中的运动员、包含号码的标示牌、参加活动的工作人员、参加考试或竞赛的选手等。例如,对于参加比赛的篮球或足球运动员,其可能的号码为0至99,对于参加比赛的田径运动员,其可能的号码为0000至9999。In one embodiment, the object to be detected can be any object that has a requirement for an identification number. For example, the object to be detected is a license plate, an athlete in a competition, a sign containing a number, a staff member participating in an event, a player participating in an exam or a competition, and the like. For example, for a basketball or soccer player participating in a game, the possible numbers are 0 to 99, and for a track and field player participating in a game, the possible numbers are 0000 to 9999.

在一个实施例中,训练图像和待检测图像是可能包含待检测物体的图像。例如,该待检测物体是篮球运动员,则训练图像和待检测图像均可以是篮球比赛的视频中的至少一个图像。In one embodiment, the training image and the image to be detected are images that may contain objects to be detected. For example, if the object to be detected is a basketball player, both the training image and the image to be detected may be at least one image in a video of a basketball game.

在步骤101中,可以使用多个训练图像,基于卷积神经网络(CNN,ConvolutionalNeural Network)对训练模型进行训练。卷积神经网络的具体结构和具体如何训练可以参照相关技术。关于训练图像的坐标变换,将在后面的实施例中详细说明。In step 101, a training model may be trained based on a convolutional neural network (CNN, Convolutional Neural Network) using multiple training images. The specific structure of the convolutional neural network and how to train it can refer to related technologies. The coordinate transformation of the training image will be described in detail in the following embodiments.

在步骤102中,对待检测图像中的号码,可以使用基于CNN的训练模型进行一次或多次的单数字检测,可以检测出一个或多个数字。由于卷积神经网络具有强大的目标识别能力,能够从现实环境中简化复杂的因素,从而进一步提高检测效率和检测精度。In step 102, for the number in the image to be detected, one or more single-digit detections may be performed by using the CNN-based training model, and one or more numbers may be detected. Since the convolutional neural network has powerful target recognition ability, it can simplify the complex factors from the real environment, thereby further improving the detection efficiency and detection accuracy.

值得注意的是,以上附图1仅示意性地对本发明实施例进行了说明,但本发明不限于此。例如可以适当地调整各个步骤之间的执行顺序,此外还可以增加其他的一些步骤或者减少其中的某些步骤。本领域的技术人员可以根据上述内容进行适当地变型,而不仅限于上述附图1的记载。It should be noted that the above Figure 1 only schematically illustrates the embodiment of the present invention, but the present invention is not limited thereto. For example, the execution order of the various steps can be adjusted appropriately, and other steps can be added or some of the steps can be reduced. Those skilled in the art can make appropriate modifications according to the above content, and are not limited to the description of the above-mentioned FIG. 1 .

以下以识别篮球比赛中运动员的球衣号码为例,对本发明进行示例性说明。The present invention is exemplified below by taking the identification of the jersey number of a player in a basketball game as an example.

图2是本发明实施例的待检测图像的一个示意图。如图2所示,该待检测图像为篮球比赛视频中的一帧图像,其包含多个作为待检测物体的运动员。如图2所示,可以检测出该待检测图像中的各个运动员,并获得各个运动员所在的区域,以各个检测框表示。FIG. 2 is a schematic diagram of an image to be detected according to an embodiment of the present invention. As shown in FIG. 2 , the image to be detected is a frame of image in a video of a basketball game, which includes a plurality of players serving as objects to be detected. As shown in FIG. 2 , each athlete in the image to be detected can be detected, and the area where each athlete is located can be obtained, which is represented by each detection frame.

图3是图2中的待检测物体所在检测框及单数字检测结果的一个示意图。如图3所示,检测到的各个运动员所在区域以各个检测框表示,检测框1至7中的单数字检测结果依次为“无结果”、“3”和“0”、“2”、“无结果”、“2”和“3”,“0”,“8”。FIG. 3 is a schematic diagram of the detection frame where the object to be detected is located and the single-digit detection result in FIG. 2 . As shown in Figure 3, the detected areas of each athlete are represented by each detection box, and the single-digit detection results in detection boxes 1 to 7 are "no result", "3" and "0", "2", " no result", "2" and "3", "0", "8".

在步骤103中,可以将通过单数字检测得到的一个或多个数字进行合并,以获得所述待检测图像中的号码。例如,如图3所示,检测框2的单数字检测结果“3”和“0”可以被合并成“30”,检测框5的单数字检测结果“2”和“3”可以被合并成“23”。In step 103, one or more numbers obtained through single-digit detection may be combined to obtain the numbers in the image to be detected. For example, as shown in Fig. 3, the single-digit detection results "3" and "0" of detection frame 2 can be combined into "30", and the single-digit detection results "2" and "3" of detection frame 5 can be combined into "twenty three".

在传统的号码识别方法中,对于参加比赛的篮球或足球运动员,其可能的号码为0至99,则分类器需要100种类型;对于参加比赛的田径运动员,其可能的号码为0000至9999,则分类器需要10000种类型。In the traditional number recognition method, for basketball or football players participating in the game, the possible numbers are 0 to 99, then the classifier needs 100 types; Then the classifier needs 10000 types.

而在本发明实施例中,由于只需要进行单数字检测,仅需要收集0至9这10种类型的训练样本,因此无论是针对0至99的号码还是针对0000至9999的号码,均能够简单迅速地完成分类器的训练。In the embodiment of the present invention, since only single-digit detection needs to be performed, and only 10 types of training samples from 0 to 9 need to be collected, whether it is for numbers from 0 to 99 or numbers from 0000 to 9999, it can be easily The training of the classifier is completed quickly.

以上对于如何进行数字检测和号码识别进行了示例性说明,以下对于训练样本和训练模型进行进一步说明。The above is an exemplary description of how to perform digit detection and number recognition, and the following further describes the training samples and training models.

在本发明实施例中,可以对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本。由此,即使对于训练样本较少的号码,也能够简单迅速地完成分类器的训练,并且由于是对单数字进行检测并合并,因此具有较高的识别精度。In this embodiment of the present invention, coordinate transformation may be performed on a certain training image, and one or more images after coordinate transformation may be used as positive samples of the training data. Therefore, even for numbers with few training samples, the training of the classifier can be completed simply and quickly, and since single numbers are detected and merged, the recognition accuracy is high.

在一个实施例中,可以将训练图像旋转预设的角度;其中所述训练图像中的号码的边界框也被旋转所述角度;利用旋转角度后的所述号码的边界框获得外部边界框;以及对所述外部边界框进行调整以获得所述坐标变换后的图像。In one embodiment, the training image can be rotated by a preset angle; wherein the bounding box of the number in the training image is also rotated by the angle; the bounding box of the number after the rotation angle is used to obtain an outer bounding box; and adjusting the outer bounding box to obtain the coordinate-transformed image.

图4是本发明实施例的训练图像的一个示例图,该号码为“10”,其边界框表示为401。图5是本发明实施例的将该训练图像坐标变换后的一个示意图。如图5所示,可以将该训练图像旋转预设的角度θ;其中所述训练图像中的号码的边界框401也被旋转所述角度θ;利用旋转角度后的所述号码的边界框401获得外部边界框501;以及对所述外部边界框501进行调整以获得所述坐标变换后的图像(图5所示为一个正样本),其号码的边界框表示为502。FIG. 4 is an example diagram of a training image according to an embodiment of the present invention, the number is “10”, and its bounding box is represented as 401. FIG. 5 is a schematic diagram of the training image after coordinate transformation according to an embodiment of the present invention. As shown in FIG. 5, the training image can be rotated by a preset angle θ; the bounding box 401 of the number in the training image is also rotated by the angle θ; the bounding box 401 of the number after the rotation angle is used Obtain an outer bounding box 501 ; and adjust the outer bounding box 501 to obtain the coordinate-transformed image (shown as a positive sample in FIG. 5 ), whose numbered bounding box is denoted as 502 .

在另一个实施例中,可以将训练图像中的号码进行尺寸上的缩放,以获得改变尺寸后的所述号码;以及为所述改变尺寸后的所述号码增加背景区域以获得所述坐标变换后的图像。In another embodiment, the numbers in the training images may be scaled in size to obtain the resized numbers; and a background area may be added to the resized numbers to obtain the coordinate transformations post image.

图6是本发明实施例的训练图像的另一个示例图,其包含的号码为“8”,边界框表示为601。图7是本发明实施例的将该训练图像坐标变换后的一个示意图。如图7所示,可以将所述训练图像中的号码进行尺寸上的缩放,以获得改变尺寸后的所述号码;例如图7的701至703对该号码“8”进行了不同程度的缩小,704对该号码“8”进行了一定程度的放大。此外,还可以为所述改变尺寸后的号码701至704增加背景区域(例如图7所示的黑色背景),以获得所述坐标变换后的图像(图7所示为4个正样本)。FIG. 6 is another example diagram of a training image according to an embodiment of the present invention, the number included in the training image is “8”, and the bounding box is represented as 601. FIG. 7 is a schematic diagram of the training image after coordinate transformation according to an embodiment of the present invention. As shown in FIG. 7 , the number in the training image can be scaled in size to obtain the number after changing the size; for example, the number “8” in 701 to 703 in FIG. 7 has been reduced to different degrees , 704 enlarges the number "8" to a certain extent. In addition, a background area (eg, the black background shown in FIG. 7 ) may be added to the resized numbers 701 to 704 to obtain the coordinate-transformed image (4 positive samples shown in FIG. 7 ).

由此,通过对训练图像进行坐标变换,能够获得更多用于训练的正样本,即使在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且能够进一步提高识别精度。Therefore, by performing coordinate transformation on the training image, more positive samples for training can be obtained, the training of the classifier can be completed simply and quickly even when there are few training samples, and the recognition accuracy can be further improved.

在一个实施例中,还可以为所述训练模型增加训练数据的负样本,以便消除非号码区域的误识别影响。In one embodiment, negative samples of training data may also be added to the training model, so as to eliminate the influence of misidentification of non-numbered areas.

图8是本发明实施例的训练图像的另一个示例图。如图8所示,框801所示部分为该运动员的手臂,但类似于处于倾斜状态的号码“1”。可以将该训练图像作为训练数据的负样本,使得对类似图像进行检测时,不对该处进行号码识别或者不将该处���别为号码“1”,从而消除非号码区域的误识别影响,进一步提高识别精度。FIG. 8 is another example diagram of a training image according to an embodiment of the present invention. As shown in FIG. 8, the portion shown in box 801 is the player's arm, but resembles the number "1" in a tilted state. The training image can be used as a negative sample of the training data, so that when similar images are detected, no number identification is performed or the number "1" is not identified, thereby eliminating the influence of misrecognition in non-number areas and further improving recognition accuracy.

在一个实施例中,在步骤101之前还可以对不带有预训练模型(pre-trainedmodel)的号码模型进行训练;以及将训练后的所述号码模型的卷积层(convolutionlayer)作为用于号码识别的预训练模型。In one embodiment, before step 101, a number model without a pre-trained model can be trained; and the trained convolution layer of the number model can be used as the number model for the number Recognized pretrained model.

例如,在进行基于CNN的训练模型的训练时,一般使用通用的ImageNet数据集作为预训练模型,但是ImageNet数据集并没有专门针对号码的分类,因此不利于号码识别模型的快速收敛,即不太适合于号码识别。For example, when training a CNN-based training model, the general ImageNet data set is generally used as a pre-training model, but the ImageNet data set does not specifically classify numbers, so it is not conducive to the rapid convergence of the number recognition model. Suitable for number recognition.

本发明实施例可以通过首先训练不带有预训练模型的号码模型;以及将训练后的所述号码模型的卷积层作为用于号码识别的预训练模型。由此,训练模型能够更快地收敛,并且具有更高的检测精度。In the embodiment of the present invention, a number model without a pre-training model can be trained first; and the trained convolution layer of the number model can be used as a pre-training model for number recognition. As a result, the trained model can converge faster and have higher detection accuracy.

以上对于步骤101或之前的训练模型和训练样本进行了说明,以下对于步骤103中的号码识别再进行说明。The training model and training samples in step 101 or before have been described above, and the number recognition in step 103 will be described below.

在一个实施例中,在步骤102进行单数字检测以获得一个或多个数字之后,还可以根据检测出的一个或多个号码框的面积以及置信度,确定所述一个或多个数字是否为误识别(false recognition)。In one embodiment, after the single-digit detection is performed in step 102 to obtain one or more digits, it may also be determined whether the one or more digits are detected according to the area and confidence of the one or more number boxes. false recognition.

例如,对于单数字号码i(0-9),使用如下公式确定是否为所述误识别:For example, for a single-digit number i(0-9), use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000071
Figure BDA0002024079810000071

其中,Cs表示单数字号码的识别结果,A表示所述单数字号码的框面积(可以通过单数字检测过程获得,如图2、3所示),As表示面积阈值(可以预先设定),Si表示所述单数字号码的置信度(可以通过CNN输出而获得),Ss表示置信度阈值(可以预先设定),100表示背景。Among them, C s represents the recognition result of the single-digit number, A represents the frame area of the single-digit number (which can be obtained through the single-digit detection process, as shown in Figures 2 and 3), and A s represents the area threshold (which can be preset. ), S i represents the confidence of the single-digit number (which can be obtained by CNN output), S s represents the confidence threshold (which can be preset), and 100 represents the background.

再例如,对于双数字号码ij(10-99),使用如下公式确定是否为所述误识别:For another example, for a double-digit number ij (10-99), use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000072
Figure BDA0002024079810000072

其中,Cd表示双数字号码的识别结果,Aij表示所述双数字号码的组合框面积(可以通过单数字检测过程获得,如图2、3所示),Ad表示面积阈值(可以预先设定),Si和Sj表示所述双数字号码的置信度(可以通过CNN输���而获得),Sd表示置信度阈值(可以预先设定),100表示背景。Among them, C d represents the recognition result of the double-digit number, A ij represents the combined box area of the double-digit number (which can be obtained through the single-digit detection process, as shown in Figures 2 and 3), and A d represents the area threshold (which can be pre- S i and S j represent the confidence of the double-digit number (which can be obtained by CNN output), S d represents the confidence threshold (which can be preset), and 100 represents the background.

值得注意的是,以上仅以0-99为例进行了说明,但本发明不限于此,例如对于0000至9999的情况,可以类似地进行判断;例如可以划分为单数字(0-9)、双数字(10-99)、三数字(100-999)、四数字(1000-9999)四种情况,分别进行误识别的判断。本发明不限于此,只要至少基于号码框的面积以及置信度来确定误识别即可。It is worth noting that the above only takes 0-99 as an example for description, but the present invention is not limited to this. There are four cases of double digits (10-99), three digits (100-999), and four digits (1000-9999), respectively, to judge the misrecognition. The present invention is not limited to this, as long as the misrecognition is determined based on at least the area of the number frame and the confidence.

由此,至少基于号码框的面积以及置信度来确定号码的误识别,能够进一步消除或减少误识别的影响,提高识别精度。Thereby, the misrecognition of the number is determined based on at least the area of the number frame and the degree of confidence, the influence of the misrecognition can be further eliminated or reduced, and the recognition accuracy can be improved.

以上仅对与本发明相关的各步骤或过程进行了说明,但本发明不限于此。号码识别方法还可以包括其他步骤或者过程,关于这些步骤或者过程的具体内容,可以参考现有技术。此外,以上仅以上述公式为例对本发明实施例进行了示例性说明,但本发明不限于这些公式,还可以对这些公式进行适当的变型,���些变型的实施方式均应包含在本发明实施例的范围之内。The above only describes each step or process related to the present invention, but the present invention is not limited thereto. The number identification method may further include other steps or processes, and for the specific content of these steps or processes, reference may be made to the prior art. In addition, the above only takes the above formulas as examples to illustrate the embodiments of the present invention, but the present invention is not limited to these formulas, and appropriate modifications can also be made to these formulas, and these modified implementations should be included in the embodiments of the present invention. within the range.

以上各个实施例仅对本发明实施例进行了示例性说明,但本发明不限于此,还可以在以上各个实施例的基础上进行适当的变型。例如,可以单独使用上述各个实施例,也可以将以上各个实施例中的一种或多种结合起来。The above embodiments are only illustrative of the embodiments of the present invention, but the present invention is not limited thereto, and appropriate modifications can also be made on the basis of the above embodiments. For example, each of the above-described embodiments may be used alone, or one or more of the above-described embodiments may be combined.

由上述实施例可知,对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;使用训练模型对待检测图像中的号码进行单数字检测;以及将通过所述单数字检测得到的一个或多个数字进行合并以获得待检测图像中的号码。由此,即使在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且具有较高的识别精度。It can be known from the above-mentioned embodiments that a certain training image is subjected to coordinate transformation, and one or more images after the coordinate transformation are used as positive samples of the training data; the training model is used to perform single-digit detection on the numbers in the images to be detected; One or more numbers obtained by the single-digit detection are combined to obtain the number in the image to be detected. Therefore, even in the case of few training samples, the training of the classifier can be completed simply and quickly, and has high recognition accuracy.

实施例2Example 2

本发明实施例提供一种号码识别装置,与实施例1相同的内容不再赘述。An embodiment of the present invention provides a number identification device, and the same content as that of Embodiment 1 will not be repeated.

图9是本发明实施例的号码识别装置的一个示意图,如图9所示,号码识别装置900包括:FIG. 9 is a schematic diagram of a number identification device according to an embodiment of the present invention. As shown in FIG. 9 , the number identification device 900 includes:

训练单元901,其使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;A training unit 901, which uses a training image to train a training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of the training data;

检测单元902,其使用所述训练模型对待检测图像中的号码进行单数字检测;以及A detection unit 902, which uses the training model to perform single-digit detection on the numbers in the images to be detected; and

合并单元903,其将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。A merging unit 903, which merges one or more numbers obtained by the single-digit detection to obtain the numbers in the to-be-detected image.

在一个实施例中,所述训练单元901可以用于:将所述训练图像旋转预设的角度;其中所述训练图像中的号码的边界框也被旋转所述角度;利用旋转角度后的所述号码的边界框获得外部边界框;以及对所述外部边界框进行调整以获得所述坐标变换后的图像。In one embodiment, the training unit 901 may be configured to: rotate the training image by a preset angle; wherein the bounding box of the number in the training image is also rotated by the angle; using the rotated angle obtaining an outer bounding box with the bounding box of the number; and adjusting the outer bounding box to obtain the coordinate-transformed image.

在一个实施例中,所述训练单元901可以用于:将所述训练图像中的号码进行尺寸上的缩放,以获得改变尺寸后的所述号码;以及为所述改变尺寸后的所述号码增加背景区域以获得所述坐标变换后的图像。In one embodiment, the training unit 901 may be configured to: scale the number in the training image in size to obtain the number after the size change; and for the number after the size change A background area is added to obtain the coordinate transformed image.

在一个实施例中,所述训练单元901还可以用于:为所述训练模型增加训练数据的负样本,以便消除非号码区域的误识别影响。In one embodiment, the training unit 901 may be further configured to: add negative samples of training data to the training model, so as to eliminate the influence of misidentification of non-number regions.

在一个实施例中,所述训练单元901还可以用于:训练不带有预训练模型的号码模型;以及将训练后的所述号码模型的卷积层作为用于号码识别的预训练模型。In one embodiment, the training unit 901 may also be used to: train a number model without a pre-trained model; and use the trained convolution layer of the number model as a pre-trained model for number recognition.

如图9所示,所述号码识别装置900还可以包括:As shown in FIG. 9, the number identification device 900 may further include:

确定单元904,其根据检测出的一个或多个号码框的面积以及置信度,确定所述一个或多个数字是否为误识别。A determination unit 904, which determines whether the one or more numbers are misidentified according to the detected area and confidence of the one or more number boxes.

在一个实施例中,对于单数字号码i,确定单元904可以使用如下公式确定是否为所述误识别:In one embodiment, for a single-digit number i, the determining unit 904 can use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000091
Figure BDA0002024079810000091

其中,Cs表示单数字号码的识别结果,A表示所述单数字号码的框面积,As表示面积阈值,Si表示所述单数字号码的置信度,Ss表示置信度阈值,100表示背景。Among them, C s represents the recognition result of the single-digit number, A represents the frame area of the single-digit number, A s represents the area threshold, S i represents the confidence of the single-digit number, S s represents the confidence threshold, and 100 means background.

在一个实施例中,对于双数字号码ij,确定单元904可以使用如下公式确定是否为所述误识别:In one embodiment, for the double-digit number ij, the determining unit 904 can use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000092
Figure BDA0002024079810000092

其中,Cd表示双数字号码的识别结果,Aij表示所述双数字号码的组合框面积,Ad表示面积阈值,Si和Sj��示所述双数字号码的置信度,Sd表示置信度阈值,100表示背景。Among them, C d represents the recognition result of the double-digit number, A ij represents the area of the combo box of the double-digit number, A d represents the area threshold, S i and S j represent the confidence of the double-digit number, and S d represents the confidence Degree threshold, 100 means background.

值得注意的是,以上仅对与本发明相关的各部件进行了说明,但本发明不限于此。号码识别装置900还可以包括其他部件或者模块,关于这些部件或者模块的具体内容,可以参考现有技术。It should be noted that the above only describes the components related to the present invention, but the present invention is not limited thereto. The number identification device 900 may also include other components or modules, and for the specific content of these components or modules, reference may be made to the prior art.

此外,为了简单起见,图9中仅示例性示出了各个部件或模块之间的连接关系或信号走向,但是本领域技术人员应该清楚的是,可以采用总线连接等各种相关技术。上述各个部件或模块可以通过例如处理器、存储器等硬件设施来实现;本发明实施例并不对此进行限制。In addition, for the sake of simplicity, FIG. 9 only exemplarily shows the connection relationship or signal direction between various components or modules, but it should be clear to those skilled in the art that various related technologies such as bus connection can be used. The foregoing components or modules may be implemented by hardware facilities such as a processor and a memory, which are not limited in this embodiment of the present invention.

以上各个实施例仅对本发明实施例进行了示例性说明,但本发明不限于此,还可以在以上各个实施例的基础上进行适当的变型。例如,可以单独使用上述各个实施例,也可以将以上各个实施例中的一种或多种结合起来。The above embodiments are only illustrative of the embodiments of the present invention, but the present invention is not limited thereto, and appropriate modifications can also be made on the basis of the above embodiments. For example, each of the above-described embodiments may be used alone, or one or more of the above-described embodiments may be combined.

由上述实施例可知,对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;使用训练模型对待检测图像中的号码进行单数字检测;以及将通过所述单数字检测得到的一个或多个数字进行合并以获得待检测图像中的号码。由此,即使在训练样本较少的情况下也能够简单迅速地完成分类器的训练,并且具有较高的识别精度。It can be known from the above-mentioned embodiments that a certain training image is subjected to coordinate transformation, and one or more images after the coordinate transformation are used as positive samples of the training data; the training model is used to perform single-digit detection on the numbers in the images to be detected; One or more numbers obtained by the single-digit detection are combined to obtain the number in the image to be detected. Therefore, even in the case of few training samples, the training of the classifier can be completed simply and quickly, and has high recognition accuracy.

实施例3Example 3

本发明实施例提供一种电子设备,包括有如实施例2所述的号码识别装置,其内容被合并于此。该电子设备例如可以是计算机、服务器、工作站、膝上型计算机、智能手机,等等;但本发明实施例不限于此。An embodiment of the present invention provides an electronic device, including the number identification device described in Embodiment 2, the content of which is incorporated herein. The electronic device may be, for example, a computer, a server, a workstation, a laptop computer, a smart phone, etc.; but the embodiment of the present invention is not limited thereto.

图10是本发明实施例的电子设备的示意图。如图10所示,电子设备1000可以包括:处理器(例如中央处理器CPU)1010和存储器1020;存储器1020耦合到中央处理器1010。其中该存储器1020可存储各种数据;此外还存储信息处理的程序1021,并且在处理器1010的控制下执行该程序1021。FIG. 10 is a schematic diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 10 , the electronic device 1000 may include: a processor (eg, a central processing unit CPU) 1010 and a memory 1020 ; the memory 1020 is coupled to the central processing unit 1010 . The memory 1020 can store various data; in addition, a program 1021 for information processing is also stored, and the program 1021 is executed under the control of the processor 1010 .

在一个实施例中,号码识别装置900的功能可以被集成到处理器1010中实现。其中,处理器1010可以被配置为实现如实施例1所述的号码识别方法。In one embodiment, the functions of the number identification device 900 may be integrated into the processor 1010 for implementation. The processor 1010 may be configured to implement the number identification method described in Embodiment 1.

在另一个实施例中,号码识别装置900可以与处理器1010分开配置,例如可以将号码识别装置900配置为与处理器1010连接的芯片,通过处理器1010的控制来实现号码识别装置900的功能。In another embodiment, the number identification device 900 may be configured separately from the processor 1010 . For example, the number identification device 900 may be configured as a chip connected to the processor 1010 , and the functions of the number identification device 900 may be implemented through the control of the processor 1010 . .

在一个实施例中,处理器1010可以被配置为进行如下的控制:使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;使用所述训练模型对待检测图像中的号码进行单数字检测;以及将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。In one embodiment, the processor 1010 may be configured to perform the following controls: use the training images to train a training model for number recognition; wherein coordinate transformation is performed on a training image, and one or more coordinates are transformed use the training model to perform single-digit detection on the numbers in the image to be detected; and combine one or more numbers obtained through the single-digit detection to obtain the image to be detected number in .

在一个实施例中,处理器1010还可以被配置为进行如下的控制:将所述训练图像旋转预设的角度;其中所述训练图像中的号码的边界框也被旋转所述角度;利用旋转角度后的所述号码的边界框获得外部边界框;以及对所述外部边界框进行调整以获得所述坐标变换后的图像。In one embodiment, the processor 1010 may be further configured to perform the following controls: rotate the training image by a preset angle; wherein the bounding box of the number in the training image is also rotated by the angle; use the rotation The numbered bounding box after the angle obtains an outer bounding box; and the outer bounding box is adjusted to obtain the coordinate transformed image.

在一个实施例中,处理器1010还可以被配置为进行如下的控制:将所述训练图像中的号码进行尺寸上的缩放,以获得改变尺寸后的所述号码;以及为所述改变尺寸后的所述号码增加背景区域以获得所述坐标变换后的图像。In one embodiment, the processor 1010 may be further configured to perform the following controls: scaling the number in the training image in size to obtain the resized number; and for the resized number The number of increases the background area to obtain the coordinate-transformed image.

在一个实施例中,处理器1010还可以被配置为进行如下的控制:为所述训练模型增加训练数据的负样本,以便消除非号码区域的误识别影响。In one embodiment, the processor 1010 may be further configured to perform the following control: add negative samples of training data to the training model, so as to eliminate the influence of misidentification of non-number regions.

在一个实施例中,处理器1010还可以被配置为进行如下的控制:训练不带有预训练模型的号码模型;以及将训练后的所述号码模型的卷积层作为用于号码识别的预训练模型。In one embodiment, the processor 1010 may be further configured to perform the following controls: train a number model without a pre-trained model; and use the trained convolutional layer of the number model as a pre-training for number recognition. Train the model.

在一个实施例中,处理器1010还可以被配置为进行如下的控制:根据检测出的一个或多个号码框的面积以及置信度,确定所述一个或多个数字是否为误识别。In one embodiment, the processor 1010 may be further configured to perform the following control: according to the detected area and confidence level of the one or more number boxes, determine whether the one or more numbers are misidentified.

例如,对于单数字号码i,使用如下公式确定是否为所述误识别:For example, for a single-digit number i, use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000111
Figure BDA0002024079810000111

其中,Cs表示单数字号码的识别结果,A表示所述单数字号码的框面积,As表示面积阈值,Si表示所述单数字号码的置信度,Ss表示置信度阈值,100表示背景。Among them, C s represents the recognition result of the single-digit number, A represents the frame area of the single-digit number, A s represents the area threshold, S i represents the confidence of the single-digit number, S s represents the confidence threshold, and 100 means background.

例如,对于双数字号码ij,使用如下公式确定是否为所述误识别:For example, for a double-digit number ij, use the following formula to determine whether it is the misidentification:

Figure BDA0002024079810000112
Figure BDA0002024079810000112

其中,Cd表示双数字号码的识别结果,Aij表示所述双数字号码的组合框面积,Ad表示面积阈值,Si和Sj表示所述双数字号码的置信度,Sd表示置信度阈值,100表示背景。Among them, C d represents the recognition result of the double-digit number, A ij represents the area of the combo box of the double-digit number, A d represents the area threshold, S i and S j represent the confidence of the double-digit number, and S d represents the confidence Degree threshold, 100 means background.

此外,如图10所示,电子设备1000还可以包括:输入输出(I/O)设备1030和显示器1040等;其中,上述部件的功能与现有技术类似,此处不再赘述。值得注意的是,电子设备1000也并不是必须要包括图10中所示的所有部件;此外,电子设备1000还可以包括图10中没有示出的部件,可以参考相关技术。In addition, as shown in FIG. 10 , the electronic device 1000 may further include: an input/output (I/O) device 1030, a display 1040, etc.; wherein, the functions of the above components are similar to those in the prior art, and will not be repeated here. It is worth noting that the electronic device 1000 does not necessarily include all the components shown in FIG. 10 ; in addition, the electronic device 1000 may also include components not shown in FIG. 10 , and reference may be made to the related art.

本发明实施例还提供一种计算机可读程序,其中当在电子设备中执行所述程序时,所述程序使得计算机在所述电子设备中执行实施例1所述的号码识别方法。An embodiment of the present invention further provides a computer-readable program, wherein when the program is executed in an electronic device, the program causes a computer to execute the number identification method described in Embodiment 1 in the electronic device.

本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在电子设备中执行实施例1所述的号码识别方法。An embodiment of the present invention further provides a storage medium storing a computer-readable program, wherein the computer-readable program causes a computer to execute the number identification method described in Embodiment 1 in an electronic device.

本发明以上的装置和方法可以由硬件实现,也可以由硬件结合软件实现。本发明涉及这样的计算机可读程序,当该程序被逻辑部件所执行时,能够使该逻辑部件实现上文所述的装置或构成部件,或使该逻辑部件实现上文所述的各种方法或步骤。本发明还涉及用于存储以上程序的存储介质,如硬盘、磁盘、光盘、DVD、flash存储器等。The above apparatus and method of the present invention may be implemented by hardware, or may be implemented by hardware combined with software. The present invention relates to a computer-readable program which, when executed by logic components, enables the logic components to implement the above-described apparatus or constituent components, or causes the logic components to implement the above-described various methods or steps. The present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, and the like.

结合本发明实施例描述的方法/装置可直接体现为硬件、由处理器执行的软件模块或二者组合。例如,图中所示的功能框图中的一个或多个和/或功能框图的一个或多个组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块。这些软件模块,可以分别对应于图中所示的各个步骤。这些硬件模块例如可利用现场可编程门阵列(FPGA)将这些软件模块固化而实现。The method/apparatus described in conjunction with the embodiments of the present invention may be directly embodied as hardware, a software module executed by a processor, or a combination of the two. For example, one or more of the functional block diagrams and/or one or more combinations of the functional block diagrams shown in the figures may correspond to either software modules or hardware modules of the computer program flow. These software modules may respectively correspond to the various steps shown in the figure. These hardware modules can be implemented by, for example, solidifying these software modules using a Field Programmable Gate Array (FPGA).

软件模块可以位于RAM存储器、闪存、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、移动磁盘、CD-ROM或者本领域已知的任何其它形式的存储介质。可以将一种存储介质耦接至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息;或者该存储介质可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。该软件模块可以存储在移动终端的存储器中,也可以存储在可插入移动终端的存储卡中。例如,若设备(如移动终端)采用的是较大容量的MEGA-SIM卡或者大容量的闪存装置,则该软件模块可存储在该MEGA-SIM卡或者大容量的闪存装置中。A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. A storage medium can be coupled to the processor, such that the processor can read information from, and write information to, the storage medium; or the storage medium can be an integral part of the processor. The processor and storage medium may reside in an ASIC. The software module can be stored in the memory of the mobile terminal, or can be stored in a memory card that can be inserted into the mobile terminal. For example, if a device (such as a mobile terminal) adopts a larger-capacity MEGA-SIM card or a large-capacity flash memory device, the software module can be stored in the MEGA-SIM card or a large-capacity flash memory device.

针对附图中描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意适当组合。针对附图描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。For one or more of the functional blocks and/or one or more combinations of the functional blocks described in the figures, it can be implemented as a general-purpose processor, a digital signal processor (DSP) for performing the functions described in this application ), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any suitable combination thereof. One or more of the functional blocks and/or one or more combinations of the functional blocks described with respect to the figures can also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors processor, one or more microprocessors in communication with the DSP, or any other such configuration.

以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述������示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。The present invention has been described above with reference to the specific embodiments, but those skilled in the art should understand that these descriptions are all exemplary and do not limit the protection scope of the present invention. Various variations and modifications of the present invention can be made by those skilled in the art in accordance with the principles of the present invention, and these variations and modifications are also within the scope of the present invention.

Claims (10)

1.一种号码识别装置,其特征在于,所述装置包括:1. A number identification device, wherein the device comprises: 训练单元,其使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;A training unit, which uses a training image to train a training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of the training data; 检测单元,其使用所述训练模型对待检测图像中的号码进行单数字检测;以及a detection unit, which uses the training model to perform single-digit detection on the numbers in the images to be detected; and 合并单元,其将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。A merging unit, which merges one or more numbers obtained by the single-digit detection to obtain the numbers in the image to be detected. 2.根据权利要求1所述的装置,其中,所述训练单元用于:将所述训练图像旋转预设的角度;其中所述训练图像中的号码的边界框也被旋转所述角度;利用旋转角度后的所述号码的边界框获得外部边界框;以及对所述外部边界框进行调整以获得所述坐标变换后的图像。2. The apparatus according to claim 1, wherein the training unit is used for: rotating the training image by a preset angle; wherein the bounding box of the number in the training image is also rotated by the angle; using The numbered bounding box after the rotation angle obtains an outer bounding box; and the outer bounding box is adjusted to obtain the coordinate-transformed image. 3.根据权利要求1所述的装置,其中,所述训练单元用于:将所述训练图像中的号码进行尺寸上的缩放,以获得改变尺寸后的所述号码;以及为所述改变尺寸后的所述号码增加背景区域以获得所述坐标变换后的图像。3. The apparatus according to claim 1, wherein the training unit is used for: scaling the numbers in the training images in size to obtain the numbers after changing the size; After the number, the background area is added to obtain the coordinate-transformed image. 4.根据权利要求1所述的装置,其中,所述训练单元还用于:为所述训练模型增加训练数据的负样本,以便消除非号码区域的误识别影响。4 . The apparatus according to claim 1 , wherein the training unit is further configured to: add negative samples of training data to the training model, so as to eliminate the influence of misidentification of non-number regions. 5 . 5.根据权利要求1所述的装置,其中,所述训练单元还用于:训练不带有预训练模型的号码模型;以及将训练后的所述号码模型的卷积层作为用于号码识别的预训练模型。5. device according to claim 1, wherein, described training unit is also used for: training does not have the number model of pre-training model; And the convolution layer of described number model after training is used for number recognition pretrained model. 6.根据权利要求1所述的装置,其中,所述装置还包括:6. The apparatus of claim 1, wherein the apparatus further comprises: 确定单元,其根据检测出的一个或多个号码框的面积以及置信度,确定所述一个或多个数字是否为误识别。A determination unit, which determines whether the one or more numbers are misidentified according to the detected area and confidence of the one or more number boxes. 7.根据权利要求6所述的装置,其中,对于单数字号码i,使用如下公式确定是否为所述误识别:7. The device according to claim 6, wherein, for single-digit number i, use the following formula to determine whether it is the misidentification:
Figure FDA0002024079800000011
Figure FDA0002024079800000011
其中,Cs表示单数字号码的识别结果,A表示所述单数字号码的框面积,As表示面积阈值,Si表示所述单数字号码的置信度,Ss表示置信度阈值,100表示背景。Among them, C s represents the recognition result of the single-digit number, A represents the frame area of the single-digit number, A s represents the area threshold, S i represents the confidence of the single-digit number, S s represents the confidence threshold, and 100 means background.
8.根据权利要求6所述的装置,其中,对于双数字号码ij,使用如下公式确定是否为所述误识别:8. The device according to claim 6, wherein, for the double-digit number ij, the following formula is used to determine whether it is the misidentification:
Figure FDA0002024079800000021
Figure FDA0002024079800000021
其中,Cd表示双数字号码的识别结果,Aij表示所述双数字号码的组合框面积,Ad表示面积阈值,Si和Sj表示所述双数字号码的置信度,Sd表示置信度阈值,100表示背景。Among them, C d represents the recognition result of the double-digit number, A ij represents the area of the combo box of the double-digit number, A d represents the area threshold, S i and S j represent the confidence of the double-digit number, and S d represents the confidence Degree threshold, 100 means background.
9.一种号码识别方法,其特征在于,所述方法包括:9. A number identification method, characterized in that the method comprises: 使用训练图像对用于号码识别的训练模型进行训练;其中对某一训练图像进行坐标变换,并将一个或多个坐标变换后的图像作为训练数据的正样本;Using the training image to train the training model for number recognition; wherein a certain training image is subjected to coordinate transformation, and one or more coordinate transformed images are used as positive samples of the training data; 使用所述训练模型对待检测图像中的号码进行单数字检测;以及using the training model to perform single digit detection on the number in the image to be detected; and 将通过所述单数字检测得到的一个或多个数字进行合并以获得所述待检测图像中的号码。One or more numbers obtained by the single-digit detection are combined to obtain the number in the image to be detected. 10.一种电子设备,其包括如权利要求1至8任一项所述的号码识别装置。10. An electronic device comprising the number identification device according to any one of claims 1 to 8.
CN201910288456.5A 2019-04-11 2019-04-11 Number identification device, method and electronic device Pending CN111814514A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910288456.5A CN111814514A (en) 2019-04-11 2019-04-11 Number identification device, method and electronic device
JP2020011823A JP7396076B2 (en) 2019-04-11 2020-01-28 Number recognition device, method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910288456.5A CN111814514A (en) 2019-04-11 2019-04-11 Number identification device, method and electronic device

Publications (1)

Publication Number Publication Date
CN111814514A true CN111814514A (en) 2020-10-23

Family

ID=72831668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910288456.5A Pending CN111814514A (en) 2019-04-11 2019-04-11 Number identification device, method and electronic device

Country Status (2)

Country Link
JP (1) JP7396076B2 (en)
CN (1) CN111814514A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640423A (en) * 2022-10-14 2023-01-24 北京邮电大学 Athlete identification method based on multi-target tracking

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949624B (en) * 2021-01-25 2024-02-13 西安电子科技大学 Water level detection method, device, electronic equipment and storage medium based on water gauge
CN113627210A (en) * 2021-08-19 2021-11-09 南京华捷艾米软件科技有限公司 Method and device for generating bar code image, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016119059A (en) * 2014-12-22 2016-06-30 キヤノンイメージン�����������ムズ株式会社 Image processing apparatus and image processing method
JP2017084299A (en) * 2015-10-30 2017-05-18 株式会社シーイーシー Image processing device and image processing method
US20170304732A1 (en) * 2014-11-10 2017-10-26 Lego A/S System and method for toy recognition
CN107690659A (en) * 2016-12-27 2018-02-13 深圳前海达闼云端智能科技有限公司 Image recognition system and image recognition method
CN108376235A (en) * 2018-01-15 2018-08-07 深圳市易成自动驾驶技术有限公司 Image detecting method, device and computer readable storage medium
CN108921099A (en) * 2018-07-03 2018-11-30 常州大学 Moving ship object detection method in a kind of navigation channel based on deep learning
US20190050981A1 (en) * 2017-08-09 2019-02-14 Shenzhen Keya Medical Technology Corporation System and method for automatically detecting a target object from a 3d image
CN109446961A (en) * 2018-10-19 2019-03-08 北京达佳互联信息技术有限公司 Pose detection method, device, equipment and storage medium
CN109472274A (en) * 2017-09-07 2019-03-15 富士通株式会社 Training device and method for deep learning classification model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4880292B2 (en) 2005-11-24 2012-02-22 富士フイルム株式会社 Image processing method, image processing program, and image processing apparatus
CN105528607B (en) 2015-10-30 2019-02-15 小米科技有限责任公司 Method for extracting region, model training method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170304732A1 (en) * 2014-11-10 2017-10-26 Lego A/S System and method for toy recognition
JP2016119059A (en) * 2014-12-22 2016-06-30 キヤノンイメージングシステムズ株式会社 Image processing apparatus and image processing method
JP2017084299A (en) * 2015-10-30 2017-05-18 株式会社シーイーシー Image processing device and image processing method
CN107690659A (en) * 2016-12-27 2018-02-13 深圳前海达闼云端智能科技有限公司 Image recognition system and image recognition method
US20190050981A1 (en) * 2017-08-09 2019-02-14 Shenzhen Keya Medical Technology Corporation System and method for automatically detecting a target object from a 3d image
CN109472274A (en) * 2017-09-07 2019-03-15 富士通株式会社 Training device and method for deep learning classification model
CN108376235A (en) * 2018-01-15 2018-08-07 深圳市易成自动驾驶技术有限公司 Image detecting method, device and computer readable storage medium
CN108921099A (en) * 2018-07-03 2018-11-30 常州大学 Moving ship object detection method in a kind of navigation channel based on deep learning
CN109446961A (en) * 2018-10-19 2019-03-08 北京达佳互联信息技术有限公司 Pose detection method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640423A (en) * 2022-10-14 2023-01-24 北京邮电大学 Athlete identification method based on multi-target tracking

Also Published As

Publication number Publication date
JP2020173781A (en) 2020-10-22
JP7396076B2 (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN110427905B (en) Pedestrian tracking method, device and terminal
WO2020211624A1 (en) Object tracking method, tracking processing method, corresponding apparatus and electronic device
TW202006602A (en) Three-dimensional living-body face detection method, face authentication recognition method, and apparatuses
CN103745483B (en) Mobile-target position automatic detection method based on stadium match video images
WO2020155518A1 (en) Object detection method and device, computer device and storage medium
CN112287866A (en) Human body action recognition method and device based on human body key points
CN108875731A (en) Target identification method, device, system and storage medium
CN109670383A (en) Video shaded areas choosing method, device, electronic equipment and system
CN112001886A (en) A temperature detection method, device, terminal and readable storage medium
CN106250838A (en) vehicle identification method and system
CN111738225B (en) Crowd gathering detection method, device, equipment and storage medium
WO2019080743A1 (en) Target detection method and apparatus, and computer device
CN104217459B (en) A kind of spheroid character extracting method
CN111814514A (en) Number identification device, method and electronic device
CN111967289B (en) A non-cooperative face liveness detection method and computer storage medium
CN111382606A (en) Tumble detection method, tumble detection device and electronic equipment
CN115953744A (en) A vehicle recognition and tracking method based on deep learning
CN116363583B (en) A method, apparatus, device, and medium for human body recognition from a top-view perspective.
CN112949516A (en) Recognition method and device for quilt kicking behavior
CN111967529A (en) Identification method, device, equipment and system
CN112308061A (en) A kind of license plate character sorting method, recognition method and device
WO2023273227A1 (en) Fingernail recognition method and apparatus, device, and storage medium
CN113971671A (en) Instance partitioning method, instance partitioning device, electronic equipment and storage medium
CN110516641A (en) A method for constructing an environmental map and related devices
CN116052225A (en) Palmprint recognition method, electronic device, storage medium and computer program product

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