Handwritten digit recognition method, device, electronic device and computer storage medium

By using the Leaky Softplus activation function in the AlexNet network structure, the MNIST data set is modelly trained, which solves the problem of inaccurate recognition caused by activation functions in the prior art, and realizes the accurate recognition of handwritten numbers and the stability of the model.

CN114444554BActive Publication Date: 2025-05-09CHINA MOBILE SHANGHAI ICT CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011194162.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-30
Publication Date
2025-05-09
Estimated Expiration
2040-10-30

AI Technical Summary

Technical Problem

Common activation functions in the prior art, such as Sigmoid, Softmax, ReLU and Tanh, have problems such as complex calculations, disappearance of gradients, too fast fitting and neuronal death, resulting in the inability to accurately identify handwritten numbers.

Method used

The improved AlexNet network structure is adopted, and the Leaky Softplus function is used as the activation function. The expression of this function is: f(x) = max(ax, x), where a is a preset parameter. By model training on the MNIST dataset, a handwritten numeric recognition model is obtained.

Benefits of technology

Accurate recognition of handwritten numbers is achieved, the possibility of gradient disappearance is reduced, neuronal death is avoided, and the stability and generalization ability of the model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114444554B_ABST
    Figure CN114444554B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and computer storage medium for handwritten digit recognition. The handwritten digit recognition method obtains a handwritten digit image to be recognized; inputs the handwritten digit image to be recognized into a preset handwritten digit recognition model, and outputs a recognition result; wherein the handwritten digit recognition model is obtained by training an improved AlexNet network structure using a training sample set, and the activation function of the improved AlexNet network structure is a Leaky Softplus function. According to the embodiment of the present application, handwritten digits can be accurately recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the financial field, and in particular relates to a handwritten digit recognition method, device, electronic device and computer storage medium. Background Art

[0002] In the financial field, handwriting numbers is a very common operation. Whether it is a customer handling business at a bank branch or a bank employee handling certain business at work, it is inevitable that handwritten numbers will be needed in many scenarios. Handwritten number recognition belongs to the field of image classification. The task of the image classification algorithm is to determine the category to which the image belongs. Images are often put into the neural network as the input of the model, so that the neural network can learn the characteristics of the image and then compare it.

[0003] The neural network model used in image classification tasks usually requires one or more activation functions to receive the nonlinear neuron output of the previous layer. Common activation functions are: (1) sigmoid (2) softmax (3) ReLU (4) Tanh. However, each of these activation functions has the following problems:

[0004] Sigmoid activation function: (1) The calculation is complex. (2) The output value of the function is not centered on 0. (3) Since the function value of the first-order derivative of the sigmoid activation function will quickly start from 0 and return to 0, the sigmoid activation function is prone to gradient vanishing. (4) The range is not wide enough.

[0005] Softmax activation function: (1) Softmax does not require intra-class compactness and inter-class separation, that is, the distinction between intra-class and inter-class features is not obvious.

[0006] ReLU activation function: (1) When the input is greater than 0, the calculation is fast, but the function curve is not smooth enough. (2) The function is fitted too quickly. (3) When the input is less than 0, the problem of neuron "death" may occur. That is, some neurons will never be activated. This may cause some features to never be learned.

[0007] Tanh activation function: (1) The calculation is complex. (2) When the input is too large, the gradient disappears, making the calculation slow.

[0008] Due to the above problems with these activation functions, handwritten digits cannot be accurately recognized.

[0009] Therefore, how to accurately recognize handwritten numbers is a technical problem that those skilled in the art need to solve urgently. Summary of the invention

[0010] The embodiments of the present application provide a handwritten digit recognition method, device, electronic device and computer storage medium, which can accurately recognize handwritten digits.

[0011] In a first aspect, an embodiment of the present application provides a handwritten digit recognition method, comprising:

[0012] Acquire a handwritten digital image to be recognized;

[0013] The handwritten digit image to be recognized is input into a preset handwritten digit recognition model, and the recognition result is output; wherein the handwritten digit recognition model is obtained by training the improved AlexNet network structure using the training sample set, and the activation function of the improved AlexNet network structure is the Leaky Softplus function, and the expression of the Leaky Softplus function is:

