CN113591884B - Character recognition model determination method, device, equipment and storage medium - Google Patents
Character recognition model determination method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113591884B CN113591884B CN202010363346.3A CN202010363346A CN113591884B CN 113591884 B CN113591884 B CN 113591884B CN 202010363346 A CN202010363346 A CN 202010363346A CN 113591884 B CN113591884 B CN 113591884B
- Authority
- CN
- China
- Prior art keywords
- network
- network model
- model
- training
- test
- 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
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000012549 training Methods 0.000 claims abstract description 126
- 238000012360 testing method Methods 0.000 claims description 205
- 238000001514 detection method Methods 0.000 claims description 58
- 238000012545 processing Methods 0.000 claims description 18
- 238000013139 quantization Methods 0.000 claims description 12
- 238000002372 labelling Methods 0.000 claims description 7
- 230000000875 corresponding effect Effects 0.000 description 34
- 238000012015 optical character recognition Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000013473 artificial intelligence Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000011002 quantification Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Character Discrimination (AREA)
Abstract
本申请公开了一种字符识别模型的确定方法、装置、设备及存储介质,属于字符识别技术领域。所述方法包括:电子设备获取用户选择的用于运行字符识别模型的设备的设备信息,以及获取用户上传的带有标注信息的样本,其中,标注信息可以用于描述对应的样本中的字符的属性。电子设备可以基于设备信息以及标注信息,从网络模型集合中选择与该设备信息以及标注信息对应的待训练网络模型,如此,基于用户上传的样本对该待训练网络模型进行训练得到的字符识别模型更适合运行于用户选择的设备中,且该字符识别模型更适合识别与用户上传的样本类似的待识别对象中的字符,即对于与用户上传的样本类似的待识别对象中的字符的识别准确率较高。
This application discloses a method, device, equipment and storage medium for determining a character recognition model, which belongs to the technical field of character recognition. The method includes: the electronic device obtains device information of a device selected by the user for running the character recognition model, and obtains a sample uploaded by the user with annotation information, where the annotation information can be used to describe the character in the corresponding sample. Attributes. The electronic device can select the network model to be trained corresponding to the device information and the label information from the network model collection based on the device information and the label information. In this way, the character recognition model obtained by training the network model to be trained based on the sample uploaded by the user It is more suitable to run on the device selected by the user, and the character recognition model is more suitable for identifying characters in objects to be recognized that are similar to the samples uploaded by the user, that is, it can accurately identify characters in objects to be recognized that are similar to the samples uploaded by the user. The rate is higher.
Description
技术领域Technical field
本申请涉及字符识别技术领域,特别涉及一种字符识别模型的确定方法、装置、设备及存储介质。The present application relates to the field of character recognition technology, and in particular to a method, device, equipment and storage medium for determining a character recognition model.
背景技术Background technique
OCR(Optical Character Recognition,光学字符识别)是指能够对待识别图像中的待识别字符进行识别的技术。目前,OCR广泛应用于物流、医疗、金融、保险等领域。OCR (Optical Character Recognition, optical character recognition) refers to a technology that can recognize characters to be recognized in images to be recognized. At present, OCR is widely used in logistics, medical care, finance, insurance and other fields.
通常,用户可以获取通用OCR模型,从而利用该通用OCR模型对不同待识别图像中的待识别字符进行识别。其中,该通用OCR模型指的是通过通用的模型训练方法进行训练得到的模型。然而,由于不同待识别图像之间的区别较大,导致该通用OCR模型对不同待识别图像中的待识别字符的识别准确率较低,即该通用OCR模型的泛化能力较差。Generally, users can obtain a general OCR model and use the general OCR model to recognize characters to be recognized in different images to be recognized. Wherein, the general OCR model refers to a model trained through a general model training method. However, due to the large differences between different images to be recognized, the general OCR model has a low recognition accuracy of characters to be recognized in different images to be recognized, that is, the general OCR model has poor generalization ability.
发明内容Contents of the invention
本申请提供了一种字符识别模型的确定方法、装置、设备及存储介质,可以解决相关技术的字符识别模型的确定问题。所述技术方案如下:The present application provides a method, device, equipment and storage medium for determining a character recognition model, which can solve the problem of determining a character recognition model in related technologies. The technical solutions are as follows:
一方面,提供了一种字符识别模型的确定方法,所述方法包括:On the one hand, a method for determining a character recognition model is provided, and the method includes:
获取设备信息,以及获取用户上传的带有标注信息的样本,所述设备信息为用户选择的用于运行字符识别模型的设备的信息,所述标注信息用于描述对应的样本中的字符的属性;Obtain device information, and obtain samples uploaded by the user with annotation information. The device information is information about the device selected by the user for running the character recognition model. The annotation information is used to describe the attributes of the characters in the corresponding sample. ;
基于所述设备信息以及所述标注信息,从网络模型集合中确定待训练网络模型,所述网络模型集合中包括至少两个网络模型;Based on the device information and the annotation information, determine a network model to be trained from a network model set, where the network model set includes at least two network models;
基于所述用户上传的样本对所述待训练网络模型进行训练,得到所述字符识别模型。The network model to be trained is trained based on the samples uploaded by the user to obtain the character recognition model.
在本申请一种可能的实现方式中,所述标注信息包括对应的样本中的字符的字段类别和/或字段规则,所述基于所述设备信息以及所述标注信息,从网络模型集合中确定待训练网络模型,包括:In a possible implementation of the present application, the annotation information includes field categories and/or field rules of the characters in the corresponding samples, and the annotation information is determined from a network model collection based on the device information and the annotation information. Network models to be trained include:
根据所述设备信息,从所述网络模型集合中选择网络模型子集,其中,所述网络模型子集中包括的网络模型的尺寸和结构与所述设备匹配;According to the device information, select a network model subset from the network model set, wherein the size and structure of the network models included in the network model subset match the device;
根据所述用户上传的样本的字段类别和/或字段规则,从所述网络模型子集中确定对应的网络模型,得到所述待训练网络模型。According to the field categories and/or field rules of the samples uploaded by the user, the corresponding network model is determined from the network model subset to obtain the network model to be trained.
在本申请一种可能的实现方式中,所述基于所述用户上传的样本对所述待训练网络模型进行训练,得到所述字符识别模型,包括:In a possible implementation of this application, the network model to be trained is trained based on the samples uploaded by the user to obtain the character recognition model, which includes:
将所述用户上传的样本划分为训练样本集和测试样本集,其中,训练样本集中的样本与测试样本集中的样本具有相同的数据分布规律;Divide the samples uploaded by the user into a training sample set and a test sample set, where the samples in the training sample set and the samples in the test sample set have the same data distribution rule;
基于所述训练样本集多次对所述待训练网络模型进行训练;Train the network model to be trained multiple times based on the training sample set;
在每次训练得到第一网络模型后,基于所述测试样本集对当前的第一网络模型进行测试,得到测试指标;After each training obtains the first network model, the current first network model is tested based on the test sample set to obtain test indicators;
若当前的第一网络模型的测试指标高于前一次训练得到的第一网络模型的测试指标,则继续训练并测试;直到当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标,结束训练和测试,并将前一次训练得到的第一网络模型确定为所述字符识别模型。If the current test index of the first network model is higher than the test index of the first network model obtained by the previous training, continue training and testing; until the current test index of the first network model is lower than the first test index obtained by the previous training. Test indicators of the network model, end training and testing, and determine the first network model obtained from the previous training as the character recognition model.
在本申请一种可能的实现方式中,所述当前的第一网络模型包括检测网络和识别网络,所述基于所述测试样本集对当前的第一网络模型进行测试,得到测试指标,包括:In a possible implementation of this application, the current first network model includes a detection network and an identification network, and the current first network model is tested based on the test sample set to obtain test indicators, including:
基于所述测试样本集对所述检测网络进行测试,得到所述检测网络的测试指标,所述检测网络的测试指标用于指示所述检测网络的检测准确度;Test the detection network based on the test sample set to obtain test indicators of the detection network, and the test indicators of the detection network are used to indicate the detection accuracy of the detection network;
基于所述测试样本集对所述识别网络进行测试,得到所述识别网络的测试指标,所述识别网络的测试指标用于指示所述识别网络的字符识别准确度;Test the recognition network based on the test sample set to obtain test indicators of the recognition network, and the test indicators of the recognition network are used to indicate the character recognition accuracy of the recognition network;
将所述检测网络的测试指标和所述识别网络的测试指标确定为所述当前的第一网络模型的测试指标。The test indicators of the detection network and the test indicators of the identification network are determined as test indicators of the current first network model.
在本申请一种可能的实现方式中,所述方法还包括:In a possible implementation of this application, the method further includes:
生成测试报告,所述测试报告包括所述检测网络的测试指标、所述识别网络的测试指标以及模型反馈信息中的一项或者多项,所述模型反馈信息用于指示用户更新所上传的样本和/或更新所上传的样本中的标注信息。Generate a test report, the test report including one or more of the test indicators of the detection network, the test indicators of the identification network, and model feedback information. The model feedback information is used to instruct the user to update the uploaded sample. and/or update annotation information in uploaded samples.
在本申请一种可能的实现方式中,所述将前一次训练得到的第一网络模型确定为所述字符识别模型之前,还包括:In a possible implementation of the present application, before determining the first network model obtained by the previous training as the character recognition model, the method further includes:
对前一次训练得到的第一网络模型进行定点量化处理,得到定点量化后的第一网络模型;Perform fixed-point quantization processing on the first network model obtained from the previous training to obtain the first network model after fixed-point quantization;
所述将前一次训练得到的第一网络模型确定为所述字符识别模型,包括:Determining the first network model obtained from the previous training as the character recognition model includes:
将所述定点量化后的第一网络模型确定为所述字符识别模型。The fixed-point quantized first network model is determined as the character recognition model.
一方面,提供了一种字符识别模型的确定装置,所述装置包括:On the one hand, a device for determining a character recognition model is provided, and the device includes:
获取模块,用于获取设备信息,以及获取用户上传的带有标注信息的样本,所述设备信息为用户选择的用于运行字符识别模型的设备的信息,所述标注信息用于描述对应的样本中的字符的属性;The acquisition module is used to obtain device information and obtain samples with annotation information uploaded by the user. The device information is the information of the device selected by the user for running the character recognition model. The annotation information is used to describe the corresponding sample. Properties of the characters in ;
确定模块,用于基于所述设备信息以及所述标注信息,从网络模型集合中确定待训练网络模型,所述网络模型集合中包括至少两个网络模型;A determination module, configured to determine a network model to be trained from a network model set based on the device information and the annotation information, where the network model set includes at least two network models;
训练模块,用于基于所述用户上传的样本对所述待训练网络模型进行训练,得到所述字符识别模型。A training module, configured to train the network model to be trained based on the samples uploaded by the user to obtain the character recognition model.
在本申请一种可能的实现方式中,所述标注信息包括对应的样本中的字符的字段类别和/或字段规则,所述确定模块用于:In a possible implementation of this application, the annotation information includes field categories and/or field rules of characters in the corresponding sample, and the determination module is used to:
根据所述设备信息,从所述网络模型集合中选择网络模型子集,其中,所述网络模型子集中包括的网络模型的尺寸和结构与所述设备匹配;According to the device information, select a network model subset from the network model set, wherein the size and structure of the network models included in the network model subset match the device;
根据所述用户上传的样本的字段类别和/或字段规则,从所述网络模型子集中确定对应的网络模型,得到所述待训练网络模型。According to the field categories and/or field rules of the samples uploaded by the user, the corresponding network model is determined from the network model subset to obtain the network model to be trained.
在本申请一种可能的实现方式中,所述训练模块用于:In a possible implementation of this application, the training module is used for:
将所述用户上传的样本划分为训练样本集和测试样本集,其中,训练样本集中的样本与测试样本集中的样本具有相同的数据分布规律;Divide the samples uploaded by the user into a training sample set and a test sample set, where the samples in the training sample set and the samples in the test sample set have the same data distribution rule;
基于所述训练样本集多次对所述待训练网络模型进行训练;Train the network model to be trained multiple times based on the training sample set;
在每次训练得到第一网络模型后,基于所述测试样本集对当前的第一网络模型进行测试,得到测试指标;After each training obtains the first network model, the current first network model is tested based on the test sample set to obtain test indicators;
若当前的第一网络模型的测试指标高于前一次训练得到的第一网络模型的测试指标,则继续训练并测试;直到当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标,结束训练和测试,并将前一次训练得到的第一网络模型确定为所述字符识别模型。If the current test index of the first network model is higher than the test index of the first network model obtained by the previous training, continue training and testing; until the current test index of the first network model is lower than the first test index obtained by the previous training. Test indicators of the network model, end training and testing, and determine the first network model obtained from the previous training as the character recognition model.
在本申请一种可能的实现方式中,所述当前的第一网络模型包括检测网络和识别网络,所述训练模块用于:In a possible implementation of this application, the current first network model includes a detection network and a recognition network, and the training module is used to:
基于所述测试样本集对所述检测网络进行测试,得到所述检测网络的测试指标,所述检测网络的测试指标用于指示所述检测网络的检测准确度;Test the detection network based on the test sample set to obtain test indicators of the detection network, and the test indicators of the detection network are used to indicate the detection accuracy of the detection network;
基于所述测试样本集对所述识别网络进行测试,得到所述识别网络的测试指标,所述识别网络的测试指标用于指示所述识别网络的字符识别准确度;Test the recognition network based on the test sample set to obtain test indicators of the recognition network, and the test indicators of the recognition network are used to indicate the character recognition accuracy of the recognition network;
将所述检测网络的测试指标和所述识别网络的测试指标确定为所述当前的第一网络模型的测试指标。The test indicators of the detection network and the test indicators of the identification network are determined as test indicators of the current first network model.
在本申请一种可能的实现方式中,所述装置还包括:In a possible implementation of this application, the device further includes:
生成模块,用于生成测试报告,所述测试报告包括所述检测网络的测试指标、所述识别网络的测试指标以及模型反馈信息中的一项或者多项,所述模型反馈信息用于指示用户更新所上传的样本和/或更新所上传的样本中的标注信息。Generating module, used to generate a test report, the test report includes one or more of the test indicators of the detection network, the test indicators of the identification network, and model feedback information, the model feedback information is used to instruct the user Update the uploaded sample and/or update the annotation information in the uploaded sample.
在本申请一种可能的实现方式中,所述训练模块还用于:In a possible implementation of this application, the training module is also used to:
对前一次训练得到的第一网络模型进行定点量化处理,得到定点量化后的第一网络模型;Perform fixed-point quantization processing on the first network model obtained from the previous training to obtain the first network model after fixed-point quantization;
所述将前一次训练得到的第一网络模型确定为所述字符识别模型,包括:Determining the first network model obtained from the previous training as the character recognition model includes:
将所述定点量化后的第一网络模型确定为所述字符识别模型。The fixed-point quantized first network model is determined as the character recognition model.
一方面,提供了一种电子设备,所述电子设备包括:On the one hand, an electronic device is provided, and the electronic device includes:
处理器;processor;
用于存储处理器可执行指令的存储器;Memory used to store instructions executable by the processor;
其中,所述处理器被配置为实现上述一方面所述的字符识别模型的确定方法。Wherein, the processor is configured to implement the method for determining a character recognition model described in the above aspect.
一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述一方面所述的字符识别模型的确定方法。On the one hand, a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium. When the instructions are executed by a processor, the method for determining the character recognition model described in the above-mentioned aspect is implemented.
一方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述一方面所述的字符识别模型的确定方法。In one aspect, a computer program product containing instructions is provided, which when run on a computer causes the computer to execute the method for determining a character recognition model described in the above aspect.
本申请提供的技术方案至少可以带来以下有益效果:The technical solution provided by this application can at least bring the following beneficial effects:
获取用户选择的用于运行字符识别模型的设备的设备信息,以及获取用户上传的带有标注信息的样本,其中,标注信息可以用于描述对应的样本中的字符的属性。电子设备可以基于设备信息以及标注信息,从网络模型集合中选择与该设备信息以及标注信息对应的待训练网络模型,如此,基于用户上传的样本对该待训练网络模型进行训练得到的字符识别模型更适合运行于用户选择的设备中,且该字符识别模型更适合识别与用户上传的样本类似的待识别对象中的字符,即对于与用户上传的样本类似的待识别对象中的字符的识别准确率较高。Obtain the device information of the device selected by the user for running the character recognition model, and obtain the sample uploaded by the user with annotation information, where the annotation information can be used to describe the attributes of the characters in the corresponding sample. The electronic device can select the network model to be trained corresponding to the device information and the label information from the network model collection based on the device information and the label information. In this way, the character recognition model obtained by training the network model to be trained based on the samples uploaded by the user It is more suitable to run on the device selected by the user, and the character recognition model is more suitable for identifying characters in objects to be recognized that are similar to samples uploaded by users, that is, it can accurately identify characters in objects to be recognized that are similar to samples uploaded by users. The rate is higher.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本申请实施例提供的一种字符识别模型的确定方法的流程图;Figure 1 is a flow chart of a method for determining a character recognition model provided by an embodiment of the present application;
图2是本申请实施例提供的一种样本的示意图;Figure 2 is a schematic diagram of a sample provided by the embodiment of the present application;
图3是本申请实施例提供的一种字符识别模型的确定装置的结构示意图;Figure 3 is a schematic structural diagram of a device for determining a character recognition model provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
在对本申请实施例提供的字符识别模型的确定方法进行详细的解释说明之前,先对本申请实施例涉及的实施环境进行介绍。Before giving a detailed explanation of the method for determining the character recognition model provided by the embodiment of the present application, the implementation environment involved in the embodiment of the present application is first introduced.
本申请实施例提供的字符识别模型的确定方法可以应用于AI(ArtificialIntelligence,人工智能)开放平台,该AI开放平台支持人机交互,示例性的,用户可以将采集的样本上传至该AI开放平台中,该AI开放平台可以对用户上传的样本进行处理。再如,用户可以在该AI开放平台中对该样本进行标注等操作。The method for determining the character recognition model provided by the embodiments of the present application can be applied to an AI (Artificial Intelligence, artificial intelligence) open platform. The AI open platform supports human-computer interaction. For example, users can upload collected samples to the AI open platform. , the AI open platform can process samples uploaded by users. For another example, users can perform operations such as labeling the sample in the AI open platform.
作为一种示例,该AI开放平台中可以包括电子设备,该电子设备可以用于对网络模型进行训练,得到字符识别模型。示例性的,该电子设备可以为笔记本电脑、便携式计算机、台式计算机、服务器等,本申请实施例对此不做限定。As an example, the AI open platform may include electronic equipment, and the electronic equipment may be used to train a network model to obtain a character recognition model. For example, the electronic device may be a notebook computer, a portable computer, a desktop computer, a server, etc., which is not limited in the embodiments of the present application.
在介绍完本申请实施例涉及的实施环境后,接下来将结合附图对本申请实施例提供的字符识别模型的确定方法进行详细介绍。After introducing the implementation environment involved in the embodiments of the present application, the method for determining the character recognition model provided by the embodiments of the present application will be introduced in detail with reference to the accompanying drawings.
图1是本申请实施例提供的一种字符识别模型的确定方法的流程图,该方法可以应用于上述实施环境中。请参考图1,该方法包括如下步骤。Figure 1 is a flow chart of a method for determining a character recognition model provided by an embodiment of the present application. This method can be applied in the above implementation environment. Please refer to Figure 1. The method includes the following steps.
步骤101:获取设备信息,以及获取用户上传的带有标注信息的样本,设备信息为用户选择的用于运行字符识别模型的设备的信息,标注信息用于描述对应的样本中的字符的属性。Step 101: Obtain device information and obtain samples with annotation information uploaded by the user. The device information is information about the device selected by the user for running the character recognition model. The annotation information is used to describe the attributes of the characters in the corresponding sample.
其中,字符识别模型为由电子设备训练得到的网络模型,该字符识别模型可以用于识别待识别对象中的字符,譬如,该字符识别模型可以用于识别图像中的字符,或者,该字符识别模型可以用于识别视频中的字符等等。The character recognition model is a network model trained by an electronic device. The character recognition model can be used to identify characters in objects to be recognized. For example, the character recognition model can be used to identify characters in images, or the character recognition model can be used to identify characters in images. Models can be used to recognize characters in videos and more.
其中,设备信息可以为设备ID(Identity,标识)、设备IP(Internet ProtocolAddress,互联网协议地址)等,电子设备可以基于该设备信息确定用户选择哪个或哪种设备用于运行字符识别模型。The device information may be device ID (Identity, identification), device IP (Internet Protocol Address, Internet Protocol address), etc., and the electronic device can determine which device or devices the user selects to run the character recognition model based on the device information.
示例性的,用户可以选择云端设备用于运行字符识别模型,在该种情况下,电子设备可以获取云端设备的设备信息。用户也可以选择边缘端设备用于运行字符识别模型,在该种情况下,电子设备可以获取边缘端设备的设备信息。For example, the user can select a cloud device to run the character recognition model, in which case the electronic device can obtain the device information of the cloud device. The user can also select the edge device to run the character recognition model. In this case, the electronic device can obtain the device information of the edge device.
其中,云端设备的计算能力通常较强,边缘端设备的计算能力通常较弱。示例性的,云端设备可以为服务器、计算机等,边缘端设备可以为手机、NVR(Network VideoRecorder,网络视频录像机)等。Among them, the computing power of cloud devices is usually strong, while the computing power of edge devices is usually weak. For example, the cloud device can be a server, a computer, etc., and the edge device can be a mobile phone, NVR (Network Video Recorder, Network Video Recorder), etc.
其中,用户上传的样本可以为用户基于样本采集装置采集得到的样本,该样本可以为静态图像、动态图像、视频等,本实施例对此不做限定。示例性的,用户上传的样本中包括字符,相应的,如图2所示,用户可以基于样本中的字符对该样本进行标注,从而生成标注信息,该标注信息可以用于描述样本中的字符的属性。The samples uploaded by the user may be samples collected by the user based on the sample collection device, and the samples may be static images, dynamic images, videos, etc. This embodiment does not limit this. For example, the sample uploaded by the user includes characters. Correspondingly, as shown in Figure 2, the user can label the sample based on the characters in the sample to generate label information, which can be used to describe the characters in the sample. properties.
示例性的,该标注信息可以包括字段位置、字段类别、字段规则、字段内容等,本实施例对此不做限定。电子设备可以基于该标注信息确定与样本中的字符相关的信息。For example, the annotation information may include field positions, field categories, field rules, field content, etc., which is not limited in this embodiment. The electronic device can determine information related to the characters in the sample based on the annotation information.
其中,字段位置指的是样本中字符所在的区域的位置,字段类别指的是样本中的字段所属的类别,字段规则指的是样本中的字段中的字符的组成规则,字段内容指的是样本中的字段包括的字符的内容。Among them, the field position refers to the location of the area where the characters in the sample are located, the field category refers to the category to which the fields in the sample belong, the field rules refer to the composition rules of the characters in the fields in the sample, and the field content refers to The fields in the sample contain the contents of the characters.
譬如,如图2所示,该样本的字段类别包括车厢号和车型号,车厢号的字段规则为固定7位数字,车型号的字段内容为“C62AK”,车厢号的字段内容为“4503388”。For example, as shown in Figure 2, the field categories of this sample include carriage number and vehicle model. The field rule for carriage number is a fixed 7-digit number, the field content for vehicle model is "C62AK", and the field content for carriage number is "4503388" .
需要说明的是,在用户基于样本采集装置采集样本的情况下,用户可以通过调节架设该样本采集装置的角度和距离,使得采集的样本中的字符保持水平、采集的样本中字符的字符高度大于30个像素点、以及采集的样本中的字符类别包括所有用户需要字符识别模型识别的字符类别。进而,在用户完成样本采集的情况下,用户可以将采集的样本上传至AI开放平台中。It should be noted that when the user collects samples based on the sample collection device, the user can adjust the angle and distance of the sample collection device so that the characters in the collected samples remain horizontal and the character height of the characters in the collected samples is greater than The 30 pixels and the character categories in the collected samples include all character categories that the user needs to recognize by the character recognition model. Furthermore, when the user completes sample collection, the user can upload the collected samples to the AI open platform.
也就是,电子设备可以获取设备信息,从而可以基于该设备信息确定用户选择哪个或哪种设备用于运行字符识别模型,电子设备还可以获取用户上传的带有标注信息的样本,从而基于该标注信息确定样本中的字符的属性。That is, the electronic device can obtain the device information, so that it can determine which device or devices the user selects to run the character recognition model based on the device information. The electronic device can also obtain the sample with annotation information uploaded by the user, so that based on the annotation The information determines the properties of the characters in the sample.
作为一种示例,电子设备还可以对用户上传的样本进行预处理,示例性的,电子设备可以对用户上传的样本进行尺寸归一化处理、滤波处理、平滑处理等等,本实施例对此不做限定。As an example, the electronic device can also perform preprocessing on the samples uploaded by the user. For example, the electronic device can perform size normalization processing, filtering processing, smoothing processing, etc. on the samples uploaded by the user. In this embodiment, No restrictions.
步骤102:基于设备信息以及标注信息,从网络模型集合中确定待训练网络模型,网络模型集合中包括至少两个网络模型。Step 102: Based on the device information and annotation information, determine the network model to be trained from the network model set, which includes at least two network models.
其中,网络模型集合中的网络模型可以为预先训练后存储于电子设备中的。The network models in the network model set may be pre-trained and then stored in the electronic device.
示例性的,网络模型集合中的网络模型可以为基于预训练样本集训练得到的。其中,该预训练样本集中的样本可以包括用户上传的样本、电子设备采集的样本、电子设备合成的样本、云端下载的样本等等,本实施例对此不做限定。For example, the network models in the network model set may be trained based on the pre-training sample set. The samples in the pre-training sample set may include samples uploaded by users, samples collected by electronic devices, samples synthesized by electronic devices, samples downloaded from the cloud, etc. This embodiment is not limited to this.
需要说明的是,不同的网络模型通常对应有不同的预训练样本集,该不同的网络模型可以用于识别属于不同字段类别的字符,或者,该不同的网络模型可以用于识别具有不同字段规则的字符,或者,该不同的网络模型可以用于识别属于不同字段类别且具有不同字段规则的字符。It should be noted that different network models usually correspond to different pre-training sample sets. The different network models can be used to identify characters belonging to different field categories, or the different network models can be used to identify characters with different field rules. characters, or the different network models can be used to identify characters belonging to different field categories and with different field rules.
示例性的,在预训练样本集中的样本中的字符为车厢号,网络模型是基于该预训练样本集训练得到的情况下,该网络模型可以用于识别车厢号。在预训练样本集中的样本中的字符为7位数字,网络模型是基于该预训练样本集训练得到的情况下,该网络模型可以用于识别7位数字的字符。在预训练样本集中的样本中的字符为车厢号且该车厢号为7位数字,网络模型是基于该预训练样本集训练得到的情况下,该网络模型可以用于识别7位数字的车厢号。For example, when the characters in the samples in the pre-training sample set are carriage numbers and the network model is trained based on the pre-training sample set, the network model can be used to identify the carriage number. In the case where the characters in the samples in the pre-training sample set are 7-digit numbers and the network model is trained based on the pre-training sample set, the network model can be used to recognize 7-digit characters. When the characters in the samples in the pre-training sample set are carriage numbers and the carriage number is a 7-digit number, and the network model is trained based on the pre-training sample set, the network model can be used to identify the 7-digit carriage number. .
在网络模型集合中包括多个网络模型的情况下,电子设备可以基于设备信息以及标注信息,在网络模型集合中选择与设备信息以及标注信息相匹配的待训练模型。When the network model set includes multiple network models, the electronic device can select a model to be trained in the network model set that matches the device information and the annotation information based on the device information and the annotation information.
作为一种示例,标注信息包括对应的样本中的字符的字段类别和/或字段规则,基于设备信息以及标注信息,从网络模型集合中确定待训练网络模型的实现可以包括以下几个子步骤:As an example, the annotation information includes the field categories and/or field rules of the characters in the corresponding samples. Based on the device information and annotation information, the implementation of determining the network model to be trained from the network model collection may include the following sub-steps:
1、根据设备信息,从网络模型集合中选择网络模型子集,其中,网络模型子集中包括的网络模型的尺寸和结构与设备匹配。1. According to the device information, select a network model subset from the network model collection, where the size and structure of the network models included in the network model subset match the device.
示例性的,网络模型集合中包括的多个网络模型的尺寸和结构可以是不同的,譬如,网络模型集合中可以包括尺寸较大的网络模型,也可以包括尺寸较小的网络模型,网络模型集合中可以包括结构较复杂的网络模型,也可以包括结构较简单的网络模型。For example, the sizes and structures of the multiple network models included in the network model set may be different. For example, the network model set may include a network model with a larger size or a network model with a smaller size. The network model The collection can include network models with more complex structures or network models with simpler structures.
通常,计算能力较强的设备中可以运行尺寸较大、结构较复杂的网络模型,计算能力较弱的设备中可以运行尺寸较小、结构较简单的网络模型。如此,电子设备可以基于设备信息,在网络模型集合中选择与该设备的计算能力相匹配的网络模型。Generally, devices with stronger computing power can run network models with larger sizes and more complex structures, while devices with weaker computing power can run network models with smaller sizes and simpler structures. In this way, the electronic device can select a network model that matches the computing capability of the device from the network model collection based on the device information.
也就是,若设备信息指示该设备为计算能力较弱的设备,则电子设备可以为该设备选择尺寸较小、结构较简单的网络模型,若设备信息指示该设备为计算能力较强的设备,则电子设备可以为该设备选择尺寸较大、结构较复杂的网络模型。That is, if the device information indicates that the device is a device with weak computing power, the electronic device can select a network model with a smaller size and a simpler structure for the device; if the device information indicates that the device is a device with strong computing power, Then the electronic device can choose a network model with a larger size and a more complex structure for the device.
譬如,若设备信息指示该设备为边缘端设备,则电子设备可以为该边缘端设备选择尺寸较小、结构较简单的网络模型,若设备信息指示该设备为云端设备,则电子设备可以为该云端设备选择尺寸较大、结构较复杂的网络模型。For example, if the device information indicates that the device is an edge device, the electronic device can select a network model with a smaller size and a simpler structure for the edge device. If the device information indicates that the device is a cloud device, the electronic device can select the network model for the edge device. For cloud devices, choose a network model with larger size and more complex structure.
2、根据用户上传的样本的字段类别和/或字段规则,从网络模型子集中确定对应的网络模型,得到待训练网络模型。2. According to the field categories and/or field rules of the samples uploaded by the user, determine the corresponding network model from the network model subset to obtain the network model to be trained.
示例性的,字段类别可以为身份证号、手机号、车厢号、车型号等等,本实施例对此不做限定。For example, the field type may be ID number, mobile phone number, carriage number, car model, etc., which is not limited in this embodiment.
示例性的,字段规则可以为字段包括7位数字,或者,字段规则可以为字段由字母与数字组成,或者,字段规则可以为字段中的第一个字符为大写字母等等,本实施例对此不做限定。For example, the field rule may be that the field includes 7 digits, or the field rule may be that the field is composed of letters and numbers, or the field rule may be that the first character in the field is a capital letter, etc. This embodiment is suitable for This is not limited.
示例性的,字段类别与网络模型之间可以具有对应关系,字段规则与网络模型之间也可以具有对应关系。譬如,如表1所示,网络模型1对应的字段类别为车型号,网络模型2对应的字段类别为车厢号,网络模型3对应的字段类别为车厢号,网络模型3对应的字段规则为车厢号是6位数字,网络模型4对应的字段类别为车型号和车厢号,网络模型5对应的字段类别为车型号和车厢号,网络模型5对应的字段规则为车厢号是7位数字。For example, there may be a corresponding relationship between field categories and network models, and there may also be a corresponding relationship between field rules and network models. For example, as shown in Table 1, the field category corresponding to network model 1 is vehicle model, the field category corresponding to network model 2 is carriage number, the field category corresponding to network model 3 is carriage number, and the field rule corresponding to network model 3 is carriage number. The number is a 6-digit number. The field categories corresponding to network model 4 are car model and compartment number. The field categories corresponding to network model 5 are car model and compartment number. The field rules corresponding to network model 5 are that the compartment number is 7 digits.
表1Table 1
需要说明的是,字段类别与网络模型之间的对应关系、以及字段规则与网络模型之间的对应关系可以为预先确定后存储于电子设备中。It should be noted that the correspondence between field categories and network models, and the correspondence between field rules and network models can be predetermined and then stored in the electronic device.
在网络模型子集中包括多个网络模型的情况下,电子设备可以基于字段类别,在网络模型子集中选择与该字段类别对应的网络模型,或者,电子设备可以基于字段规则,在网络模型子集中选择与该字段规则对应的网络模型,或者,电子设备可以基于字段类别和字段规则,在网络模型子集中选择与该字段类别和字段规则对应的网络模型。In the case where multiple network models are included in the network model subset, the electronic device may select a network model corresponding to the field category in the network model subset based on the field category, or the electronic device may select the network model corresponding to the field category in the network model subset based on the field rule. Select a network model corresponding to the field rule, or the electronic device can select a network model corresponding to the field category and field rule in a subset of network models based on the field category and field rule.
示例性的,如表1所示,在网络模型子集中包括网络模型1、网络模型2、网络模型3、网络模型4、网络模型5的情况下,若标注信息指示该字段类别为车型号,则电子设备可以选择网络模型1作为待训练网络模型。若标注信息指示该字段规则为6位数字,则电子设备可以选择网络模型3作为待训练网络模型。若标注信息指示字段类别为车型号和车厢号,字段规则为车厢号是7位数字,则电子设备可以选择网络模型5作为待训练网络模型。For example, as shown in Table 1, in the case where the network model subset includes network model 1, network model 2, network model 3, network model 4, and network model 5, if the annotation information indicates that the field category is vehicle model, Then the electronic device can select network model 1 as the network model to be trained. If the annotation information indicates that the field rule is a 6-digit number, the electronic device can select network model 3 as the network model to be trained. If the annotation information indicates that the field category is car model and compartment number, and the field rule is that the compartment number is a 7-digit number, then the electronic device can select network model 5 as the network model to be trained.
步骤103:基于用户上传的样本对待训练网络模型进行训练,得到字符识别模型。Step 103: Train the network model to be trained based on the samples uploaded by the user to obtain a character recognition model.
也就是,在确定用户上传的样本以及待训练网络模型的情况下,电子设备可以基于用户上传的样本对该待训练网络模型进行训练,从而得到字符识别模型。That is, after determining the samples uploaded by the user and the network model to be trained, the electronic device can train the network model to be trained based on the samples uploaded by the user, thereby obtaining a character recognition model.
作为一种示例,基于用户上传的样本对待训练网络模型进行训练,得到字符识别模型的实现可以包括以下几个子步骤:As an example, the network model to be trained is trained based on the samples uploaded by the user, and the implementation of the character recognition model can include the following sub-steps:
1、将用户上传的样本划分为训练样本集和测试样本集,其中,训练样本集中的样本与测试样本集中的样本具有相同的数据分布规律。1. Divide the samples uploaded by the user into a training sample set and a test sample set. The samples in the training sample set and the samples in the test sample set have the same data distribution rules.
其中,训练样本集中的样本可以用于对待训练网络模型进行训练,以得到训练后的网络模型。测试样本集中的样本可以用于对训练后的网络模型进行测试,以评估训练后的网络模型的字符识别效果。Among them, the samples in the training sample set can be used to train the network model to be trained to obtain the trained network model. The samples in the test sample set can be used to test the trained network model to evaluate the character recognition effect of the trained network model.
其中,数据分布规律可以根据实际情况进行设置,该数据分布规律可以为与字符高度、字符类别、字段类别等相关的规律,本实施例对此不做限定。示例性的,数据分布规律相同可以包括训练样本集中的样本的字符高度与测试样本集中的样本的字符高度基本一致,和/或,数据分布规律相同可以包括训练样本集中的样本的字符类别与测试样本集中的样本的字符类别基本一致,和/或,数据分布规律相同可以包括训练样本集中的样本的字段类别与测试样本集中的样本的字段类别基本一致等等。The data distribution rule can be set according to the actual situation. The data distribution rule can be a rule related to character height, character category, field category, etc., which is not limited in this embodiment. For example, the same data distribution law may include that the character height of the samples in the training sample set is basically the same as the character height of the samples in the test sample set, and/or the same data distribution law may include that the character categories of the samples in the training sample set are basically the same as those in the test sample set. The character categories of the samples in the sample set are basically the same, and/or the same data distribution pattern may include the field categories of the samples in the training sample set being basically the same as the field categories of the samples in the test sample set, etc.
示例性的,对用户上传的样本进行划分的方法可以包括留出法(hold-out)、交叉验证法、自助法(bootstrapping)等,本实施例对此不做限定。For example, methods for dividing samples uploaded by users may include hold-out, cross-validation, bootstrapping, etc., which are not limited in this embodiment.
也就是,电子设备可以统计用户上传的样本的数据分布,从而基于该数据分布将用户上传的样本划分为训练样本集和测试样本集,使得该训练样本集中样本的数据分布规律与测试样本集中样本的数据分布规律相同。That is, the electronic device can count the data distribution of the samples uploaded by the user, and then divide the samples uploaded by the user into a training sample set and a test sample set based on the data distribution, so that the data distribution pattern of the samples in the training sample set is consistent with the data distribution pattern of the samples in the test sample set. The data distribution rules are the same.
示例性的,若数据分布规律相同包括该训练样本集中的样本的字符高度与测试样本集中的样本的字符高度基本一致,则电子设备可以统计用户上传的样本的字符高度,从而基于该字符高度将用户上传的样本划分为训练样本集和测试样本集,使得该训练样本集中的样本的字符高度在30-100像素点之间,该测试样本集中的样本的字符高度也在30-100像素点之间。For example, if the data distribution rules are the same, including that the character height of the samples in the training sample set is basically the same as the character height of the samples in the test sample set, the electronic device can count the character heights of the samples uploaded by the user, so as to calculate the character height based on the character height. The samples uploaded by the user are divided into a training sample set and a test sample set, so that the character height of the samples in the training sample set is between 30-100 pixels, and the character height of the samples in the test sample set is also between 30-100 pixels. between.
示例性的,若数据分布规律相同包括该训练样本集中的样本的字符类别与测试样本集中的样本的字符类别基本一致,则电子设备可以统计用户上传的样本的字符类别,从而基于该字符类别将用户上传的样本划分为训练样本集和测试样本集,使得该训练样本集中的样本的字符类别为数字,该测试样本集中的样本的字符类别也为数字。For example, if the data distribution rules are the same, including that the character categories of the samples in the training sample set are basically the same as the character categories of the samples in the test sample set, the electronic device can count the character categories of the samples uploaded by the user, so as to classify the characters based on the character categories. The samples uploaded by the user are divided into a training sample set and a test sample set, so that the character categories of the samples in the training sample set are numbers, and the character categories of the samples in the test sample set are also numbers.
示例性的,若数据分布规律相同包括该训练样本集中的样本的字段类别与测试样本集中的样本的字段类别基本一致,则电子设备可以统计用户上传的样本的字段类别,从而基于该字段类别将用户上传的样本划分为训练样本集和测试样本集,使得该训练样本集中的样本的字段类别为车厢号,该测试样本集中的样本的字段类别也为车厢号。For example, if the data distribution rules are the same, including that the field categories of the samples in the training sample set are basically consistent with the field categories of the samples in the test sample set, the electronic device can count the field categories of the samples uploaded by the user, so as to classify the fields based on the field categories. The samples uploaded by the user are divided into a training sample set and a test sample set, so that the field category of the samples in the training sample set is the carriage number, and the field category of the samples in the test sample set is also the carriage number.
2、基于训练样本集多次对待训练网络模型进行训练。在每次训练得到第一网络模型后,基于测试样本集对当前的第一网络模型进行测试,得到测试指标。若当前的第一网络模型的测试指标高于前一次训练得到的第一网络模型的测试指标,则继续训练并测试。直到当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标,结束训练和测试,并将前一次训练得到的第一网络模型确定为字符识别模型。2. Train the network model to be trained multiple times based on the training sample set. After each training obtains the first network model, the current first network model is tested based on the test sample set to obtain test indicators. If the current test index of the first network model is higher than the test index of the first network model obtained in the previous training, continue training and testing. Until the test index of the current first network model is lower than the test index of the first network model obtained from the previous training, the training and testing are ended, and the first network model obtained from the previous training is determined as the character recognition model.
通常,随着对于待训练网络模型的训练,得到的第一网络模型的字符识别效果会逐渐提高,然而,当训练达到某种程度时,得到的第一网络模型的字符识别效果会逐渐降低。在该种情况下,电子设备可以基于第一网络模型的测试指标,选择字符识别效果最佳的第一网络模型作为字符识别模型。Usually, as the network model to be trained is trained, the character recognition effect of the first network model will gradually improve. However, when the training reaches a certain level, the character recognition effect of the first network model will gradually decrease. In this case, the electronic device can select the first network model with the best character recognition effect as the character recognition model based on the test index of the first network model.
也就是,电子设备可以基于训练样本集对待训练网络模型进行多次训练,并基于测试样本集对每一次训练得到的第一网络模型进行测试,得到测试指标。若当前的第一网络模型的测试指标高于前一次训练得到的第一网络模型的测试指标,则说明前一次训练得到的第一网络模型的测试指标不是最优的,即前一次训练得到的第一网络模型不是字符识别效果最好的网络模型。在该种情况下,电子设备可以继续对该当前的第一网络模型进行训练并测试,直至当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标,电子设备可以确定前一次训练得到的第一网络模型的测试指标是最优的,即前一次训练得到的第一网络模型是字符识别效果最好的网络模型,在该种情况下,电子设备可以将前一次训练得到的第一网络模型确定为字符识别模型。That is, the electronic device can train the network model to be trained multiple times based on the training sample set, and test the first network model obtained after each training based on the test sample set to obtain the test index. If the current test index of the first network model is higher than the test index of the first network model obtained by the previous training, it means that the test index of the first network model obtained by the previous training is not optimal, that is, the test index obtained by the previous training The first network model is not the best network model for character recognition. In this case, the electronic device can continue to train and test the current first network model until the test index of the current first network model is lower than the test index of the first network model obtained by the previous training. The electronic device It can be determined that the test index of the first network model obtained by the previous training is optimal, that is, the first network model obtained by the previous training is the network model with the best character recognition effect. In this case, the electronic device can The first network model obtained through one training is determined as the character recognition model.
当然,在一种可能的实现方式中,在当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标的情况下,可以将该前一次训练得到的第一网络模型确定为候选字符识别模型。由于第一网络模型的测试指标存在短暂降低之后继续提高的可能性,因此电子设备还可以继续多次训练并测试,以进一步确定该候选字符识别模型的测试指标是否是最优的。若电子设备继续多次训练并测试得到的多个测试指标均低于该候选字符识别模型的测试指标,则可以确定该候选字符识别模型的测试指标是最优的,即该候选字符识别模型是字符识别效果最好的网络模型,在该种情况下,电子设备可以将该候选字符识别模型确定为字符识别模型。Of course, in a possible implementation, when the test index of the current first network model is lower than the test index of the first network model obtained by the previous training, the first network model obtained by the previous training can be The model is determined as a candidate character recognition model. Since the test index of the first network model may decrease briefly and then continue to increase, the electronic device may continue to train and test multiple times to further determine whether the test index of the candidate character recognition model is optimal. If the electronic device continues to train and test multiple times and the multiple test indicators obtained are lower than the test indicators of the candidate character recognition model, it can be determined that the test indicators of the candidate character recognition model are optimal, that is, the candidate character recognition model is The network model with the best character recognition effect. In this case, the electronic device can determine the candidate character recognition model as the character recognition model.
作为一种示例,当前的第一网络模型包括检测网络和识别网络,基于测试样本集对当前的第一网络模型进行测试,得到测试指标的实现方式可以为:基于测试样本集对检测网络进行测试,得到检测网络的测试指标,检测网络的测试指标用于指示检测网络的检测准确度。基于测试样本集对识别网络进行测试,得到识别网络的测试指标,识别网络的测试指标用于指示识别网络的字符识别准确度。将检测网络的测试指标和识别网络的测试指标确定为当前的第一网络模型的测试指标。As an example, the current first network model includes a detection network and a recognition network. The current first network model is tested based on the test sample set. The implementation method of obtaining the test indicators can be: test the detection network based on the test sample set. , the test indicators of the detection network are obtained. The test indicators of the detection network are used to indicate the detection accuracy of the detection network. The recognition network is tested based on the test sample set to obtain the test indicators of the recognition network. The test indicators of the recognition network are used to indicate the character recognition accuracy of the recognition network. The test indicators of the detection network and the test indicators of the identification network are determined as the test indicators of the current first network model.
其中,检测网络可以用于检测样本中的字段位置以及字段类别,示例性的,检测网络可以采用四边形文字检测算法、通用目标检测算法等等,本实施例对此不做限定。The detection network can be used to detect field positions and field categories in the sample. For example, the detection network can use a quadrilateral text detection algorithm, a general target detection algorithm, etc. This embodiment is not limited to this.
其中,识别网络可以用于识别样本中的字段内容,示例性的,识别网络可以为基于CTC(Connectionist Temporal Classification,连接主义时间分类)的网络、结合Attention Mechanism(注意力机制)的网络等等,本实施例对此不做限定。Among them, the recognition network can be used to identify the field content in the sample. For example, the recognition network can be a network based on CTC (Connectionist Temporal Classification, Connectionist Temporal Classification), a network combined with Attention Mechanism (attention mechanism), etc. This embodiment does not limit this.
示例性的,电子设备可以将测试样本集中的样本输入至检测网络,输出字段位置以及字段类别,从而可以基于该检测网络输出的字段位置以及字段类别,确定该检测网络的测试指标。电子设备可以将字段位置对应的字段区域输入至识别网络,输出该字段区域中的字段内容,从而可以基于该识别网络输出的字段内容,确定该识别网络的测试指标。For example, the electronic device can input the samples in the test sample set to the detection network and output the field positions and field categories, so that the test indicators of the detection network can be determined based on the field positions and field categories output by the detection network. The electronic device can input the field area corresponding to the field position to the recognition network and output the field content in the field area, so that the test indicators of the recognition network can be determined based on the field content output by the recognition network.
其中,检测网络的测试指标可以为召回率、准确率、召回率与准确率的调和平均数等等。Among them, the test indicators of the detection network can be recall rate, accuracy rate, harmonic average of recall rate and accuracy rate, etc.
其中,准确率指的是检测网络检测出的被标注的字段位置在所有检测出的字段位置中所占的比例,召回率指的是检测网络检测出的被标注的字段位置在所有被标注的字段位置中所占的比例。Among them, the accuracy rate refers to the proportion of the marked field positions detected by the detection network among all detected field positions, and the recall rate refers to the proportion of the marked field positions detected by the detection network among all the marked field positions. The proportion of field positions.
示例性的,若测试样本集中包括50个被标注的字段位置,检测网络检测到40个字段位置,其中30个字段位置为被标注的字段位置,则准确率为30/40=0.75,召回率为30/50=0.6。For example, if the test sample set includes 50 labeled field positions, and the detection network detects 40 field positions, of which 30 field positions are labeled field positions, the accuracy rate is 30/40=0.75, and the recall rate is 30/50=0.6.
需要说明的是,在检测网络的测试指标包括召回率、准确率、召回率与准确率的调和平均数中的多个的情况下,可以分别为每个指标设置权重,从而基于该多个指标以及每个指标对应的权重,确定检测网络的测试指标。It should be noted that when the test indicators of the detection network include multiple of the recall rate, accuracy rate, and the harmonic average of the recall rate and accuracy rate, the weight can be set for each indicator separately, so that based on the multiple indicators And the weight corresponding to each indicator is used to determine the test indicators of the detection network.
譬如,在检测网络的测试指标包括召回率和准确率的情况下,可以设置召回率的权重为0.6,设置准确率的权重为0.4,若召回率为0.6,准确率为0.75,则该检测网络的测试指标为0.6*0.6+0.75*0.4=0.66。For example, when the test indicators of the detection network include recall and precision, you can set the weight of the recall to 0.6 and the weight of the precision to 0.4. If the recall is 0.6 and the precision is 0.75, then the detection network The test index is 0.6*0.6+0.75*0.4=0.66.
其中,识别网络的测试指标可以为字段识别率,该字段识别率指的是所有字段中被识别网络识别正确的字段所占的比例,被识别网络识别正确指的是该字段中每个字符均被识别网络识别正确。Among them, the test indicator of the recognition network can be the field recognition rate. The field recognition rate refers to the proportion of all fields that are correctly recognized by the recognition network. The correct recognition by the recognition network means that each character in the field is correctly recognized. Correctly recognized by the identified network.
也就是,电子设备可以调用测试样本集对检测网络进行测试,即基于检测网络输出的字符位置和字段类别、以及用户标注的字符位置和字段类别,得到检测网络的测试指标,从而确定该检测网络的字段检测准确率。电子设备可以调用测试样本集对识别网络进行测试,即基于识别网络输出的字段内容、以及用户标注的字段内容,得到识别网络的测试指标,从而确定识别网络的字符识别准确度。That is, the electronic device can call the test sample set to test the detection network, that is, based on the character positions and field categories output by the detection network, and the character positions and field categories marked by the user, the test indicators of the detection network are obtained, thereby determining the detection network field detection accuracy. The electronic device can call the test sample set to test the recognition network, that is, based on the field content output by the recognition network and the field content marked by the user, the test indicators of the recognition network are obtained, thereby determining the character recognition accuracy of the recognition network.
需要说明的是,若用户上传的样本中的字段类别有多种,则当前的第一网络模型中可以包括多个识别网络,每个识别网络可以用于识别该识别网络对应的字段类别的字段内容。It should be noted that if there are multiple field categories in the sample uploaded by the user, the current first network model can include multiple recognition networks, and each recognition network can be used to identify fields of the field category corresponding to the recognition network. content.
在一种可能的实现方式中,电子设备还可以利用测试样本集对当前的第一网络模型进行整体测试,即将测试样本集输入至当前的第一网络模型中,输出字段内容,从而根据用户标注的字段内容、以及当前的第一网络模型输出的字段内容,确定该当前的第一网络模型的字符识别效果。In a possible implementation, the electronic device can also use the test sample set to conduct an overall test on the current first network model, that is, input the test sample set into the current first network model, and output the field content, thereby according to the user's annotation The field content of , and the field content output by the current first network model determine the character recognition effect of the current first network model.
作为一种示例,电子设备还可以进行如下操作:生成测试报告,测试报告包括检测网络的测试指标、识别网络的测试指标以及模型反馈信息中的一项或者多项,模型反馈信息用于指示用户更新所上传的样本和/或更新所上传的样本中的标注信息。As an example, the electronic device can also perform the following operations: generate a test report. The test report includes one or more of test indicators for detecting the network, test indicators for identifying the network, and model feedback information. The model feedback information is used to instruct the user Update the uploaded sample and/or update the annotation information in the uploaded sample.
示例性的,在用户标注字段规则的情况下,若检测到用户在某个样本中标注的字段内容不符合该字段规则,则可以确定用户对该样本标注错误。在该种情况下,电子设备可以生成模型反馈信息,提示用户该样本标注错误,从而用户可以根据该模型反馈信息对该样本进行重新标注。或者,若字符识别模型对某种字段类别的字段内容的字段识别率较低,则电子设备可以生成模型反馈信息,提示用户采集更多包括该字段类别的字段内容的样本。For example, when the user annotates field rules, if it is detected that the field content annotated by the user in a certain sample does not comply with the field rule, it can be determined that the user annotated the sample incorrectly. In this case, the electronic device can generate model feedback information to prompt the user that the sample is incorrectly labeled, so that the user can re-label the sample based on the model feedback information. Alternatively, if the character recognition model has a low field recognition rate for the field content of a certain field category, the electronic device can generate model feedback information to prompt the user to collect more samples including the field content of the field category.
也就是,电子设备可以将检测网络的测试指标、识别网络的测试指标以及模型反馈信息中的一项作为测试报告发送给用户,或者,电子设备可以将检测网络的测试指标、识别网络的测试指标以及模型反馈信息中的多项作为测试报告发送给用户,如此,用户可以基于该测试报告确定该字符识别模型的字符识别效果,并根据模型反馈信息对样本进行更新。That is, the electronic device can send one of the test indicators for detecting the network, the test indicator for identifying the network, and the model feedback information to the user as a test report, or the electronic device can send the test indicators for detecting the network, the test indicators for identifying the network, and the like. And multiple items in the model feedback information are sent to the user as a test report. In this way, the user can determine the character recognition effect of the character recognition model based on the test report, and update the sample based on the model feedback information.
作为一种示例,将前一次训练得到的第一网络模型确定为字符识别模型之前,电子设备还可以进行如下操作:对前一次训练得到的第一网络模型进行定点量化处理,得到定点量化后的第一网络模型。将前一次训练得到的第一网络模型确定为字符识别模型的实现方式可以为:将定点量化后的第一网络模型确定为字符识别模型。As an example, before determining the first network model obtained by the previous training as the character recognition model, the electronic device may also perform the following operations: perform fixed-point quantization processing on the first network model obtained by the previous training, and obtain the fixed-point quantized The first network model. Determining the first network model obtained by the previous training as the character recognition model may be implemented by: determining the first network model after fixed-point quantization as the character recognition model.
其中,定点量化处理指的是将前一次训练得到的第一网络模型由浮点模型转换为定点模型的处理过程。Among them, fixed-point quantization processing refers to the process of converting the first network model obtained from the previous training from a floating-point model to a fixed-point model.
也就是,该前一次训练得到的第一网络模型为浮点模型,由于用户选择的用于运行字符识别模型的设备可能不支持运行浮点模型,因此电子设备可以对该前一次训练得到的第一网络模型进行定点量化处理,得到定点量化后的第一网络模型,从而电子设备可以将该定点量化后的第一网络模型确定为字符识别模型。That is, the first network model obtained by the previous training is a floating point model. Since the device selected by the user to run the character recognition model may not support running the floating point model, the electronic device can use the first network model obtained by the previous training. A network model is subjected to fixed-point quantification processing to obtain a first network model after fixed-point quantification, so that the electronic device can determine the first network model after fixed-point quantification as a character recognition model.
示例性的,电子设备还可以将字符识别模型发送给用户选择的设备,如此,该字符识别模型可以在该用户选择的设备中运行,从而使得该字符识别模型可以用于对用户上传到该设备中的待识别对象中的字符进行识别。Exemplarily, the electronic device can also send the character recognition model to the device selected by the user. In this way, the character recognition model can be run in the device selected by the user, so that the character recognition model can be used for uploading to the device by the user. Recognize the characters in the object to be recognized.
在本申请实施例中,电子设备获取用户选择的用于运行字符识别模型的设备的设备信息,以及获取用户上传的带有标注信息的样本,其中,标注信息可以用于描述对应的样本中的字符的属性。电子设备可以基于设备信息以及标注信息,从网络模型集合中选择与该设备信息以及标注信息对应的待训练网络模型,如此,基于用户上传的样本对该待训练网络模型进行训练得到的字符识别模型更适合运行于用户选择的设备中,且该字符识别模型更适合识别与用户上传的样本类似的待识别对象中的字符,即对于与用户上传的样本类似的待识别对象中的字符的识别准确率较高。In the embodiment of the present application, the electronic device obtains the device information of the device selected by the user for running the character recognition model, and obtains the sample uploaded by the user with annotation information, where the annotation information can be used to describe the corresponding sample. Character properties. The electronic device can select the network model to be trained corresponding to the device information and the label information from the network model collection based on the device information and the label information. In this way, the character recognition model obtained by training the network model to be trained based on the samples uploaded by the user It is more suitable to run on the device selected by the user, and the character recognition model is more suitable for identifying characters in objects to be recognized that are similar to samples uploaded by users, that is, it can accurately identify characters in objects to be recognized that are similar to samples uploaded by users. The rate is higher.
图3是根据一示例性实施例示出的一种字符识别模型的确定装置的结构示意图,该字符识别模型的确定装置可以由软件、硬件或者两者的结合实现。该字符识别模型的确定装置可以包括:Figure 3 is a schematic structural diagram of a device for determining a character recognition model according to an exemplary embodiment. The device for determining a character recognition model can be implemented by software, hardware, or a combination of both. The determining device of the character recognition model may include:
获取模块310,用于获取设备信息,以及获取用户上传的带有标注信息的样本,所述设备信息为用户选择的用于运行字符识别模型的设备的信息,所述标注信息用于描述对应的样本中的字符的属性;The acquisition module 310 is used to obtain device information and samples uploaded by the user with annotation information. The device information is information about the device selected by the user for running the character recognition model. The annotation information is used to describe the corresponding Properties of the characters in the sample;
确定模块320,用于基于所述设备信息以及所述标注信息,从网络模型集合中确定待训练网络模型,所述网络模型集合中包括至少两个网络模型;Determining module 320, configured to determine a network model to be trained from a network model set based on the device information and the annotation information, where the network model set includes at least two network models;
训练模块330,用于基于所述用户上传的样本对所述待训练网络模型进行训练,得到所述字符识别模型。The training module 330 is used to train the network model to be trained based on the samples uploaded by the user to obtain the character recognition model.
在本申请一种可能的实现方式中,所述标注信息包括对应的样本中的字符的字段类别和/或字段规则,所述确定模块320用于:In a possible implementation of the present application, the annotation information includes field categories and/or field rules of characters in the corresponding sample, and the determination module 320 is used to:
根据所述设备信息,从所述网络模型集合中选择网络模型子集,其中,所述网络模型子集中包括的网络模型的尺寸和结构与所述设备匹配;According to the device information, select a network model subset from the network model set, wherein the size and structure of the network models included in the network model subset match the device;
根据所述用户上传的样本的字段类别和/或字段规则,从所述网络模型子集中确定对应的网络模型,得到所述待训练网络模型。According to the field categories and/or field rules of the samples uploaded by the user, the corresponding network model is determined from the network model subset to obtain the network model to be trained.
在本申请一种可能的实现方式中,所述训练模块330用于:In a possible implementation of this application, the training module 330 is used to:
将所述用户上传的样本划分为训练样本集和测试样本集,其中,训练样本集中的样本与测试样本集中的样本具有相同的数据分布规律;Divide the samples uploaded by the user into a training sample set and a test sample set, where the samples in the training sample set and the samples in the test sample set have the same data distribution rule;
基于所述训练样本集多次对所述待训练网络模型进行训练;Train the network model to be trained multiple times based on the training sample set;
在每次训练得到第一网络模型后,基于所述测试样本集对当前的第一网络模型进行测试,得到测试指标;After each training obtains the first network model, the current first network model is tested based on the test sample set to obtain test indicators;
若当前的第一网络模型的测试指标高于前一次训练得到的第一网络模型的测试指标,则继续训练并测试;直到当前的第一网络模型的测试指标低于前一次训练得到的第一网络模型的测试指标,结束训练和测试,并将前一次训练得到的第一网络模型确定为所述字符识别模型。If the current test index of the first network model is higher than the test index of the first network model obtained by the previous training, continue training and testing; until the current test index of the first network model is lower than the first test index obtained by the previous training. Test indicators of the network model, end training and testing, and determine the first network model obtained from the previous training as the character recognition model.
在本申请一种可能的实现方式中,所述当前的第一网络模型包括检测网络和识别网络,所述训练模块330用于:In a possible implementation of this application, the current first network model includes a detection network and a recognition network, and the training module 330 is used to:
基于所述测试样本集对所述检测网络进行测试,得到所述检测网络的测试指标,所述检测网络的测试指标用于指示所述检测网络的检测准确度;Test the detection network based on the test sample set to obtain test indicators of the detection network, and the test indicators of the detection network are used to indicate the detection accuracy of the detection network;
基于所述测试样本集对所述识别网络进行测试,得到所述识别网络的测试指标,所述识别网络的测试指标用于指示所述识别网络的字符识别准确度;Test the recognition network based on the test sample set to obtain test indicators of the recognition network, and the test indicators of the recognition network are used to indicate the character recognition accuracy of the recognition network;
将所述检测网络的测试指标和所述识别网络的测试指标确定为所述当前的第一网络模型的测试指标。The test indicators of the detection network and the test indicators of the identification network are determined as test indicators of the current first network model.
在本申请一种可能的实现方式中,所述装置还包括:In a possible implementation of this application, the device further includes:
生成模块340,用于生成测试报告,所述测试报告包括所述检测网络的测试指标、所述识别网络的测试指标以及模型反馈信息中的一项或者多项,所述模型反馈信息用于指示用户更新所上传的样本和/或更新所上传的样本中的标注信息。Generating module 340, configured to generate a test report. The test report includes one or more of the test indicators of the detection network, the test indicators of the identification network, and model feedback information. The model feedback information is used to indicate The user updates the uploaded sample and/or updates the annotation information in the uploaded sample.
在本申请一种可能的实现方式中,所述训练模块330还用于:In a possible implementation of this application, the training module 330 is also used to:
对前一次训练得到的第一网络模型进行定点量化处理,得到定点量化后的第一网络模型;Perform fixed-point quantization processing on the first network model obtained from the previous training to obtain the first network model after fixed-point quantization;
所述将前一次训练得到的第一网络模型确定为所述字符识别模型,包括:Determining the first network model obtained from the previous training as the character recognition model includes:
将所述定点量化后的第一网络模型确定为所述字符识别模型。The fixed-point quantized first network model is determined as the character recognition model.
在本申请实施例中,电子设备获取用户选择的用于运行字符识别模型的设备的设备信息,以及获取用户上传的带有标注信息的样本,其中,标注信息可以用于描述对应的样本中的字符的属性。电子设备可以基于设备信息以及标注信息,从网络模型集合中选择与该设备信息以及标注信息对应的待训练网络模型,如此,基于用户上传的样本对该待训练网络模型进行训练得到的字符识别模型更适合运行于用户选择的设备中,且该字符识别模型更适合识别与用户上传的样本类似的待识别对象中的字符,即对于与用户上传的样本类似的待识别对象中的字符的识别准确率较高。In the embodiment of the present application, the electronic device obtains the device information of the device selected by the user for running the character recognition model, and obtains the sample uploaded by the user with annotation information, where the annotation information can be used to describe the corresponding sample. Character properties. The electronic device can select the network model to be trained corresponding to the device information and the label information from the network model collection based on the device information and the label information. In this way, the character recognition model obtained by training the network model to be trained based on the samples uploaded by the user It is more suitable to run on the device selected by the user, and the character recognition model is more suitable for identifying characters in objects to be recognized that are similar to samples uploaded by users, that is, it can accurately identify characters in objects to be recognized that are similar to samples uploaded by users. The rate is higher.
需要说明的是:上述实施例提供的字符识别模型的确定装置在字符识别模型的确定时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的字符识别模型的确定装置与字符识别模型的确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the device for determining the character recognition model provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the determination of the character recognition model. In practical applications, the above functions can be allocated from different modules as needed. The functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the character recognition model provided in the above embodiments and the embodiment of the method for determining the character recognition model belong to the same concept. Please refer to the method embodiments for the specific implementation process, which will not be described again here.
图4是本申请实施例提供的一种电子设备400的结构框图。该电子设备400可以是便携式移动终端,比如:智能手机、平板电脑、MP3播放器(Moving Picture Experts GroupAudio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture ExpertsGroup Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。电子设备400还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。FIG. 4 is a structural block diagram of an electronic device 400 provided by an embodiment of the present application. The electronic device 400 can be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, moving picture experts compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, moving picture expert) Expert compression of standard audio levels 4) players, laptops or desktop computers. The electronic device 400 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal, and other names.
通常,电子设备400包括有:处理器401和存储器402。Generally, the electronic device 400 includes: a processor 401 and a memory 402.
处理器401可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器401可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器401也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器401可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器401还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 can adopt at least one hardware form among DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), and PLA (Programmable Logic Array, programmable logic array). accomplish. The processor 401 may also include a main processor and a co-processor. The main processor is a processor used to process data in the wake-up state, also called CPU (Central Processing Unit, central processing unit); the co-processor is A low-power processor used to process data in standby mode. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is responsible for rendering and drawing content that needs to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process computing operations related to machine learning.
存储器402可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器402还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器402中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器401所执行以实现本申请中方法实施例提供的字符识别模型的确定方法。Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 401 to implement character recognition provided by the method embodiments in this application. How to determine the model.
本领域技术人员可以理解,图4中示出的结构并不构成对电子设备400的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 4 does not limit the electronic device 400, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
在一些实施例中,还提供了一种计算机可读存储介质,该存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述实施例中字符识别模型的确定方法的步骤。例如,所述计算机可读存储介质可以是磁盘或光盘,EEPROM(Electrically ErasableProgrammable Read Only Memory,电可擦除可编程只读存储器),EPROM(ErasableProgrammable Read-Only Memory,可擦除可编程只读存储器),SRAM(Static RandomAccess Memory,静态随时存取存储器),ROM(Read Only Memory,只读存储器),磁存储器,快闪存储器,PROM(Programmable Read-Only Memory,可编程只读存储器)等。In some embodiments, a computer-readable storage medium is also provided, and a computer program is stored in the storage medium. When the computer program is executed by a processor, the steps of the method for determining the character recognition model in the above embodiments are implemented. For example, the computer-readable storage medium may be a magnetic disk or an optical disk, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM (Erasable Programmable Read-Only Memory) ), SRAM (Static RandomAccess Memory, static anytime access memory), ROM (Read Only Memory, read-only memory), magnetic memory, flash memory, PROM (Programmable Read-Only Memory, programmable read-only memory), etc.
值得注意的是,本申请提到的计算机可读存储介质可以为非易失性存储介质,换句话说,可以是非瞬时性存储介质。It is worth noting that the computer-readable storage media mentioned in this application may be non-volatile storage media, in other words, may be non-transitory storage media.
应当理解的是,实现上述实施例的全部或部分步骤可以通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。所述计算机指令可以存储在上述计算机可读存储介质中。It should be understood that all or part of the steps to implement the above embodiments can be implemented through software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
也即是,在一些实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述所述的字符识别模型的确定方法的步骤。That is, in some embodiments, a computer program product containing instructions is also provided, which when run on a computer causes the computer to perform the steps of the method for determining the character recognition model described above.
以上所述为本申请提供的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are optional embodiments provided for this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this application shall be included in the protection of this application. within the range.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010363346.3A CN113591884B (en) | 2020-04-30 | 2020-04-30 | Character recognition model determination method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010363346.3A CN113591884B (en) | 2020-04-30 | 2020-04-30 | Character recognition model determination method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113591884A CN113591884A (en) | 2021-11-02 |
CN113591884B true CN113591884B (en) | 2023-11-14 |
Family
ID=78237189
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010363346.3A Active CN113591884B (en) | 2020-04-30 | 2020-04-30 | Character recognition model determination method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113591884B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7305850B1 (en) | 2022-06-30 | 2023-07-10 | 菱洋エレクトロ株式会社 | System, terminal, server, method and program using machine learning |
CN116090006B (en) * | 2023-02-01 | 2023-09-08 | 北京三维天地科技股份有限公司 | Sensitive identification method and system based on deep learning |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7689531B1 (en) * | 2005-09-28 | 2010-03-30 | Trend Micro Incorporated | Automatic charset detection using support vector machines with charset grouping |
US8762299B1 (en) * | 2011-06-27 | 2014-06-24 | Google Inc. | Customized predictive analytical model training |
CN109165249A (en) * | 2018-08-07 | 2019-01-08 | 阿里巴巴集团控股有限公司 | Data processing model construction method, device, server and user terminal |
CN109359277A (en) * | 2018-10-22 | 2019-02-19 | 众安在线财产保险股份有限公司 | Data monitoring method, equipment and computer storage medium |
CN109919014A (en) * | 2019-01-28 | 2019-06-21 | 平安科技(深圳)有限公司 | OCR recognition methods and its electronic equipment |
CN110990461A (en) * | 2019-12-12 | 2020-04-10 | 国家电网有限公司大数据中心 | Big data analysis model algorithm model selection method and device, electronic equipment and medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140122370A1 (en) * | 2012-10-30 | 2014-05-01 | Hewlett-Packard Development Company, L.P. | Systems and methods for model selection |
US20190095557A1 (en) * | 2017-09-15 | 2019-03-28 | Credit Suisse Securities (Usa) Llc | Modelling apparatuses, methods, and systems |
US10832003B2 (en) * | 2018-08-26 | 2020-11-10 | CloudMinds Technology, Inc. | Method and system for intent classification |
-
2020
- 2020-04-30 CN CN202010363346.3A patent/CN113591884B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7689531B1 (en) * | 2005-09-28 | 2010-03-30 | Trend Micro Incorporated | Automatic charset detection using support vector machines with charset grouping |
US8762299B1 (en) * | 2011-06-27 | 2014-06-24 | Google Inc. | Customized predictive analytical model training |
CN109165249A (en) * | 2018-08-07 | 2019-01-08 | 阿里巴巴集团控股有限公司 | Data processing model construction method, device, server and user terminal |
CN109359277A (en) * | 2018-10-22 | 2019-02-19 | 众安在线财产保险股份有限公司 | Data monitoring method, equipment and computer storage medium |
CN109919014A (en) * | 2019-01-28 | 2019-06-21 | 平安科技(深圳)有限公司 | OCR recognition methods and its electronic equipment |
CN110990461A (en) * | 2019-12-12 | 2020-04-10 | 国家电网有限公司大数据中心 | Big data analysis model algorithm model selection method and device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN113591884A (en) | 2021-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200394416A1 (en) | Method and apparatus for training feature extraction model, computer device, and computer-readable storage medium | |
CN106650780B (en) | Data processing method and device, classifier training method and system | |
US20190026605A1 (en) | Neural network model training method and apparatus, living body detecting method and apparatus, device and storage medium | |
CN109345553B (en) | Palm and key point detection method and device thereof, and terminal equipment | |
CN110929573A (en) | Image detection-based test question inspection method and related equipment | |
US20210303864A1 (en) | Method and apparatus for processing video, electronic device, medium and product | |
WO2020082734A1 (en) | Text emotion recognition method and apparatus, electronic device, and computer non-volatile readable storage medium | |
CN113780098B (en) | Character recognition method, character recognition device, electronic equipment and storage medium | |
CN108090211B (en) | Hot news pushing method and device | |
CN112214576B (en) | Public opinion analysis method, public opinion analysis device, terminal equipment and computer readable storage medium | |
CN109446873A (en) | Hand-written script recognition methods, system and terminal device | |
CN113591884B (en) | Character recognition model determination method, device, equipment and storage medium | |
CN110490237B (en) | Data processing method, device, storage medium and electronic device | |
CN113762303B (en) | Image classification method, device, electronic equipment and storage medium | |
CN114067343A (en) | Data set construction method, model training method and corresponding device | |
CN117312140A (en) | Method and device for generating test case, electronic equipment and storage medium | |
CN107844531B (en) | Answer output method and device and computer equipment | |
CN113254814A (en) | Network course video labeling method and device, electronic equipment and medium | |
US20220392243A1 (en) | Method for training text classification model, electronic device and storage medium | |
CN110020638B (en) | Facial expression recognition method, device, equipment and medium | |
CN109657127B (en) | Answer obtaining method, device, server and storage medium | |
CN111027533B (en) | Click-to-read coordinate transformation method, system, terminal equipment and storage medium | |
CN110059180B (en) | Article author identity recognition and evaluation model training method and device and storage medium | |
CN117932049A (en) | Medical record abstract generation method, device, computer equipment and medium | |
CN108021648B (en) | Method, device and intelligent terminal for searching questions |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250310 Address after: No.555, Qianmo Road, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou Hikvision Digital Technology Co.,Ltd. Country or region after: China Address before: Room 2010, no.6, Lane 599, Yungu Road, Jiading District, Shanghai Patentee before: SHANGHAI GOLDWAY INTELLIGENT TRANSPORTATION SYSTEM Co.,Ltd. Country or region before: China |