Reasoning deployment of character recognition model and character recognition method and related equipment
By quantizing and module fusion of the network parameters of the character recognition model, the high storage and computing resource problems when deploying and using artificial intelligence character recognition models are solved, and the effect of reducing application costs and improving model promotion and application is achieved.
Patent Information
- Application Number
- CN202410465658.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-04-17
AI Technical Summary
In the prior art, the direct deployment and use of artificial intelligence character recognition models will consume a lot of storage and computing resources, resulting in high application costs and limiting the promotion and application of the model.
By quantifying the network parameters of the network module used for feature extraction in the character recognition model and fusing the quantized module with other network modules, a new character recognition model is formed to reduce the storage and computing requirements of the model.
It effectively reduces the memory space and computing resources required to deploy the model, reduces application costs, and helps promote and apply artificial intelligence models.
Smart Images

Figure CN118298436B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an inference deployment of a character recognition model and a character recognition method and a device, electronic device, storage medium and computer program product thereof. Background Art
[0002] Traditional optical character recognition (OCR) refers to the process in which an electronic device examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then uses character recognition methods to match the shapes with preset template characters, find matching template characters, and translate them into computer text. Since traditional OCR recognizes characters in images based on template matching methods, when characters in the template and / or characters in the image to be recognized are missing, the difficulty and complexity of character recognition will increase.
[0003] In response to this, the character recognition method based on deep learning can use neural networks to simulate the human brain for analysis, learning and training, that is, imitate the human brain mechanism to analyze images and recognize characters in images, which can effectively avoid the shortcomings of traditional OCR methods.
[0004] Existing deep learning technologies generally use PCs and GPU graphics cards as hardware foundations for model training and character recognition. Although the operation is simple and portable, the artificial intelligence models for character recognition obtained through deep learning technology training are often relatively complex. Direct deployment and use of such models will consume large amounts of storage and computing resources, resulting in higher application costs. This places high demands on the deployment and application of the models, thus limiting the promotion and application of artificial intelligence models to a certain extent. Summary of the invention
[0005] The embodiments of the present application provide an inference deployment of a character recognition model and a character recognition method and its device, electronic device, storage medium and computer program product, so as to solve the problem in the prior art that directly deploying and using artificial intelligence models will consume large storage and computing resources and thus bring high application costs.
[0006] The present application embodiment adopts the following technical solutions:
[0007] In a first aspect, the present application provides a method for reasoning and deploying a character recognition model, comprising:
[0008] quantizing the network parameters of the first network module for feature extraction in the character recognition model according to a preset quantization range; the character recognition model is trained based on a plurality of sample images and character annotation information of the plurality of sample images;
[0009] The quantized first network module and the second network module in the character recognition model are integrated to obtain a first character recognition model, wherein the second network module is used to perform feature prediction based on a feature map output by the first network module;
[0010] Based on the multiple sample images and the character annotation information of the multiple sample images, the first character recognition model is trained to obtain a target character recognition model, and reasoning deployment is performed based on the target character recognition model.
[0011] In a second aspect, the present application provides a character recognition method, comprising:
[0012] Acquire text box images in a plurality of target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images;
[0013] Dividing the text box images in the plurality of target images into a specified number of groups, wherein the number of text box images included in one group is a preset number;
[0014] By deploying target character recognition models in multiple computing cores, characters in the text box images in the specified number of groups are recognized in parallel based on the first indication information, and at least one of the target character recognition models is deployed in one of the computing cores.
[0015] In a third aspect, the present application provides an inference deployment device for a character recognition model, comprising:
[0016] A parameter quantization module, used to quantize the network parameters of the first network module used for feature extraction in the character recognition model according to a preset quantization range; the character recognition model is trained based on a plurality of sample images and character annotation information of the plurality of sample images;
[0017] A network fusion module, used for fusing the quantized first network module with the second network module in the character recognition model to obtain a first character recognition model, wherein the second network module is used for performing feature prediction based on a feature map output by the first network module;
[0018] The model training module is used to train the first character recognition model based on the multiple sample images and the character annotation information of the multiple sample images to obtain a target character recognition model, and perform inference deployment based on the target character recognition model.
[0019] In a fourth aspect, the present application provides a character recognition device, comprising:
[0020] An information acquisition module, used to acquire text box images from a plurality of target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images;
[0021] An image division module, used for dividing the text box images in the plurality of target images into a specified number of groups, wherein the number of text box images contained in one group is a preset number;
[0022] A character recognition module is used to recognize characters in the text box images in the specified number of groups in parallel based on the first indication information through target character recognition models deployed in multiple computing cores, and at least one of the target character recognition models is deployed in one of the computing cores.
[0023] In a fifth aspect, the present application provides an electronic device, including: a memory and a processor;
[0024] The memory is used to store computer programs;
[0025] The processor, coupled to the memory, is configured to execute the computer program to:
[0026] According to a preset quantization range, the network parameters of the first network module used for feature extraction in the character recognition model are quantized; the character recognition model is trained based on multiple sample images and character annotation information of the multiple sample images; the quantized first network module and the second network module in the character recognition model are merged to obtain a first character recognition model, and the second network module is used to perform feature prediction based on the feature map output by the first network module; based on the multiple sample images and the character annotation information of the multiple sample images, the first character recognition model is trained to obtain a target character recognition model, and inference deployment is performed based on the target character recognition model; or,
[0027] Acquire text box images in multiple target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and the box positions in the corresponding target images; divide the text box images in the multiple target images into a specified number of groups, wherein the number of text box images contained in one group is a preset number; and identify characters in the text box images in the specified number of groups in parallel based on the first indication information through target character recognition models deployed in multiple computing cores, wherein at least one of the target character recognition models is deployed in one computing core.
[0028] In a sixth aspect, the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the method described in the first aspect or the second aspect are implemented.
[0029] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps in the method described in the first aspect or the second aspect.
[0030] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0031] By adopting the method provided in the embodiment of the present application, the network parameters of the first network module used for feature extraction in the character recognition model can be quantized according to a preset quantization range, and the character recognition model is trained based on multiple sample images and character annotation information of multiple sample images; in order to enable the character recognition model to be used normally, the quantized first network module and the second network module in the character recognition model are fused to obtain the first character recognition model, and the second network module is used to predict features based on the feature map output by the first network module; finally, based on multiple sample images and character annotation information of multiple sample images, the first character recognition model is retrained to obtain the target character recognition model. Since the network parameters of the quantized first network module are changed from the original floating point data to integer data, the memory space required for the deployment model is effectively reduced, thereby reducing the storage and computing resources required for model deployment, which is conducive to the promotion and application of artificial intelligence models. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0033] Figure 1 A schematic diagram of the implementation flow of a method for reasoning a character recognition model is provided for an embodiment of the present application;
[0034] Figure 2 A schematic diagram of the existing structure of a CRNN model used in the training method of a character recognition model provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of the improved structure of the CRNN model used in the character recognition model splitting method provided in the embodiment of the present application;
[0036] Figure 4 A schematic diagram of the structural principle of the second network module provided in an embodiment of the present application;
[0037] Figure 5 A schematic diagram of a LogSoftmax function image in a character recognition model training method provided in an embodiment of the present application;
[0038] Figure 6 A schematic diagram of the calculation process of a character recognition model in the method for deploying a character recognition model provided in an embodiment of the present application;
[0039] Figure 7 A flowchart of a character recognition method provided in an embodiment of the present application;
[0040] Figure 8 A flowchart of a character recognition method provided in an embodiment of the present application applied in an actual scenario;
[0041] Fig. 9 A schematic diagram of the specific structure of a deployment device for a character recognition model provided in an embodiment of the present application;
[0042] Fig.10 A specific structural diagram of a character recognition device provided in an embodiment of the present application;
[0043] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0045] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0046] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0047] First, the terms involved in one or more embodiments of the present application are explained.
[0048] The CRNN model, full name Convolutional Recurrent Neural Network, is a model used to solve image-based sequence recognition problems, especially in scene text recognition. The main components of the CRNN model include:
[0049] Convolutional layer CNN: This layer is responsible for extracting features from the input image. This usually involves resizing the image to a fixed height and using a convolutional neural network (such as ResNet18 or more complex models such as ResNet50) to create a feature map to extract a sequence of features.
[0050] Recurrent layer RNN: This is usually composed of a bidirectional long short-term memory network (BiLSTM) to model the feature sequence to predict the distribution. In the recurrent layer, the LSTM processes the feature sequence through its three gates (forget gate, input gate, and output gate) to learn the contextual relationship in the sequence.
[0051] Transcription layer CTC loss: This layer is used to align the output text. CTC loss is based on the given path probability of the input and all possible results. It is divided into two stages: forward and reverse. The forward solution is decoded according to the CTC decoding method, while the reverse stage needs to calculate the CTC loss.
[0052] CRNN can recognize text sequences of indefinite length end-to-end without cutting individual characters first. Instead, it converts text recognition into a time-dependent sequence learning problem. The advantages of CRNN include easy training, easy model convergence, high robustness, and support for variable-length input, which is suitable for production environments with large variations in text length. However, its disadvantages include relatively low recognition accuracy, especially when the text contains a large number of Chinese characters or varies greatly in natural scenes.
[0053] CPU: CPU is the earliest control unit and computing unit used in computers. With the development of computer technology, CPU has gradually become the most important part of the computer system, responsible for the core tasks of the entire computer system. CPU is composed of multiple structures, including Arithmetic and Logic Unit (ALU), Control Unit (CU), Register, Cache, which communicate with each other through data, control and status buses. These structures and communication methods are the necessary basis for CPU to complete various tasks, and are also the key factors to improve computer computing efficiency.
[0054] GPU: GPU stands for Graphics Processing Unit. As its name suggests, it is a processor that is specifically used to handle graphics and image computing tasks. Originally designed to accelerate computer graphics rendering, as the requirements for graphics performance increase, GPU has gradually developed into a processor with powerful parallel computing capabilities. GPU has a large number of small processing cores that can handle multiple tasks at the same time and can perform parallel computing efficiently. It performs well in processing complex images, videos, and 3D graphics. But it is worth noting that GPU cannot work alone and must be controlled and called by the CPU to work.
[0055] NPU: NPU stands for Neural Network Processing Unit, or neural network processor. The neural network processor NPU adopts the "data-driven parallel computing" architecture and is a processor developed specifically for artificial intelligence applications. It is particularly good at training and reasoning neural network calculations, especially processing massive multimedia data such as videos and images. NPU uses special hardware acceleration technology to efficiently perform large-scale matrix operations, solving the problem of low efficiency of traditional chips in neural network operations.
[0056] Existing deep learning technologies generally use PCs and GPU graphics cards as hardware foundations for model training and reasoning for character recognition, although they have the advantages of a wide range of general applications, a large number of storage models, and fast reasoning speed. However, the artificial intelligence models for character recognition obtained through deep learning technology training are often relatively lightweight. Direct deployment and use on PCs and GPUs will cause such models to waste a large amount of storage and computing resources. At the same time, the combination of PCs and GPUs makes the equipment cost too high, inconvenient to carry, and high energy consumption leads to power consumption and other disadvantages. Hardware devices based on the combination of embedded and NPU, compared with GPU devices with power consumption of up to hundreds of watts or even thousands of watts, NPU power consumption is only less than tens of watts, which can reduce the hardware energy consumption problem generated during deep learning model reasoning. In addition, embedded devices have the characteristics of small size and low cost, which meet the requirements of deploying deep learning character recognition models on edge computing and small devices. However, the deep learning model algorithm based on the embedded end does not have the faster reasoning time like the PC end, which makes the deep learning algorithm model fail to meet the actual requirements of industrial implementation in terms of time application, which also limits the application of character recognition algorithms on embedded devices.
[0057] In order to solve the above problems existing in the prior art, the embodiments of the present application provide a method for training a character recognition model. Specifically, in the present application, a character recognition method is also provided. The present application also relates to a training device for a character recognition model, a character recognition device, an electronic device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0058] The execution subject of the method may be various types of computing devices, or may be an application or application (Application, APP) installed on the computing device, such as a character recognition application. The computing device may be, for example, a user terminal such as a mobile phone, a tablet computer, a smart wearable device, or a server.
[0059] For ease of description, the present application embodiment takes the execution subject of the method as an example of a server to introduce the method. Those skilled in the art can understand that the present application embodiment takes the server as an example to introduce the method, which is only an exemplary description and does not limit the scope of protection of the claims corresponding to the present solution.
[0060] Specifically, a flowchart of an implementation method of an inference deployment method of a character recognition model provided by one or more embodiments of the present application is as follows: Figure 1 As shown, including:
[0061] Step 110, quantizing the network parameters of the first network module used for feature extraction in the character recognition model according to a preset quantization range.
[0062] The character recognition model is trained based on multiple sample images and character annotation information of multiple sample images. Specifically, multiple sample images can be collected for training, and the character recognition model can be constructed based on the CRNN model. The structural diagram of the character recognition model constructed based on the CRNN model is shown in FIG. Figure 2 As shown in the figure, the structure "Conv+Relu+MaxPool" extracts features through a convolution layer and then performs pooling operation. Convolution is responsible for capturing local features. The activation function enables the model to learn complex data patterns and functional relationships. Pooling is responsible for reducing the size of the data space, introducing translation invariance and preventing overfitting. The structure "Conv+Conv+Relu+MaxPool" extracts features through two convolution layers and then performs pooling operation. Due to the presence of two convolution layers, the network can learn more complex feature representations. The first convolution layer can extract low-level, basic features (such as edges and textures), while the second convolution layer may further extract higher-level and more abstract features based on these low-level features. The structure "Conv+Relu" further abstracts the previously extracted features as data input for the subsequent serialization modeling layer; and the serialization modeling layers "BiLSTM" and "LogSoftmax". The loss function for training the character recognition model can adopt the loss function CTCLoss used for time series annotation. During the training process, the character recognition model can be optimized by minimizing the error between the output sequence and the actual label sequence. Among them, the loss function of CTC Loss can calculate the probability and of all possible alignment paths, and then adjust the network parameters of the character recognition model through the back propagation algorithm.
[0063] The loss function calculation formula of CTC Loss is: loss = CTC Loss (log_probs, targets, input_lengths, target_lengths). Among them, log_probs is the probability tensor output by the character recognition model. This tensor generally needs to be constrained after LogSoftmax calculation to prevent gradient explosion during back propagation during training and improve data stability; targets is the tensor of the target label predicted by the character recognition model, which is converted from the label during data annotation; input_lengths is the tensor converted from the sequence filled with the same specified length mask, and target_lengths is the tensor converted from the total character length in a batch of loaded data.
[0064] As an example, the trained character recognition model can be split into three parts: ① The first network module for convolutional feature extraction ( Figure 3Conv(FeatureMap) shown in the figure), ② The second network module for feature sequence prediction ( Figure 3 The BiLSTM (Sequence) shown in FIG. 3 is used to convert the label probability distribution into the label sequence part. Figure 3 The network model structure obtained by splitting the character recognition model is as follows: Figure 3 As shown, it is divided into three parts, including: a first network module composed of two "Conv+Relu+MaxPool", two "Conv+Conv+Relu+MaxPool", and "Conv+Relu" for performing convolution to extract feature parts ( Figure 3 Conv (Feature Map) shown); the second network module composed of two "BiLSTM" for feature sequence prediction ( Figure 3 BiLSTM (Sequence) shown); and a third network module composed of "LogSoftmax" for converting label probability distribution to label sequence part ( Figure 3 LogSoftmax(Probability)) as shown.
[0065] As an example, in order to improve the quantization accuracy and reduce the loss of information during the quantization process, the preset quantization range is an asymmetric int8 type quantization range. Generally speaking, the network parameters of the first network module used for convolution extraction of feature parts are usually float32 floating point data, and float32 is represented by 32 bits to represent floating point numbers, of which 1 bit is used to represent the sign, 11 bits are used to represent the exponent, and 12 bits are used to represent the mantissa. If the trained character recognition model is deployed directly, the network parameters of the first network module of the character recognition model are all 32-bit floating point data, so the storage of these parameters will take up more memory space. Based on this, the embodiment of the present application can quantize the network parameters of the first network module of the character recognition model into integer type parameters. Since the number of bits occupied by each quantized network parameter is much less than that of the original floating point data, the memory space occupied by the first network module of the character recognition model can be greatly reduced.
[0066] In one embodiment, the network parameters of the first network module may be converted from float32 type to int8 type for quantization processing. The quantization calculation formula of the network parameters is: Among them, round means rounding, clamp means limiting the range to between -128 and 127, S q represents the scaling factor, Z pIndicates zero point, D i represents the network parameters of the quantized input, D q Represents the network parameters of the quantized output.
[0067] Step 120, the quantized first network module and the second network module in the character recognition model are integrated to obtain a first character recognition model, and the second network module is used to perform feature prediction based on the feature map output by the first network module.
[0068] Optionally, in order to prevent the quantized first network module from affecting other network models, after obtaining the quantized first network module, an inverse quantization operation may be performed on the output result of the first network module to fuse the first network module and the second network module. Specifically, the quantized first network module and the second network module in the character recognition model are fused, including:
[0069] Dequantizing the output result of the quantized first network module according to a preset quantization range;
[0070] The output result of the inverse quantized first network module is fused with the second network module in the character recognition model.
[0071] As an example, for the first network module, due to its essential characteristics, it is still RNN (recurrent neural network), and its structure is as follows Figure 4 As shown, it can selectively remember the information at each moment, but the hidden layer output information at each moment is not only determined by the input at that moment, but also by the hidden layer output at the previous moment. Its expression formula is as follows:
[0072] O t =g(V·S t ), S t =f(U·X t +W·S t-1 ), during the entire training process, the same W is used at each moment, which has strong upper and lower correlation information. The use of quantization may cause the information of the entire upper and lower networks to be incoherent, which in turn leads to a more serious loss of precision, so it will not be quantized. In order to achieve the fusion of the first network module and the second network module, the final output result of the quantized first network module can be dequantized to obtain floating-point data to be fused with the second network module. Obviously, since the network parameters of the first network module are quantized as integers, the convolution calculation speed in the first network module can be accelerated. Although the dequantization calculation is introduced for the final output result of the first network module, on the whole, the amount of calculation of a large number of convolution calculations in the first network module is much greater than the amount of calculation of the dequantization calculation. Therefore, the method provided in the embodiment of the present application can ensure a certain precision effect of the first network module while its effect of accelerating the calculation is also more obvious.
[0073] The calculation formula for dequantization of the output result of the first network module is: o =(D q -Z p )*S q , where S q represents the scaling factor, Z p Indicates zero point, D q Denotes the dequantized input, D o Represents the dequantized output.
[0074] Optionally, in order to improve the prediction efficiency of the character recognition model, a structured pruning operation may be performed on the trained character recognition model to delete the probability distribution calculation node in the third network module in the character recognition model. Specifically, the method provided in the embodiment of the present application also includes:
[0075] Performing a structured pruning operation on the third network module in the character recognition model to delete the probability distribution calculation nodes in the third network module;
[0076] The third network module is used to convert the feature sequence predicted by the second network module into a label sequence.
[0077] As an example, since the post-processing process of Probability using the LogSoftmax function on the NPU does not support computational acceleration, the LogSoftmax function calculation can usually only be performed on the CPU. The post-processing LogSoftmax function of Probability only calculates the output probability and transcribes the output result into a labeled label. Among them, the LogSoftmax function can also normalize the input data of the input loss function when the model uses the back-propagation CTC Loss optimization cost function for training, thereby reducing the penalty for specific sample data. Compared with the traditional probability distribution Softmax function, the LogSoftmax function can effectively solve the problem of the BiLSTM layer outputting too large or too small data during the training process of the model, accelerate the convergence of the network model during training, and improve data stability. Among them, the calculation formula of LogSoftmax is as follows:
[0078]
[0079] Therefore, when the model prediction part contains more characters, the use of logarithmic and exponential operations will consume more time and computing resources. The image of the LogSoftmax function is as follows: Figure 5 As shown by Figure 5It can be seen that LogSoftmax(x) is a monotonic function, so the probability distribution of the LogSoftmax function can be used for constrained learning during model training. In the embodiment of the present application, during the inference stage, i.e., when the model is applied, structured pruning can be performed on the probability distribution calculation nodes in the third network module in the character recognition model. Structured pruning is a neural network pruning algorithm that reduces the size and amount of calculation of the model by pruning the weights or neurons in the neural network. This invention uses a pruning neuron method to achieve feature pruning. Removing the LogSoftmax function calculation can, on the one hand, avoid calculating the probability distribution of all categories and reduce the amount of calculation. On the other hand, directly selecting the index of the maximum value of Probability as the prediction result can effectively speed up the calculation speed during model prediction.
[0080] Optionally, the quantized first network module and the second network module in the character recognition model are fused to obtain a first character recognition model, including:
[0081] Fusing the quantized first network module and the second network module in the character recognition model to obtain a fused first network module and a fused second network module;
[0082] Based on the fused first network module and the second network module, and the structured pruned third network module, a first character recognition model is constructed.
[0083] Step 130 , training a first character recognition model based on a plurality of sample images and character annotation information of the plurality of sample images to obtain a target character recognition model, and performing deployment based on the target character recognition model.
[0084] It should be understood that after obtaining the first character recognition model, it is necessary to use training data, namely multiple sample images and character annotation information of the multiple sample images, to perform calibration training to obtain an optimized target character recognition model that can be deployed for reasoning.
[0085] In summary, based on the fused first network module and the second network module, and the third network module after structured pruning, a flowchart of the first character recognition model processing the target image is constructed as shown in Figure 6 As shown, it includes: S61, obtaining a target image; S62, normalizing the target image and inputting it into a target character recognition model; S63, extracting features of the target image through a quantized first network module; S64, performing inverse quantization processing on the features extracted by the first network module; S65, inputting the inverse quantized features into a second network module for feature prediction; S66, determining the maximum index in the feature sequence predicted by the second network module; S67, determining that the label corresponding to the maximum index is the character recognition result of the target image.
[0086] By adopting the method provided in the embodiment of the present application, the network parameters of the first network module used for feature extraction in the character recognition model can be quantized according to a preset quantization range, and the character recognition model is trained based on multiple sample images and character annotation information of multiple sample images; in order to enable the character recognition model to be used normally, the quantized first network module and the second network module in the character recognition model are fused to obtain the first character recognition model, and the second network module is used to predict features based on the feature map output by the first network module; finally, based on multiple sample images and character annotation information of multiple sample images, the first character recognition model is retrained to obtain the target character recognition model. Since the network parameters of the quantized first network module are changed from the original floating point data to integer data, the memory space required for the deployment model is effectively reduced, thereby reducing the storage and computing resources required for model deployment, which is conducive to the promotion and application of artificial intelligence models.
[0087] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 110 to 130 can be device A; for another example, the execution subject of steps 110 to 120 can be device A, and the execution subject of step 130 can be device B; and so on.
[0088] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 110, 120, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0089] Figure 7 A schematic diagram of a method for implementing character recognition provided for one or more embodiments of the present application includes:
[0090] Step 710: Acquire text box images in a plurality of target images to be identified and first indication information for the text box images, where the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images.
[0091] As an example, multiple target images to be identified can be obtained from industrial scenes. First, text box images containing lines of text in the images can be obtained from the multiple target images, and the text box images are marked with serial numbers, where the number of text box images contained is assumed to be L. In order to facilitate the subsequent association of the characters identified in each text box image with the target image corresponding to each text box image, thereby determining the characters at each text box position in each target image, the embodiment of the present application can determine the first indication information of each text box image, and the first indication information is used to indicate the mapping relationship between the text box image and the multiple target images.
[0092] Specifically, a {number (0: L), box position} mapping table can be established, which is used to indicate the box position of the i-th text box in the target image containing the i-th text box. It should be noted that L is much larger than the number of deployed target character recognition models.
[0093] Step 720: divide the text box images in the plurality of target images into a specified number of groups, where the number of text box images included in one group is a preset number.
[0094] As an example, based on the obtained L text box images, the L text box images are pre-processed and then packaged. The L text box images are packaged as follows: according to the memory limit of the ARM platform and the computing power of the convolutional neural network model under the limit of the NPU chip, the L text box images are grouped, and the number of each group is set to G, with a total of C groups. Among them, G is set according to the actual number of text lines and the size of available resources. Setting (Where div is the rounding operator, is the rounding up operator, C is greater than M), the remaining number is T, then T = L%G (% is the remainder operator, T≤G). The number of the first group of text box images obtained according to this packaging method is G, the number of the second group of text box images is G, ..., and the number of the Cth group of text box images is T. That is, the number of text box images in the first C-1 groups is G, and the number of text box images in the last group, i.e., the Cth group, is T.
[0095] Step 730, using target character recognition models deployed in multiple computing cores, characters in text box images in a specified number of groups are recognized in parallel based on the first indication information, and at least one target character recognition model is deployed in one computing core.
[0096] Among them, multiple computing cores are set in an embedded neural network processor. Specifically, M target character recognition models can be initialized on the ARM platform and allocated to a multi-core NPU (CORE1, CORE2, CORE3, a total of N computing cores). The target character recognition models are evenly loaded and allocated on each computing core to satisfy the relationship: M≥N. For example, when M = N, each computing core can be allocated a target character recognition model.
[0097] Optionally, based on the first indication information, the target character recognition models deployed in multiple computing cores are used to parallelly recognize characters in text box images in a specified number of groups, including:
[0098] Create multiple threads;
[0099] The target character recognition models deployed in multiple computing cores are respectively called through multiple threads to parallelly recognize characters in text box images in a specified number of groups based on the first indication information; among them, one thread calls one target character recognition model.
[0100] As an example, M threads can be initialized, and the number of threads can be the same as the number of target character recognition models. The L number of packets are split in sequence, with a total of C groups. As described above, the first C - 1 groups have a total of G packets, and the last group has T packets. Each group uses the thread i = C % M, (% represents the remainder, the same below), where i belongs to the index of the M threads, that is, the text box image in the jth group is processed by the j % Mth thread. The following combines Figure 8 The character recognition process provided by the embodiments of the present application is introduced in detail with the process in the actual scenario shown below. The character recognition process may include:
[0101] First, L text box images to be recognized are extracted from multiple target images, and a mapping table of {quantity (0:L), box position} is established. This mapping table is used to indicate the mapping relationship between the ith text box in the L text box images and the box position in the target image containing the ith text box. According to the above-mentioned packet method of the L text box images, the L text box images are divided into C groups. The number of text box images in the first C - 1 groups is G, and the number of text box images in the last group, that is, the Cth group, is T.
[0102] Then, preprocessing such as normalizing the size of the images in each of the G packets in the first C - 1 groups and the T packets in the last group can be performed. It should be noted that before preprocessing, since T≤G, when T < G, memory alignment can be used for supplementation, and the supplementation quantity is D = G - T, so that the number of text box images in each group is G.
[0103] Then determine the thread that needs to be called to process the preprocessed C group text box image, and the determined thread calls the target character recognition model in the computing kernel corresponding to the thread, and processes the preprocessed C group text box image in parallel to obtain C group character strings corresponding to the C group text box image, totaling L character strings. Specifically, the jth text box image in the C group text box is processed by the j%Mth thread among the M threads, that is, it is necessary to ensure that the jth text data of each group is allocated to the independent inference kernel corresponding to the respective thread at any time, and all kernels work together to process the C group text box to realize the parallel algorithm inference mechanism.
[0104] Next, the character recognition results of the M target character recognition models are obtained in turn, and the number of strings in the character recognition results is L'=C*G. A {number (0: L'), string} mapping table is established, and the mapping table is used to indicate the mapping relationship between the i-th string in the L' strings and the corresponding string content. Since the memory alignment operation is performed on the C group of text box images, L'≥L.
[0105] Finally, based on the {quantity (0: L), box position} mapping table and the {quantity (0: L'), string} mapping table, the recognized L' strings are restored in the text boxes at the corresponding positions of the target image as the final recognition results.
[0106] By adopting the character recognition method provided in the embodiment of the present application, it is possible to obtain text box images in multiple target images to be recognized and first indication information for the text box images, the first indication information being used to indicate the mapping relationship between the text box images and the multiple target images; and the text box images in the multiple target images are divided into a specified number of groups, and the number of text box images contained in a group is a preset number; finally, through the target character recognition models deployed in multiple computing cores, the characters in the text box images in the specified number of groups are recognized in parallel based on the first indication information, and at least one target character recognition model is deployed in a computing core. Since the characters in the multiple text box images are recognized in parallel by the multiple target character recognition models deployed in the multiple computing cores at the same time, the character recognition efficiency can be greatly improved, and at the same time, the security issues caused by thread preemption and the time consumption increased by locking can be effectively avoided.
[0107] Fig. 9 The structure diagram of a character recognition model reasoning deployment device 900 provided in an exemplary embodiment of the present application. Fig. 9 As shown, the device 900 includes: a parameter quantization module 910, a network fusion module 920 and a model training module 930, wherein:
[0108] A parameter quantization module 910, configured to quantize network parameters of a first network module for feature extraction in a character recognition model according to a preset quantization range; the character recognition model is trained based on a plurality of sample images and character annotation information of the plurality of sample images;
[0109] A network fusion module 920 is used to fuse the quantized first network module and the second network module in the character recognition model to obtain a first character recognition model, wherein the second network module is used to perform feature prediction based on the feature map output by the first network module;
[0110] The model training module 930 is used to train the first character recognition model based on the multiple sample images and the character annotation information of the multiple sample images to obtain a target character recognition model, and perform inference deployment based on the target character recognition model.
[0111] By using the device provided in the embodiment of the present application, the network parameters of the first network module used for feature extraction in the character recognition model can be quantized according to a preset quantization range, and the character recognition model is trained based on multiple sample images and character annotation information of multiple sample images; in order to enable the character recognition model to be used normally, the quantized first network module and the second network module in the character recognition model are fused to obtain the first character recognition model, and the second network module is used to predict features based on the feature map output by the first network module; finally, based on multiple sample images and character annotation information of multiple sample images, the first character recognition model is retrained to obtain the target character recognition model. Since the network parameters of the quantized first network module are changed from the original floating point data to integer data, the memory space required for the deployment model is effectively reduced, thereby reducing the storage and computing resources required for model deployment, which is conducive to the promotion and application of artificial intelligence models.
[0112] In some exemplary embodiments, the apparatus further includes a node deletion module, configured to:
[0113] Performing a structured pruning operation on the third network module in the character recognition model to delete the probability distribution calculation nodes in the third network module;
[0114] The third network module is used to convert the feature sequence predicted by the second network module into a label sequence.
[0115] In some exemplary embodiments, the network fusion module 820 fuses the quantized first network module and the second network module in the character recognition model to obtain the first character recognition model, specifically for:
[0116] Fusing the quantized first network module and the second network module in the character recognition model to obtain a fused first network module and a fused second network module;
[0117] The first character recognition model is constructed based on the fused first network module and the second network module, and the third network module after the structured pruning.
[0118] In some exemplary embodiments, when the network fusion module 820 fuses the quantized first network module and the second network module in the character recognition model, it is specifically used to:
[0119] Dequantizing the output result of the quantized first network module according to a preset quantization range;
[0120] The output result of the dequantized first network module is fused with the second network module in the character recognition model.
[0121] In some exemplary embodiments, the preset quantization range is a symmetric quantization range.
[0122] The character recognition model training device 900 can achieve Figure 1 to Figure 7 For details, please refer to Figure 1 to Figure 7 The inference deployment method of the character recognition model of the illustrated embodiment will not be described in detail.
[0123] Fig.10 FIG. 1 is a schematic diagram of a character recognition device 1000 provided in an exemplary embodiment of the present application. Fig.10 As shown, the device 1000 includes: an information acquisition module 1010, an image segmentation module 1020 and a character recognition module 1030, wherein:
[0124] An information acquisition module 1010 is used to acquire text box images in a plurality of target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images;
[0125] An image division module 1020, configured to divide the text box images in the plurality of target images into a specified number of groups, wherein the number of text box images included in one group is a preset number;
[0126] The character recognition module 1030 is used to recognize characters in the text box images in the specified number of groups in parallel based on the first indication information through target character recognition models deployed in multiple computing cores, and at least one of the target character recognition models is deployed in one of the computing cores.
[0127] Optionally, the multiple computing cores are arranged in an embedded neural network processor.
[0128] Optionally, when the character recognition module 1030 recognizes characters in the text box images in the specified number of groups in parallel based on the first indication information by using a target character recognition model deployed in a plurality of computing cores, it is specifically configured to:
[0129] Create multiple threads;
[0130] The target character recognition models deployed in the multiple computing cores are called respectively by the multiple threads, and the characters in the text box images in the specified number of groups are recognized in parallel based on the first indication information; wherein one thread calls one target character recognition model.
[0131] The character recognition device 1000 can realize Figure 8 For details, please refer to Figure 8 The character recognition method of the illustrated embodiment will not be described in detail.
[0132] Fig.11 The following is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. Fig.11 As shown, the device includes: a memory 111 and a processor 112 .
[0133] The memory 111 is used to store computer programs and can be configured to store various other data to support operations on the computing device. Examples of such data include instructions for any application or method operating on the computing device, contact data, phone book data, messages, pictures, videos, etc.
[0134] The processor 112 is coupled to the memory 111 and is configured to execute the computer program in the memory 111 to:
[0135] According to a preset quantization range, the network parameters of the first network module used for feature extraction in the character recognition model are quantized; the character recognition model is trained based on multiple sample images and character annotation information of the multiple sample images; the quantized first network module and the second network module in the character recognition model are merged to obtain a first character recognition model, and the second network module is used to perform feature prediction based on the feature map output by the first network module; based on the multiple sample images and the character annotation information of the multiple sample images, the first character recognition model is trained to obtain a target character recognition model, and inference deployment is performed based on the target character recognition model; or,
[0136] Acquire text box images in multiple target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and the box positions in the corresponding target images; divide the text box images in the multiple target images into a specified number of groups, wherein the number of text box images contained in one group is a preset number; and identify characters in the text box images in the specified number of groups in parallel based on the first indication information through target character recognition models deployed in multiple computing cores, wherein at least one of the target character recognition models is deployed in one computing core.
[0137] Further, if Fig.11 As shown, the electronic device also includes: a communication component 113, a display 114, a power component 115, an audio component 116 and other components. Fig.11 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.11 In addition, depending on the implementation form of the traffic playback device, Fig.11 The components in the dashed box are optional components, not mandatory components. For example, when the electronic device is implemented as a terminal device such as a smartphone, tablet computer or desktop computer, it may include Fig.11 Components in the dashed box; when the electronic device is implemented as a server-side device such as a conventional server, cloud server, data center or server array, it may not include Fig.11 Components within the dashed box.
[0138] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above method embodiment.
[0139] Accordingly, the embodiment of the present application further provides a computer program product, including a computer program / instruction, which can implement each step that can be performed by the electronic device in the above method embodiment when the computer program / instruction is executed. Optionally, the computer program product, in addition to executing each step in the above method embodiment.
[0140] Above Fig.11The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component may also include a near field communication (NFC) module, a radio frequency identification (RFID) technology, an infrared data association (IrDA) technology, an ultra-wideband (UWB) technology, a Bluetooth (BT) technology, etc.
[0141] Above Fig.11 The memory in can be implemented by any type of volatile or non-volatile storage device or a combination of them, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0142] Above Fig.11 The display in the embodiment includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0143] Above Fig.11 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0144] Above Fig.11 The audio component in can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0146] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0147] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0150] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0151] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0152] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0153] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0154] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for inference deployment of a character recognition model, characterized in that: include: quantizing the network parameters of the first network module for feature extraction in the character recognition model according to a preset quantization range; The character recognition model is trained based on multiple sample images and character annotation information of the multiple sample images; the character recognition model includes a first network module for performing convolution to extract feature parts, a second network module for performing feature sequence prediction parts, and a third network module for performing label probability distribution to label sequence parts; The quantized first network module and the second network module in the character recognition model are integrated to obtain a first character recognition model, wherein the second network module is used to perform feature prediction based on a feature map output by the first network module; Based on the multiple sample images and the character annotation information of the multiple sample images, the first character recognition model is trained to obtain a target character recognition model, and reasoning deployment is performed based on the target character recognition model.
2. The method according to claim 1, characterized in that The method further comprises: Performing a structured pruning operation on the third network module in the character recognition model to delete the probability distribution calculation nodes in the third network module; The third network module is used to convert the feature sequence predicted by the second network module into a label sequence.
3. The method according to claim 2, characterized in that The quantized first network module and the second network module in the character recognition model are integrated to obtain a first character recognition model, including: Fusing the quantized first network module and the second network module in the character recognition model to obtain a fused first network module and a fused second network module; The first character recognition model is constructed based on the fused first network module and the second network module, and the third network module after structured pruning.
4. The method according to any one of claims 1 to 3, characterized in that: The step of fusing the quantized first network module with the second network module in the character recognition model includes: Dequantizing the output result of the quantized first network module according to a preset quantization range; The output result of the dequantized first network module is fused with the second network module in the character recognition model.
5. The method according to claim 1, characterized in that The preset quantization range is an asymmetric quantization range of the int8 type.
6. A character recognition method, characterized in that: include: Acquire text box images in a plurality of target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images; Dividing the text box images in the plurality of target images into a specified number of groups, wherein the number of text box images included in one group is a preset number; By deploying target character recognition models in multiple computing cores, characters in text box images in the specified number of groups are recognized in parallel based on the first indication information, and at least one target character recognition model is deployed in one computing core, and the target character recognition model is inferred and deployed based on any one of the methods described in claims 1 to 5.
7. The method according to claim 6, characterized in that The multiple computing cores are arranged in an embedded neural network processor.
8. The method according to claim 6, characterized in that The step of recognizing characters in the text box images in the specified number of groups in parallel based on the first indication information by using the target character recognition model deployed in the plurality of computing cores includes: Create multiple threads; The target character recognition models deployed in the multiple computing cores are called respectively by the multiple threads, and the characters in the text box images in the specified number of groups are recognized in parallel based on the first indication information; wherein one thread calls one target character recognition model.
9. A character recognition model reasoning deployment device, characterized in that: include: A parameter quantization module, used to quantize the network parameters of the first network module used for feature extraction in the character recognition model according to a preset quantization range; The character recognition model is trained based on multiple sample images and character annotation information of the multiple sample images; the character recognition model includes a first network module for performing convolution to extract feature parts, a second network module for performing feature sequence prediction parts, and a third network module for performing label probability distribution to label sequence parts. A network fusion module, used for fusing the quantized first network module with the second network module in the character recognition model to obtain a first character recognition model, wherein the second network module is used for performing feature prediction based on a feature map output by the first network module; The model training module is used to train the first character recognition model based on the multiple sample images and the character annotation information of the multiple sample images to obtain a target character recognition model, and perform inference deployment based on the target character recognition model.
10. A character recognition device, characterized in that: include: An information acquisition module, used to acquire text box images from a plurality of target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and box positions in the corresponding target images; An image division module, used for dividing the text box images in the plurality of target images into a specified number of groups, wherein the number of text box images contained in one group is a preset number; A character recognition module, used to recognize characters in text box images in the specified number of groups in parallel based on the first indication information through target character recognition models deployed in multiple computing cores, at least one of the target character recognition models being deployed in one of the computing cores, and the target character recognition model being inferred and deployed based on any one of the methods described in claims 1 to 5.
11. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor, coupled to the memory, is configured to execute the computer program to: According to a preset quantization range, the network parameters of the first network module used for feature extraction in the character recognition model are quantized; the character recognition model is trained based on multiple sample images and character annotation information of the multiple sample images; the character recognition model includes a first network module for performing convolution to extract features, a second network module for performing feature sequence prediction, and a third network module for converting label probability distribution to label sequence; the quantized first network module and the second network module in the character recognition model are fused to obtain a first character recognition model, and the second network module is used to perform feature prediction based on the feature map output by the first network module; Based on the multiple sample images and the character annotation information of the multiple sample images, the first character recognition model is trained to obtain a target character recognition model, and reasoning deployment is performed based on the target character recognition model; or, Acquire text box images in multiple target images to be identified and first indication information for the text box images, wherein the first indication information is used to indicate a mapping relationship between the text box images and the box positions in the corresponding target images; divide the text box images in the multiple target images into a specified number of groups, wherein the number of text box images contained in one group is a preset number; and identify characters in the text box images in the specified number of groups in parallel based on the first indication information by means of target character recognition models deployed in multiple computing cores, wherein at least one target character recognition model is deployed in one computing core, and the target character recognition model is inferred and deployed based on any one of the methods described in claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 8 are implemented.
13. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Teaching content online coding method and system
CN110188745A
Text recognition method and device based on deep learning, equipment and storage medium
CN113569608A