[0014]

[0015] Where a is a preset parameter.

[0016] Optionally, the training sample set is an MNIST data set. Before inputting the handwritten digit image to be recognized into a preset handwritten digit recognition model and outputting the recognition result, the method further includes:

[0017] The improved AlexNet network structure is trained using the MNIST data set to obtain a handwritten digit recognition model.

[0018] Optionally, the improved AlexNet network structure is trained using the MNIST dataset to obtain a handwritten digit recognition model, including:

[0019] Preprocess the MNIST dataset;

[0020] The preprocessed MNIST data set is used to train the improved AlexNet network structure to obtain a handwritten digit recognition model.

[0021] Optionally, preprocess the MNIST dataset, including:

[0022] Each sample image in the MNIST dataset is converted into pixels and labels respectively.

[0023] In a second aspect, an embodiment of the present application provides a handwritten digit recognition device, comprising:

[0024] An acquisition module, used for acquiring a handwritten digital image to be recognized;

[0025] The output module is used to input the handwritten digit image to be recognized into a preset handwritten digit recognition model and output the recognition result; wherein the handwritten digit recognition model is obtained by training the improved AlexNet network structure using the training sample set, and the activation function of the improved AlexNet network structure is the Leaky Softplus function, and the expression of the LeakySoftplus function is:

[0026]

[0027] Where a is a preset parameter.

[0028] Optionally, the training sample set is an MNIST data set, and the device further includes:

[0029] The model training module is used to use the MNIST data set to train the improved AlexNet network structure to obtain a handwritten digit recognition model.

[0030] Optional, model training module, including:

[0031] Preprocessing unit, used to preprocess the MNIST data set;

[0032] The model training unit is used to perform model training on the improved AlexNet network structure using the preprocessed MNIST data set to obtain a handwritten digit recognition model.

[0033] Optional, pre-processing unit, including:

[0034] The conversion subunit is used to convert pixels and labels of each sample image in the MNIST dataset.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;

[0036] When the processor executes the computer program instructions, the handwritten digit recognition method shown in the first aspect is implemented.

[0037] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the handwritten digit recognition method as shown in the first aspect is implemented.

[0038] The handwritten digit recognition method, device, electronic device and computer storage medium of the embodiment of the present application can accurately recognize handwritten digits. The handwritten digit recognition method inputs the handwritten digit image to be recognized into a preset handwritten digit recognition model. Since the handwritten digit recognition model is obtained by training the improved AlexNet network structure using the training sample set, and the activation function of the improved AlexNet network structure is the Leaky Softplus function, it can accurately recognize handwritten digits. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0040] Figure 1 It is a flowchart of a handwritten digit recognition method provided by an embodiment of the present application;

[0041] Figure 2 This is a schematic diagram of pixel and matrix splicing provided by an embodiment of the present application;

[0042] Figure 3 This is a schematic diagram of pixel matrix comparison provided by an embodiment of the present application;

[0043] Figure 4 is a flowchart of a handwritten digit recognition method provided by another embodiment of the present application;

[0044] Figure 5 This is a schematic diagram of the network layer structure of an improved AlexNet provided by an embodiment of the present application;

[0045] Figure 6 is a curve diagram of the Leaky Softplus activation function provided by an embodiment of the present application;

[0046] Figure 7 It is a curve diagram of the first-order derivative function of the Leaky Sotfplus activation function provided by an embodiment of the present application;

[0047] Figure 8 It is a structural schematic diagram of a handwritten digit recognition device provided by an embodiment of the present application;

[0048] Fig. 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0049] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0050] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0051] As can be seen from the background technology section, common activation functions in the prior art all have their own problems, resulting in the inability to accurately recognize handwritten numbers.

[0052] In order to solve the problems in the prior art, the embodiments of the present application provide a handwritten digit recognition method, device, electronic device and computer storage medium. The handwritten digit recognition method provided by the embodiments of the present application is first introduced below.

[0053] Figure 1 FIG. 1 is a flow chart of a handwritten digit recognition method provided by an embodiment of the present application. Figure 1 As shown, the handwritten digit recognition method may include:

[0054] S101, obtaining a handwritten digital image to be recognized.

[0055] S102, inputting the handwritten digit image to be recognized into a preset handwritten digit recognition model, and outputting the recognition result;

[0056] Among them, the handwritten digit recognition model is obtained by training the improved AlexNet network structure using the training sample set. The activation function of the improved AlexNet network structure is the Leaky Softplus function. The expression of the LeakySoftplus function is:

[0057]

[0058] Where a is a preset parameter.

[0059] In one embodiment, the training sample set is an MNIST data set. Before inputting the handwritten digit image to be recognized into a preset handwritten digit recognition model and outputting the recognition result, the method further includes:

[0060] The improved AlexNet network structure is trained using the MNIST data set to obtain a handwritten digit recognition model.

[0061] In one embodiment, the improved AlexNet network structure is trained using the MNIST data set to obtain a handwritten digit recognition model, including:

[0062] Preprocess the MNIST dataset;

[0063] The preprocessed MNIST data set is used to train the improved AlexNet network structure to obtain a handwritten digit recognition model.

[0064] In one embodiment, the MNIST dataset is preprocessed, including:

[0065] Each sample image in the MNIST dataset is converted into pixels and labels respectively.

[0066] The handwritten digit recognition method inputs a handwritten digit image to be recognized into a preset handwritten digit recognition model. Since the handwritten digit recognition model is obtained by training an improved AlexNet network structure using a training sample set, and the activation function of the improved AlexNet network structure is a Leaky Softplus function, the handwritten digit can be accurately recognized.

[0067] The above content is explained below with an example of a specific scenario.

[0068] For handwritten digit recognition in financial scenarios, the dataset used in this embodiment is the MNIST dataset, which is a standard handwritten dataset. The MNIST dataset comes from the National Institute of Standards and Technology (NIST). The training set consists of handwritten digits from 250 different people, 50% of whom are high school students and 50% are from the Census Bureau staff.

[0069] Considering the application of real scenarios, this embodiment does not use the MNIST test set, but uses real handwritten data of bank branch employees and customers. The test set is quite different from the training set, which can effectively observe the impact of the activation function on the generalization ability of the model.

[0070] First, preprocess the sample's handwritten digital image. The processing flow is as follows:

[0071] (1) Resize each image in the training set to a size of 227*227, that is, height*width.

[0072] (2) Perform feature extraction on the resized input image and construct the pixel matrix required for model input. The pixel matrix of each image is stretched to a 1-dimensional vector, that is, 227*227 is converted to 1*(227*227).

[0073] (3) Repeat steps (1) and (2) for each image.

[0074] For the label information of the input image, one-hot encoding conversion is performed to sparse the label information. The conversion process is as follows:

[0075] (4) The matrix width is the number of label types, and the matrix height is consistent with the number of images.

[0076] (5) The first picture corresponds to a row. The value of the corresponding label in the row is 1, and the rest of the values ​​are 0.

[0077] (6) Repeat step (5) for each image.

[0078] like Figure 2 As shown, the embodiment of the present application provides a schematic diagram of pixel and matrix splicing, Figure 2 Here M represents the number of input images, N represents the pixel length, that is, N=227*227, and Z represents the number of labels, that is, Z=10.

[0079] like Figure 3 As shown, the embodiment of the present application provides a schematic diagram of pixel matrix comparison, Figure 3 Shows the difference between the pixel matrix before and after one-hot processing.

[0080] After the input data is preprocessed, the input data is input into the AI ​​model network. The AI ​​model network used in this embodiment is AlexNet, which is an AI algorithm model that applies the basic principles of CNN to a very deep and wide network.

[0081] The overall process of the present invention is as follows Figure 4 As shown, Figure 4A split was made to AlexNet. The literal description of the entire process of Figure 4 is as follows: (1) Download the MNIST dataset and real data. (2) Construct the data reading. (3) Use the data as the input of the AlexNet neural network model algorithm. Among them, the operation of "AI algorithm model construction" only proceeds until the last "fully connected layer" of AlexNet and the "activation function" layer above it. (4) Replace the activation function with the Leaky Softplus function proposed by the present invention, and use the output of "AI algorithm model construction" as the input of the "activation function". (5) The fully connected layer stretches the output features into a 1D vector. (6) Calculate the loss. (7) The backpropagation mechanism uses the SGD optimizer for gradient descent to optimize the parameters. (8) Use real data for verification.

[0082] Among them, the network layer structure of the improved AlexNet is as Figure 5 shown. The activation functions at the end of the two branches of the original AlexNet are both replaced with the Leaky Softplus activation function proposed in this embodiment, and other layers remain unchanged.

[0083] The mathematical formula of the Leaky Softplus activation function is:

[0084]

[0085] The schematic curve diagram of the Leaky Softplus activation function is as Figure 6 shown. The advantages of this activation function are that for the positive half-axis of the x-axis, it retains the characteristics of softplus, the function curve has a smooth transition. Compared with the ReLU activation function, the value of the LeakySoftplus activation function rises faster and is not prone to gradient explosion. At the same time, when the function value on the positive half-axis of the x-axis rises to a place where the gradient is prone to disappear, the neuron is directly turned off. For the negative half-axis of the x-axis, the value range of the Leaky Softplus activation function can take y < 0. The parameter a means that the learning parameter can be adjusted, that is, the Leaky Softplus activation function is not prone to the situation of neuron death like the ReLU activation function, and the wider value range can make the relative non-linear input mapping wider.

[0086] The adjustable parameter a has more flexibility and can be adjusted when the handwritten digit recognition effect is not good. When x < 0, the activation function with curvature will make the whole model more stable and will not make the accuracy of handwritten digit recognition stuck in a certain interval, unless it has indeed been trained to a very high accuracy. When 0 < x < 2, the relatively smooth curve can make the output value distribution of the model more uniform and increase the stability of handwritten digit recognition.

[0087] The first-order derivative function is more effective in observing whether the activation function is prone to gradient explosion or gradient disappearance. The first-order derivative function of the LeakySotfplus activation function is as follows Figure 7 As shown, the mathematical formula of the first-order derivative function of the Leaky Softplus activation function is:

[0088]

[0089] This activation function does not have the problem of gradient explosion. In the part where x>0, when the model is trained too deeply, there is a certain possibility that the gradient will vanish. The reason why the function is segmented on the positive semi-axis is that x=2 is the point where the function gradient tends to vanish.

[0090] Reducing the impact of gradient vanishing on the entire AI model can avoid the problem of handwritten digit recognition accuracy decreasing instead of increasing during the later training process, which is helpful to improve the accuracy of handwritten digit recognition.

[0091] As for the verification of convergence, this embodiment is verified on the AlexNet neural network model mentioned above, and the convergence is verified by replacing the activation function of the activation layer above the fully connected layer of AlexNet.

[0092] The activation function is based on Figure 5 After practice, it was confirmed that convergence was possible and the accuracy rate was steadily improved. The improvement in accuracy was not a rapid and large increase, but a small and steady increase, which enabled the activation function to be trained in deeper neural network models and reduced the risk of overfitting to a certain extent.

[0093] In general, this embodiment has a better improvement in the generalization ability of the model. In the handwritten number scenario in the financial industry, when the model is trained for handwritten numbers, the process is relatively more stable and more universal, and the recognition of numbers is more accurate.

[0094] Figure 8 : is a schematic diagram of the structure of a handwritten digit recognition device provided by an embodiment of the present application, and the handwritten digit recognition device may include:

[0095] An acquisition module 801 is used to acquire a handwritten digital image to be recognized;

[0096] The output module 802 is used to input the handwritten digit image to be recognized into a preset handwritten digit recognition model and output the recognition result; wherein the handwritten digit recognition model is obtained by training the improved AlexNet network structure using the training sample set, and the activation function of the improved AlexNet network structure is the Leaky Softplus function, and the expression of the LeakySoftplus function is:

[0097]

[0098] Where a is a preset parameter.

[0099] In one embodiment, the training sample set is an MNIST data set, and the device further includes: a model training module, which is used to perform model training on the improved AlexNet network structure using the MNIST data set to obtain a handwritten digit recognition model.

[0100] In one embodiment, the model training module includes: a preprocessing unit for preprocessing the MNIST data set; a model training unit for performing model training on the improved AlexNet network structure using the preprocessed MNIST data set to obtain a handwritten digit recognition model.

[0101] In one embodiment, the preprocessing unit includes: a conversion subunit, which is used to convert pixels and labels of each sample image in the MNIST data set.

[0102] Figure 8 Each module / unit in the device shown has the function of realizing Figure 1 The functions of each step in the process can achieve the corresponding technical effects, which will not be described in detail here for the sake of brevity.

[0103] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown.

[0104] The electronic device may include a processor 901 and a memory 902 storing computer program instructions.

[0105] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0106] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the electronic device. In a particular embodiment, the memory 902 may be a non-volatile solid-state memory.

[0107] In one example, the memory 902 may be a read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0108] The processor 901 implements any one of the handwritten digit recognition methods in the above embodiments by reading and executing the computer program instructions stored in the memory 902 .

[0109] In one example, the electronic device may further include a communication interface 903 and a bus 910. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 910 and communicate with each other.

[0110] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0111] Bus 910 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 910 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0112] In addition, the embodiments of the present application may be implemented by providing a computer storage medium having computer program instructions stored thereon; when the computer program instructions are executed by a processor, any one of the handwritten digit recognition methods in the above embodiments is implemented.

[0113] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0114] The functional modules shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0115] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0116] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0117] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A handwritten digit recognition method, characterized in that: include: Acquire a handwritten digital image to be recognized; The handwritten digit image to be recognized is input into a preset handwritten digit recognition model, and a recognition result is output; wherein the handwritten digit recognition model is obtained by training the improved AlexNet network structure using a training sample set, the training sample set is an MNIST data set, and the improved AlexNet network structure is obtained by improving the Alexnet network structure using a LeakySoftplus activation function, and the expression of the Leaky Softplus activation function is: Where a is a preset parameter.

2. The handwritten digit recognition method according to claim 1, characterized in that: The method of using the MNIST data set to perform model training on the improved AlexNet network structure to obtain the handwritten digit recognition model includes: Preprocessing the MNIST data set; The improved AlexNet network structure is trained using the preprocessed MNIST data set to obtain the handwritten digit recognition model.

3. The handwritten digit recognition method according to claim 2, characterized in that: The preprocessing of the MNIST data set includes: Each sample image in the MNIST dataset is converted into pixels and labels.

4. A handwritten digit recognition device, characterized in that: include: An acquisition module, used for acquiring a handwritten digital image to be recognized; An output module, used for inputting the handwritten digit image to be recognized into a preset handwritten digit recognition model and outputting a recognition result; The model training module is used to perform model training on the improved AlexNet network structure using the training sample set to obtain a handwritten digit recognition model. The training sample set is the MNIST data set. The improved AlexNet network structure is obtained by improving the Alexnet network structure using the Leaky Softplus activation function. The expression of the LeakySoftplus activation function is: Where a is a preset parameter.

5. The handwritten digit recognition device according to claim 4, characterized in that: The model training module includes: A preprocessing unit, used for preprocessing the MNIST data set; The model training unit is used to perform model training on the improved AlexNet network structure using the preprocessed MNIST data set to obtain the handwritten digit recognition model.

6. The handwritten digit recognition device according to claim 5, characterized in that: The pre-processing unit comprises: The conversion subunit is used to convert pixels and labels of each sample image in the MNIST data set.

7. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the handwritten digit recognition method as described in any one of claims 1-3 is implemented.

8. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the handwritten digit recognition method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Handwritten model training method and apparatus, handwritten image recognition method and apparatus, and device and medium

    WO2019232843A1

  • Image classification using neural networks

    WO2019238976A1