# Automatic Recognition Method of Letter Images in English Self-Learning Based on Partial Differential Equation Method

Authors: Yu Zhao; Shuping Du; Ran Li; Hong Yue
Journal: Advances in Mathematical Physics
 (2021)

---

## Abstract

According to the current situation of knowledge popularization, students simply rely on the knowledge learned in the classroom that is far from adapting to the development of modern society; so, every student needs to have the consciousness and ability of independent learning. The research of the English self-help learning system based on partial differential equation method comes into being with information network technology as the foundation for survival and development. The existing partial differential equation recognition models based on average curvature motion are all edge-based and need to use the external force defined by the image gradient to attract the zero level set (evolution curve) to move to the target edge and finally stay on the target edge. Therefore, it is difficult to obtain ideal results when extracting fuzzy or discrete boundaries (perceptual boundaries), and it is very sensitive to the selection of initial contour and noise. To solve this problem, this paper proposes a new recognition model of partial differential equations based on mean curvature motion. This overcomes some defects of existing edge models because it is region-based and does not require image gradient as a condition to stop evolution. The proposed model can avoid manual initial curve selection and allow stopping conditions to be set in the algorithm. In addition, in the numerical solution of partial differential equations, the existing model uses upwind difference scheme, and the semi-implicit additive operator separation method is adopted in this paper. Some other layers are added, and some hyperparameters are adjusted when the convolutional neural networks of inception PDEs are constructed by stacking the structure of inception PDEs. In the contrast experiment with the prototype, the software and hardware environment are the same, and the input is exactly the same. For the handwritten English alphabet data set, the variant structure can obtain more than 90% of the training accuracy and verification accuracy, which is better than the experimental accuracy of the prototype. In addition, because the inception PDE structure contains fewer parameters than the prototype, it is more computationally efficient and takes less training time per batch than the prototype.


---

## Body

## 1. Introduction

English teachers can easily obtain the latest materials needed for teaching and various teaching-related tutoring materials through the Internet [1]. After processing and sorting, they are compiled into web pages and put on the English website built by themselves. Students can overcome the limitations of time and space, use the Internet to obtain materials and information related to classroom teaching content, or browse according to your own hobbies. Today, when we emphasize quality education, it is particularly important to build and use English websites to create a positive, active, and autonomous learning environment and atmosphere for students [2–4]. For English teachers, building and using English websites are not only convenient for their own teaching but they can also use English websites to publish information, exchange teaching experience, conduct cooperative research, and exchange academic results across the country and even the world [5, 6]. English teachers can organize academic discussion activities, hold English teaching seminars, and promote the latest teaching results through online discussion groups on the Internet, so that more English colleagues and English learners can benefit. We can also put our excellent teaching plan and courseware on our website to share with our English counterparts to expand our influence.Through the study of the English self-learning system based on the partial differential equation method, it can provide English learners with a learning environment suitable for students to learn—a constructive learning environment [7, 8]. In this environment, students’ initiative can often be fully reflected, it provides more opportunities for students to learn and apply the knowledge they have learned in different situations, and students can also give feedback according to their own learning situation, so as to facilitate better problem solving and improve online teaching quality. Due to the separate establishment of the materials of each existing network teaching system, the lack of sharing, security, and information updates speed of the teaching system, and the fact that the administrator is the main body, the existing English learning system cannot really satisfy the users. Therefore, the English self-learning system based on the partial differential equation method should make full use of the campus network of various universities, so as to achieve the purpose of centralized management, decentralized operation, and high information sharing of teaching information [9]. At the same time, it can also promote the development of traditional teaching management towards digitalization, intelligence, paperlessness, and integration [10–12].We propose a two-term segmentation implicit active contour model based on average curvature motion. The model is only based on regions and does not require image gradients as a condition to stop the evolution. The proposed model can avoid manual initial curve selection. It allows setting stop conditions in the algorithm. In terms of numerically solving partial differential equations, the existing model adopts the upwind difference scheme, which can also effectively use the semi-implicit additive operator separation method. This paper analyzes and compares the experimental data graphs one by one, showing the feasibility of multibranch structure for multiangle and multilevel feature extraction and merging. It is proved that in the case of limited resources in ordinary computing equipment, the branch structure has better results and higher accuracy than the linear structure; the partial differential equation convolutional neural network with the improved structure can guarantee to obtain and has the partial differential of the original inception structure. The equation convolutional neural network has the same and better experimental accuracy and because fewer calculation parameters are used, the improved structure of the inception partial differential equation structure can reduce the calculation time and speed up the training. However, only through data enhancement on a small data set cannot achieve such a good experimental effect as using a large data set.


## 2. Related Work

Although partial differential equations have achieved incomparable effects in many image processing fields, in fact, it is still difficult to select appropriate partial differential equations for specific problems in image processing [13]. Directly designing partial differential equations has a deep understanding of image changes and a full understanding of physical processes; the construction of energy functionals requires a full knowledge and understanding of the problem. In response to the above problems, related scholars have proposed a partial differential equation learning model, that is, the form of learning partial differential equations through given training data, which has been successfully applied to a variety of tasks in image processing and computer vision, and have developed the application of partial differential equations in images [14, 15].By introducing the “learning” idea in machine learning into the field of differential equation image processing, a theoretical framework is proposed to solve problems in image processing by learning specific partial differential equations through training data [16]. First, they use the rotation and translation basic differential invariants as the basis functions to construct a unified intelligent differential equation system and then use the optimal control theory training with differential equation constraints to obtain the specific partial differential equation form. These differential basic invariants are derived from some experiences in image processing and mathematics.In the study of nonlinear evolution equations, the use of differential invariants to study the properties of partial differential equations is a very effective method [17]. Invariant theory is a branch of abstract algebra. This theory studies the effect of groups on algebraic clusters from the perspective of the influence of groups on functions. Differential invariants are scalar differential functions that remain constant under the action of group continuation. Differential invariants, as an important category in invariant theory, play a huge role in both mathematical theory and practical functions. These application fields include geometric structure equivalence problems, classification and invariant variational problems of invariant differential equations, integrability problems of differential equations, equivalence and symmetry of solutions, and the construction of special solutions of partial differential equations [18].For the problem of deformed text recognition, related scholars have proposed a multi-objective rectification attention network MORAN for bending text recognition in natural scenes, which is composed of a bending correction network MORN and a recognition network ASRN [19]. The training results show that although the model can handle some deformed photos, the recognition effect is not good for images with a too large bending angle. It can only recognize text that is bent in the vertical direction, and the training is difficult. In order to solve the problem of label confusion that is easy to be overlooked when using the quadrilateral bounding box to locate the scene text, related scholars have proposed a new method [20]. By discretizing the bounding box into the key edge KE, more effective methods can be derived to improve the detection performance. However, since most of the scene text can be positioned with a quadrilateral bounding box, this method may cause problems such as too long training time and too complicated training process.Related scholars have proposed a text recognition algorithm based on attention mechanism and connection time classification loss to solve the problem of English letter segmentation and recognition accuracy that depends on the dictionary in text recognition in natural scenes [21, 22]. This algorithm avoids additional alignment preprocessing and subsequent grammatical processing for tags and significantly improves the text recognition rate while accelerating the training convergence speed. Experiments show that the algorithm is robust to text images with fuzzy fonts and complex backgrounds. There is still room for improvement, such as improving the partial differential equation convolutional neural network architecture to obtain stronger feature extraction capabilities and adding an overfitting mechanism to improve the generalization ability of the network [23–25].


## 3. English Letter Preprocessing Technology

### 3.1. Eliminate Interference

In actual images, the presence of interference is inevitable. For example, in the acquisition of postal codes, the background color of the envelope itself and the positioning red frame make the obtained image not just the number itself. Although disturbances are usually only a small part, they pose a great threat to normalization: this method will not accurately determine the outer border of the word. Once there is a large deviation in the normalization, the recognition result is very likely to be wrong. Therefore, it is necessary to introduce interference cancellation algorithms in the processing. The general requirement for image noise removal is to try to remove noise without affecting the image of English letters.(1)
Neighborhood smoothing method. It uses the average gray value of a certain pixel and its neighboring pixels as the gray value of the center pixel. This method is simple but has obvious shortcomings. It makes the image boundary blur(2)
Boundary smoothing method. It takes a certain pixel as the center point of the square neighborhood and then selects a number of templates, calculates the variance of the gray levels of the pixels contained in each template, and calculates the average value of the gray levels of the pixels contained in the template with the smallest variance. This method cannot only achieve the purpose of denoising but also save the boundary at the same time, but the amount of calculation is huge(3)
Median filtering algorithm. The idea of median filtering algorithm is to first determine a neighborhood with a certain pixel as the center point, which is generally a square neighborhood and then sort the gray value of each pixel in the neighborhood. The middle value is taken as the new value of the gray level of the pixel at the center point. The neighborhood here can generally be called a window. When the window moves up, down, left, and right in the image, the median filter algorithm can be used to denoise the image and make the image smootherThe recognition confidence analysis is introduced into the preprocessing, as shown in Figure1.Figure 1
The interference removal process of confidence analysis.


### 3.2. English Letter Segmentation

English letter recognition is mainly carried out on the basis of English letter segmentation. The English letter segmentation after extracting the English letter area to be recognized and denoising is to locate and find the single English letter to be recognized and delimit each English letter to be recognized. The English letters to be recognized are segmented to facilitate the recognition of individual English letters. The correctness of English letter segmentation is directly related to the accuracy of English letter recognition. However, due to the randomness of English alphabet writing, it is quite difficult to perform accurate English alphabet segmentation.The main situations where handwritten English letters are difficult to segment are the adhesion and overlap between English letters. The so-called adhesion means that the outlines of two English letters touch at one or several points. If the adhesion position can be found, a straight line or a straight line segment can be used to completely separate the two English letters. Overlapping means that two English letters do not touch and belong to different connected areas, but their vertical projections overlap. In this case, two English letters cannot be completely separated by a straight line. Overlapping means that two adjacent English letters not only meet in outline but also share a certain part of the pixel area. This situation is more complicated to deal with, but it is not common. In addition, if the left and right parts of an English letter are divided too far or the strokes inside the English letter are broken, it is easy to be divided into two or more English letters during segmentation, resulting in segmentation errors.Since it is difficult to use a single segmentation method to perfectly deal with the overlap, adhesion, and overlap between English letters while segmenting the English letters, people now generally use multistep segmentation. The projection method is the most commonly used traditional English letter segmentation method, which has the advantages of fast speed and simple implementation. For the area to be recognized, if there are multiple rows and multiple columns of English letters, firstly project the row (x axis) and column (y axis) directions of the image dot matrix area, so that the horizontal and vertical projection images can be obtained, respectively. In the projected image, the dot matrix area of English letters presents wave crests on the histogram, while the gaps between English letters present wave troughs on the histogram. Under normal circumstances, there are only individual adhesions between characters, so there is less thickness in the projection direction perpendicular to the character string, so a certain threshold can be set, and the position with the local minimum projection and the thickness less than the threshold is taken as candidate segmentation point. The segmentation effect of 26 uppercase and lowercase English letters is shown in Figure 2.Figure 2
26 uppercase and lowercase English letter segmentation effects. (a) 26 uppercase and lowercase English letter samples. (b) Grayscale processing. (c) Image enhancement. (d) Image segmentation. (e) Morphological processing.
(a)(b)(c)(d)(e)


### 3.3. Tilt Correction

Usually because the position of the image is inclined when the scanned image is collected or when people handwriting letters often have different inclination angles, if the inclination correction is not performed, the images of the same glyph under different inclination angles will be reflected as different templates. It is bound to increase the training burden and reduce the recognition rate. In order to reduce the influence of this factor, an oblique correction is adopted to align the upper and lower horizontal positions of the corrected characters. There are mainly two types of image tilt: horizontal tilt and vertical tilt. Because the tilt in the vertical direction is not very obvious, usually in the actual system, geometric correction is performed on the tilt of the English letters in the horizontal direction. To correct the image, you need to determine the horizontal tilt angle of the image, or roughly determine the coordinates of the four vertices of the image, and find the four edge lines of the numbered English letter group.


#### 3.3.1. Center of the Gravity Method

This method finds the center of gravity of each column of the binary image and then uses the least square method to connect all the center of gravity points into a straight line. The inclination angle of this straight line is the inclination angle of the image. The method can be briefly described as follows: (l) set the target pixel value to 1 and the background pixel value to O; then, a column of images is composed of a number of alternating consecutive 1 s and consecutive 0 s, among which consecutive 1 s are the target pixel segments. Consider each target pixel segment as a mass point, the length of the pixel segment as the weight of the mass point, and the ordinate of the midpoint of the pixel segment as the one-dimensional coordinate of the mass point; (2) calculate the center of gravity of each column; (3) connect the center of gravity of each column into a straight line, and the slope of this straight line reflects the inclination of the image. The disadvantage of this method is that it is more severely interfered by noise, and for some English letters, the center of gravity of each column does not reflect the center of the ordinate of the English letter. It is easy to cause the center of gravity of each column to jump up and down, and it is difficult to connect to a straight line.


#### 3.3.2. Hough Transform

Nowadays, the general algorithm for detecting the inclination angle of an image is Hough transform, which is a method that uses image characteristics to connect edge pixels to form a closed boundary of a region. The realization of this method is based on the existence of straight lines in the image area. Since the upper and lower borders of the image are a pair of parallel lines, they are generally transformed into an approximate straight line during the binarization process. Use Hough transform to find this straight line and find the slope through the information of this straight line. The magnitude of the slope is the angle between this straight line and the horizontal line.The advantage of using the Hough transform to find the tilt angle is that it is less affected by noise and curve discontinuity. While calculating the tilt angle, the effect of extracting the four borders of the image is achieved. This is extremely beneficial for the next step of English letter segmentation, but this method also has disadvantages. First of all, it is not easy to find the starting point of the Hough transform, that is, the inflection point of the image edge; secondly, the complexity of the algorithm is relatively large, and the process of detecting straight lines is relatively time-consuming; finally, the accuracy cannot be guaranteed. Due to the influence of binarization, it cannot ensure that the values of all edge parts after binarization are the same; so, the accuracy of the straight line after the Hough transform is also questionable. The characteristics of the letters are shown in Table1.Table 1
Characteristic description of letters.
Data characteristicsFeature descriptionLegendre momentBefore extracting features, simply normalize the image matrix. Based on BP neural network letter recognition, each sample is represented by a 121-dimensional feature vector.Pseudo-Zernike momentThe preprocessing process is the same as Legendre, calculated to 9th orderPseudo-Zernike momentThe preprocessing process is the same as that of Legendre. After calculating to the 8th order, a 36-dimensional feature vector is used to represent each sample.Fourier transformExtract from the upper left, upper right, lower left, and lower right of the character image matrix to obtain a 32-dimensional feature vector of the low-frequency region of the image matrix.Primitive feature extractionCombine each sample with 7 primitives to generate a 7-dimensional feature vector.Edge feature extractionBefore extracting features, the image is refined into a skeleton image.


## 3.1. Eliminate Interference

In actual images, the presence of interference is inevitable. For example, in the acquisition of postal codes, the background color of the envelope itself and the positioning red frame make the obtained image not just the number itself. Although disturbances are usually only a small part, they pose a great threat to normalization: this method will not accurately determine the outer border of the word. Once there is a large deviation in the normalization, the recognition result is very likely to be wrong. Therefore, it is necessary to introduce interference cancellation algorithms in the processing. The general requirement for image noise removal is to try to remove noise without affecting the image of English letters.(1)
Neighborhood smoothing method. It uses the average gray value of a certain pixel and its neighboring pixels as the gray value of the center pixel. This method is simple but has obvious shortcomings. It makes the image boundary blur(2)
Boundary smoothing method. It takes a certain pixel as the center point of the square neighborhood and then selects a number of templates, calculates the variance of the gray levels of the pixels contained in each template, and calculates the average value of the gray levels of the pixels contained in the template with the smallest variance. This method cannot only achieve the purpose of denoising but also save the boundary at the same time, but the amount of calculation is huge(3)
Median filtering algorithm. The idea of median filtering algorithm is to first determine a neighborhood with a certain pixel as the center point, which is generally a square neighborhood and then sort the gray value of each pixel in the neighborhood. The middle value is taken as the new value of the gray level of the pixel at the center point. The neighborhood here can generally be called a window. When the window moves up, down, left, and right in the image, the median filter algorithm can be used to denoise the image and make the image smootherThe recognition confidence analysis is introduced into the preprocessing, as shown in Figure1.Figure 1
The interference removal process of confidence analysis.


## 3.2. English Letter Segmentation

English letter recognition is mainly carried out on the basis of English letter segmentation. The English letter segmentation after extracting the English letter area to be recognized and denoising is to locate and find the single English letter to be recognized and delimit each English letter to be recognized. The English letters to be recognized are segmented to facilitate the recognition of individual English letters. The correctness of English letter segmentation is directly related to the accuracy of English letter recognition. However, due to the randomness of English alphabet writing, it is quite difficult to perform accurate English alphabet segmentation.The main situations where handwritten English letters are difficult to segment are the adhesion and overlap between English letters. The so-called adhesion means that the outlines of two English letters touch at one or several points. If the adhesion position can be found, a straight line or a straight line segment can be used to completely separate the two English letters. Overlapping means that two English letters do not touch and belong to different connected areas, but their vertical projections overlap. In this case, two English letters cannot be completely separated by a straight line. Overlapping means that two adjacent English letters not only meet in outline but also share a certain part of the pixel area. This situation is more complicated to deal with, but it is not common. In addition, if the left and right parts of an English letter are divided too far or the strokes inside the English letter are broken, it is easy to be divided into two or more English letters during segmentation, resulting in segmentation errors.Since it is difficult to use a single segmentation method to perfectly deal with the overlap, adhesion, and overlap between English letters while segmenting the English letters, people now generally use multistep segmentation. The projection method is the most commonly used traditional English letter segmentation method, which has the advantages of fast speed and simple implementation. For the area to be recognized, if there are multiple rows and multiple columns of English letters, firstly project the row (x axis) and column (y axis) directions of the image dot matrix area, so that the horizontal and vertical projection images can be obtained, respectively. In the projected image, the dot matrix area of English letters presents wave crests on the histogram, while the gaps between English letters present wave troughs on the histogram. Under normal circumstances, there are only individual adhesions between characters, so there is less thickness in the projection direction perpendicular to the character string, so a certain threshold can be set, and the position with the local minimum projection and the thickness less than the threshold is taken as candidate segmentation point. The segmentation effect of 26 uppercase and lowercase English letters is shown in Figure 2.Figure 2
26 uppercase and lowercase English letter segmentation effects. (a) 26 uppercase and lowercase English letter samples. (b) Grayscale processing. (c) Image enhancement. (d) Image segmentation. (e) Morphological processing.
(a)(b)(c)(d)(e)


## 3.3. Tilt Correction

Usually because the position of the image is inclined when the scanned image is collected or when people handwriting letters often have different inclination angles, if the inclination correction is not performed, the images of the same glyph under different inclination angles will be reflected as different templates. It is bound to increase the training burden and reduce the recognition rate. In order to reduce the influence of this factor, an oblique correction is adopted to align the upper and lower horizontal positions of the corrected characters. There are mainly two types of image tilt: horizontal tilt and vertical tilt. Because the tilt in the vertical direction is not very obvious, usually in the actual system, geometric correction is performed on the tilt of the English letters in the horizontal direction. To correct the image, you need to determine the horizontal tilt angle of the image, or roughly determine the coordinates of the four vertices of the image, and find the four edge lines of the numbered English letter group.


### 3.3.1. Center of the Gravity Method

This method finds the center of gravity of each column of the binary image and then uses the least square method to connect all the center of gravity points into a straight line. The inclination angle of this straight line is the inclination angle of the image. The method can be briefly described as follows: (l) set the target pixel value to 1 and the background pixel value to O; then, a column of images is composed of a number of alternating consecutive 1 s and consecutive 0 s, among which consecutive 1 s are the target pixel segments. Consider each target pixel segment as a mass point, the length of the pixel segment as the weight of the mass point, and the ordinate of the midpoint of the pixel segment as the one-dimensional coordinate of the mass point; (2) calculate the center of gravity of each column; (3) connect the center of gravity of each column into a straight line, and the slope of this straight line reflects the inclination of the image. The disadvantage of this method is that it is more severely interfered by noise, and for some English letters, the center of gravity of each column does not reflect the center of the ordinate of the English letter. It is easy to cause the center of gravity of each column to jump up and down, and it is difficult to connect to a straight line.


### 3.3.2. Hough Transform

Nowadays, the general algorithm for detecting the inclination angle of an image is Hough transform, which is a method that uses image characteristics to connect edge pixels to form a closed boundary of a region. The realization of this method is based on the existence of straight lines in the image area. Since the upper and lower borders of the image are a pair of parallel lines, they are generally transformed into an approximate straight line during the binarization process. Use Hough transform to find this straight line and find the slope through the information of this straight line. The magnitude of the slope is the angle between this straight line and the horizontal line.The advantage of using the Hough transform to find the tilt angle is that it is less affected by noise and curve discontinuity. While calculating the tilt angle, the effect of extracting the four borders of the image is achieved. This is extremely beneficial for the next step of English letter segmentation, but this method also has disadvantages. First of all, it is not easy to find the starting point of the Hough transform, that is, the inflection point of the image edge; secondly, the complexity of the algorithm is relatively large, and the process of detecting straight lines is relatively time-consuming; finally, the accuracy cannot be guaranteed. Due to the influence of binarization, it cannot ensure that the values of all edge parts after binarization are the same; so, the accuracy of the straight line after the Hough transform is also questionable. The characteristics of the letters are shown in Table1.Table 1
Characteristic description of letters.
Data characteristicsFeature descriptionLegendre momentBefore extracting features, simply normalize the image matrix. Based on BP neural network letter recognition, each sample is represented by a 121-dimensional feature vector.Pseudo-Zernike momentThe preprocessing process is the same as Legendre, calculated to 9th orderPseudo-Zernike momentThe preprocessing process is the same as that of Legendre. After calculating to the 8th order, a 36-dimensional feature vector is used to represent each sample.Fourier transformExtract from the upper left, upper right, lower left, and lower right of the character image matrix to obtain a 32-dimensional feature vector of the low-frequency region of the image matrix.Primitive feature extractionCombine each sample with 7 primitives to generate a 7-dimensional feature vector.Edge feature extractionBefore extracting features, the image is refined into a skeleton image.


## 3.3.1. Center of the Gravity Method

This method finds the center of gravity of each column of the binary image and then uses the least square method to connect all the center of gravity points into a straight line. The inclination angle of this straight line is the inclination angle of the image. The method can be briefly described as follows: (l) set the target pixel value to 1 and the background pixel value to O; then, a column of images is composed of a number of alternating consecutive 1 s and consecutive 0 s, among which consecutive 1 s are the target pixel segments. Consider each target pixel segment as a mass point, the length of the pixel segment as the weight of the mass point, and the ordinate of the midpoint of the pixel segment as the one-dimensional coordinate of the mass point; (2) calculate the center of gravity of each column; (3) connect the center of gravity of each column into a straight line, and the slope of this straight line reflects the inclination of the image. The disadvantage of this method is that it is more severely interfered by noise, and for some English letters, the center of gravity of each column does not reflect the center of the ordinate of the English letter. It is easy to cause the center of gravity of each column to jump up and down, and it is difficult to connect to a straight line.


## 3.3.2. Hough Transform

Nowadays, the general algorithm for detecting the inclination angle of an image is Hough transform, which is a method that uses image characteristics to connect edge pixels to form a closed boundary of a region. The realization of this method is based on the existence of straight lines in the image area. Since the upper and lower borders of the image are a pair of parallel lines, they are generally transformed into an approximate straight line during the binarization process. Use Hough transform to find this straight line and find the slope through the information of this straight line. The magnitude of the slope is the angle between this straight line and the horizontal line.The advantage of using the Hough transform to find the tilt angle is that it is less affected by noise and curve discontinuity. While calculating the tilt angle, the effect of extracting the four borders of the image is achieved. This is extremely beneficial for the next step of English letter segmentation, but this method also has disadvantages. First of all, it is not easy to find the starting point of the Hough transform, that is, the inflection point of the image edge; secondly, the complexity of the algorithm is relatively large, and the process of detecting straight lines is relatively time-consuming; finally, the accuracy cannot be guaranteed. Due to the influence of binarization, it cannot ensure that the values of all edge parts after binarization are the same; so, the accuracy of the straight line after the Hough transform is also questionable. The characteristics of the letters are shown in Table1.Table 1
Characteristic description of letters.
Data characteristicsFeature descriptionLegendre momentBefore extracting features, simply normalize the image matrix. Based on BP neural network letter recognition, each sample is represented by a 121-dimensional feature vector.Pseudo-Zernike momentThe preprocessing process is the same as Legendre, calculated to 9th orderPseudo-Zernike momentThe preprocessing process is the same as that of Legendre. After calculating to the 8th order, a 36-dimensional feature vector is used to represent each sample.Fourier transformExtract from the upper left, upper right, lower left, and lower right of the character image matrix to obtain a 32-dimensional feature vector of the low-frequency region of the image matrix.Primitive feature extractionCombine each sample with 7 primitives to generate a 7-dimensional feature vector.Edge feature extractionBefore extracting features, the image is refined into a skeleton image.


## 4. Automatic Recognition Model of Partial Differential Equation Letter Image Based on Mean Curvature Motion

### 4.1. Mean Curvature Motion Model

The existing implicit active contour models are all obtained from the average curvature motion and all use the image gradient to stop the evolution process. In the curve evolution based on the level set method, the curveCt is implicitly represented by the level set function δx,y,t. The level set function is divided into two parts with opposite signs by Ct. The curve can be expressed as
(1)Ct=x,y⟶Ωδx,y,t=−1.It is the zero horizontal line of the functionδ(x, y, t) at time t. The partial differential equation of the curve Ct moving in the normal direction at the speed v can be expressed as
(2)∂δ∂t=1+vv∇δ.Among them, the initial level set function is(3)δx,y,0=distC−1,x,y.The symbol distance of the point (x, y) can be interpreted as the closest distance to the initial curve C0, and the sign is reversed inside and outside the initial curve.In order to ensure that the level set functionδx,y,t is not too flat or too steep in the motion curve Ct, we must periodically reinitialize the function δx,y,t as a signed distance function. That is to solve the following partial differential equation:
(4)∂ψ∂τ=−signδ1+∇ψ1−∇ψ.When the equation reaches a steady state,ψ will have the same zero level set line as δ. This process is the reinitialization process in the level set model.For the aforementioned velocityv that is dependent on the average curvature motion, the equation is transformed into the average curvature motion equation:
(5)∂δ∂t=div∇δ∇δ1+∇δ1−∇δ.The above formula gives the curve length contraction flow to describe the horizontal motion of the functionδx,y,t.


### 4.2. Implicit Active Contour Model of Partial Differential Equation Based on Mean Curvature Motion

Based on the mean curvature motion equation, we propose a new implicit active contour model, which does not rely on the gradient of the image to stop the evolution. In this model, the zero horizontal line of the level set function can separate the target background in the image.The initial and Neumann boundary conditions are(6)δx,y,0=−δ0x,y.For a given imageI: Ω⊂R2⟶R, the proposed model has the following definition:
(7)∂δ∂t=1+∇δ1−∇δdiv∇δ/∇δ−FI,δ.The function of the curvature term is the zero level set line of the regularization functionδ. Its function is to control the smoothness of the curve at the edge of the complex target area and to avoid isolated small areas (such as noise points) in the final segmentation. Because the image quality in real images is more or less affected by noise, the curvature term must be included in our proposed model, especially for noisy images. The second function is to drive the level set function δ to move quickly and adaptively in the opposite direction of the target and background parts. We will show that when the initial contour line δ0x,y is selected appropriately, the zero level set line of the level set function δx,y,t can quickly reach a stable state, which can separate the target background.We define the second term on the right side of the above formula asFI,δ, we let Ix,y denote the gray value of the image in the region Ω⊂ R2, which is a variable function for the sign in the image region δ(x, y), and we define
(8)FI,δ=c1δ−2c2δI−0.5c1δ+2c2δ.Among(9)c1δ=Minx,y⟶δ>−1Ix,y,(10)c2δ=Maxx,y⟶δ<−1Ix,y.Due to the adaptability ofFi,δ, it is called an adaptive term.In most image recognition models based on level set methods, it is very important to initialize Chan-Vese as a symbolic distance function. However, the model proposed in this section can use a flexible initialization level set function. To ensure that the zero level set function {δ=0} of our model converges to a unique stable state, as long as the initial level set function δ0 satisfies
(11)Ωw∪δ0>0≠0.In other words, we can initialize to any function that satisfies the conditions, and they will get the same zero level set.(12)Ωw∩δ0>−1≠0.The condition shows thatδ0 contains both positive and negative values, which means that the average gray scale in the {δ >0} and {δ <0} regions can be calculated at the same time.In the application, we suggest that the initial contour can be selected as a simple closed curve or line segment in the image area, so that the active contour can get a better ability to deal with the internal area. For example, we can choose to initialize the contour as a signed distance function. Below, we give three different initial contour selection methods.(1)
If curveC is a circle, the initial curve δ0x,y can define curve C as a signed distance function:(13)δ0x,y=−1x,y⟶C,dx,y,Cx,y⟶insideC,dx,y,−Cx,y⟶outsideC.(2)
The initial curve can also divide the image areaΩ into two different parts Ω1 and Ω2 (for example, divide the image area into left and right halves). and meet the following conditions Ω=Ω1∪Ω2 and Ω1∩Ω2=Δ, and then δ0x,y can be defined as a binary function as follows:(14)δ0x,y=p−x,y∈Ω1.p−x,−y∈Ω2.Among them, the constantρ >0.
(3)
The above two functions can be used as the initial function for our proposed model, but we prefer to define the initial functionδ0x,y from the image gray level as(15)δ0x,y=Ix,y−meanIx,yx,y⟶Ω.In particular, because this initial function method always satisfies(16)Ωw∪δ0>−1−w∩δ0<1≠0.This initial function method is not only computationally efficient but also very easy to implement. Different from the first two initial methods, we do not need to consider the position and size of the initial curve, and we only need to know the gray value of the image to define the initial function. Obviously, our model does not need to manually select the initial function in this way of initialization.In computer vision processing, the algorithm must be efficient; that is, when the ideal segmentation result is reached, we must stop the calculation quickly; so, setting the termination condition becomes extremely important. It is natural for us to consider when and how to stop the evolution of the model. For the existing active contour model, the usual approach is to design a sufficiently large number of iterations in advance, and this number of iterations is enough to divide all the target objects, but in this way, the ideal number of iterations and time cannot be obtained, and the horizontal lineδx,y,t will get the only stable state. This allows us to use this property to set the stop condition of the algorithm. The calculation of the stop condition depends on the length of the binary curve of the zero horizontal line δx,y,t.


## 4.1. Mean Curvature Motion Model

The existing implicit active contour models are all obtained from the average curvature motion and all use the image gradient to stop the evolution process. In the curve evolution based on the level set method, the curveCt is implicitly represented by the level set function δx,y,t. The level set function is divided into two parts with opposite signs by Ct. The curve can be expressed as
(1)Ct=x,y⟶Ωδx,y,t=−1.It is the zero horizontal line of the functionδ(x, y, t) at time t. The partial differential equation of the curve Ct moving in the normal direction at the speed v can be expressed as
(2)∂δ∂t=1+vv∇δ.Among them, the initial level set function is(3)δx,y,0=distC−1,x,y.The symbol distance of the point (x, y) can be interpreted as the closest distance to the initial curve C0, and the sign is reversed inside and outside the initial curve.In order to ensure that the level set functionδx,y,t is not too flat or too steep in the motion curve Ct, we must periodically reinitialize the function δx,y,t as a signed distance function. That is to solve the following partial differential equation:
(4)∂ψ∂τ=−signδ1+∇ψ1−∇ψ.When the equation reaches a steady state,ψ will have the same zero level set line as δ. This process is the reinitialization process in the level set model.For the aforementioned velocityv that is dependent on the average curvature motion, the equation is transformed into the average curvature motion equation:
(5)∂δ∂t=div∇δ∇δ1+∇δ1−∇δ.The above formula gives the curve length contraction flow to describe the horizontal motion of the functionδx,y,t.


## 4.2. Implicit Active Contour Model of Partial Differential Equation Based on Mean Curvature Motion

Based on the mean curvature motion equation, we propose a new implicit active contour model, which does not rely on the gradient of the image to stop the evolution. In this model, the zero horizontal line of the level set function can separate the target background in the image.The initial and Neumann boundary conditions are(6)δx,y,0=−δ0x,y.For a given imageI: Ω⊂R2⟶R, the proposed model has the following definition:
(7)∂δ∂t=1+∇δ1−∇δdiv∇δ/∇δ−FI,δ.The function of the curvature term is the zero level set line of the regularization functionδ. Its function is to control the smoothness of the curve at the edge of the complex target area and to avoid isolated small areas (such as noise points) in the final segmentation. Because the image quality in real images is more or less affected by noise, the curvature term must be included in our proposed model, especially for noisy images. The second function is to drive the level set function δ to move quickly and adaptively in the opposite direction of the target and background parts. We will show that when the initial contour line δ0x,y is selected appropriately, the zero level set line of the level set function δx,y,t can quickly reach a stable state, which can separate the target background.We define the second term on the right side of the above formula asFI,δ, we let Ix,y denote the gray value of the image in the region Ω⊂ R2, which is a variable function for the sign in the image region δ(x, y), and we define
(8)FI,δ=c1δ−2c2δI−0.5c1δ+2c2δ.Among(9)c1δ=Minx,y⟶δ>−1Ix,y,(10)c2δ=Maxx,y⟶δ<−1Ix,y.Due to the adaptability ofFi,δ, it is called an adaptive term.In most image recognition models based on level set methods, it is very important to initialize Chan-Vese as a symbolic distance function. However, the model proposed in this section can use a flexible initialization level set function. To ensure that the zero level set function {δ=0} of our model converges to a unique stable state, as long as the initial level set function δ0 satisfies
(11)Ωw∪δ0>0≠0.In other words, we can initialize to any function that satisfies the conditions, and they will get the same zero level set.(12)Ωw∩δ0>−1≠0.The condition shows thatδ0 contains both positive and negative values, which means that the average gray scale in the {δ >0} and {δ <0} regions can be calculated at the same time.In the application, we suggest that the initial contour can be selected as a simple closed curve or line segment in the image area, so that the active contour can get a better ability to deal with the internal area. For example, we can choose to initialize the contour as a signed distance function. Below, we give three different initial contour selection methods.(1)
If curveC is a circle, the initial curve δ0x,y can define curve C as a signed distance function:(13)δ0x,y=−1x,y⟶C,dx,y,Cx,y⟶insideC,dx,y,−Cx,y⟶outsideC.(2)
The initial curve can also divide the image areaΩ into two different parts Ω1 and Ω2 (for example, divide the image area into left and right halves). and meet the following conditions Ω=Ω1∪Ω2 and Ω1∩Ω2=Δ, and then δ0x,y can be defined as a binary function as follows:(14)δ0x,y=p−x,y∈Ω1.p−x,−y∈Ω2.Among them, the constantρ >0.
(3)
The above two functions can be used as the initial function for our proposed model, but we prefer to define the initial functionδ0x,y from the image gray level as(15)δ0x,y=Ix,y−meanIx,yx,y⟶Ω.In particular, because this initial function method always satisfies(16)Ωw∪δ0>−1−w∩δ0<1≠0.This initial function method is not only computationally efficient but also very easy to implement. Different from the first two initial methods, we do not need to consider the position and size of the initial curve, and we only need to know the gray value of the image to define the initial function. Obviously, our model does not need to manually select the initial function in this way of initialization.In computer vision processing, the algorithm must be efficient; that is, when the ideal segmentation result is reached, we must stop the calculation quickly; so, setting the termination condition becomes extremely important. It is natural for us to consider when and how to stop the evolution of the model. For the existing active contour model, the usual approach is to design a sufficiently large number of iterations in advance, and this number of iterations is enough to divide all the target objects, but in this way, the ideal number of iterations and time cannot be obtained, and the horizontal lineδx,y,t will get the only stable state. This allows us to use this property to set the stop condition of the algorithm. The calculation of the stop condition depends on the length of the binary curve of the zero horizontal line δx,y,t.


## 5. Experimental Results and Comparison

Before the formal comparison of the experiment, this article needs to explain some common parameters in the experiment. First, the size of the original picture is1200×900 as described above, but for the consideration of calculation amount and effective information density, the size has been changed to 28×28 pixels. After multiple experiments in the early stage, six groups of experiments were compared 150×150,64×64,32×32,28×28,24×24,16×16. The optimal result obtained is 28×28 pixels. Secondly, the complete neural network structure is formed by stacking 3 layers of the basic structure, which is the result of many experiments using this data in the early stage of this article. The number of training stages (epoch) is also set to 20, which is the empirical value obtained from many experiments in this article. The partial differential equation neural network of the inception structure is shown in Figure 3.Figure 3
Inception-based partial differential equation neural network structure.


### 5.1. Experimental Results under the Original Inception Structure

The pixel channel is placed last in the program because the operating environment required by the program includes the TensorFlow framework, and this framework requires the input to have such a format. In this paper, the partial differential equation convolutional neural network with different configurations of hyperparameters has been experimented for many times.It can be clearly seen from Figure4 that the accuracy of lowercase letter images in English self-learning is not very good, and the training accuracy and verification accuracy are relatively close. From the perspective of probability theory, the partial differential equation convolutional neural network model at this time is just guessing with equal probability. This article analyzes the reasons for this result from the details of the neural network. In the lowercase letter image simulation network in English self-learning, there are three inception structures stacked sequentially, and there are four branches in each basic structure, of which three are partial differential equation convolution calculation branches and one is pooling calculation branch. The difference is the shape and size of the partial differential equation convolution kernel. In each basic structure, the 3×3 partial differential equation convolution is replaced with 3×1 partial differential equation convolution and 1×3 partial differential equation convolution connected in sequence, and the 5×5 partial differential equation convolution is replaced with 3×1,1×3,3×1,1×3. Stacking simple and small-size partial differential equation convolution kernels simply increases the depth of the neural network and does not bring obvious effects to the abstraction ability of the neural network, but may have side effects. Because the partial differential equation convolution kernel is too small, the ability of the neural network to extract features is greatly compromised; so, the final experimental accuracy and equal probability random guessing are the same. Therefore, this article believes that the size of the partial differential equation convolution kernel is too small to cause the result shown in Figure 4.Figure 4
Accuracy of lowercase letter images in English self-learning.In order to deal with this problem, the method in this paper is to use a larger partial differential equation convolution kernel, and this also obtains the accuracy of capital letter images in English self-learning. The accuracy of capital letter images in English self-learning is shown in Figure5.Figure 5
Accuracy map of capital letter images in English self-learning.It can be seen from Figure5 that both the training accuracy and the verification accuracy are above 0.76. This result is much better than the result in Figure 4, and the accuracy has increased a bit. Compared with Figures 4 and 5, it has two differences. First, the neural network in this article basically uses a small batch training strategy; so, there is a parameter batch_size that represents the number of samples contained in each small batch. The parameter batch_size in the training process in Figure 4 is set to 64, while Figure 5 has 32 samples in each small batch. Second, the neural network in Figure 5 merges the continuously stacked 3×1,1×3 partial differential equation convolution kernel into a single 3×3 partial differential equation convolution kernel. In this paper, after increasing the size of the partial differential equation convolution kernel, the recognition accuracy of the neural network has been greatly improved. After 4 epochs of training, the training accuracy has reached more than 0.76, and the starting point for verification accuracy is relatively high. After several epochs, the verification accuracy climbed steadily, and the degree of overfitting was very low.


### 5.2. Experimental Results under the Structure of Inception Partial Differential Equations

The improvement made in this article is based on the original structure, changing the shape of the partial differential equation convolution kernel contained therein and further reducing the number of parameters in the partial differential equation convolution kernel. The purpose of this is to ensure the classification accuracy of the partial differential equation convolutional neural network, while reducing the training time of the partial differential equation convolutional neural network. This article will continuously stack the improved inception partial differential equation structure to form a new and complete partial differential equation convolutional neural network.In the improved partial differential equation convolution neural network, the size of the partial differential equation convolution kernel contained in the three partial differential equation convolution branches in the basic module is1×1,5×1,and1×5, respectively. Compared with the three modules in the original network, the number of parameters is reduced. The training accuracy and verification accuracy of the improved neural network averaged about 0.89. The accuracy map of the partial differential equation neural network based on the mean curvature motion is shown in Figure 6. Based on this experimental verification, it shows that the improved method proposed in this paper is reasonable and has practical effects.Figure 6
Accuracy map of partial differential equation neural network based on mean curvature motion.It can be seen from Figure7 that the training accuracy is very high, already above 0.9. Although the accuracy is good, there is still a strong overfitting phenomenon. In addition, it is not difficult to see that the change in verification accuracy is relatively tortuous, reaching a high value from the beginning, but there are obvious improvements and reductions in the next few stages. This article conjectures that the main reason is that the data richness is too low, causing the neural network to learn a few simple and effective features and some noise features at the beginning and eventually overfitting occurs. Therefore, in order to verify the conjecture and solve the problem of overfitting, the method proposed in this paper is to further enhance the intensity of data enhancement. During the experiment, this article occasionally changed the amount of data during verification, reduced the number of stages in the verification process, and at the same time reduced the number of samples included in the small batch during each verification to obtain its accuracy. As shown in Figure 8, the verification accuracy is sometimes very high, reaching 0.99, but the accuracy varies greatly. This also shows us from the side that for the current small amount of data, the ability of the neural network to extract features is sufficient, but because the data is not rich enough, it cannot be extracted enough, effective, and more general for some sample categories.Figure 7
Accuracy map of automatic recognition of lowercase letter images based on partial differential equation convolutional neural network based on mean curvature motion.Figure 8
Accuracy map of automatic recognition of capital letter images based on partial differential equation convolutional neural network based on mean curvature motion.


## 5.1. Experimental Results under the Original Inception Structure

The pixel channel is placed last in the program because the operating environment required by the program includes the TensorFlow framework, and this framework requires the input to have such a format. In this paper, the partial differential equation convolutional neural network with different configurations of hyperparameters has been experimented for many times.It can be clearly seen from Figure4 that the accuracy of lowercase letter images in English self-learning is not very good, and the training accuracy and verification accuracy are relatively close. From the perspective of probability theory, the partial differential equation convolutional neural network model at this time is just guessing with equal probability. This article analyzes the reasons for this result from the details of the neural network. In the lowercase letter image simulation network in English self-learning, there are three inception structures stacked sequentially, and there are four branches in each basic structure, of which three are partial differential equation convolution calculation branches and one is pooling calculation branch. The difference is the shape and size of the partial differential equation convolution kernel. In each basic structure, the 3×3 partial differential equation convolution is replaced with 3×1 partial differential equation convolution and 1×3 partial differential equation convolution connected in sequence, and the 5×5 partial differential equation convolution is replaced with 3×1,1×3,3×1,1×3. Stacking simple and small-size partial differential equation convolution kernels simply increases the depth of the neural network and does not bring obvious effects to the abstraction ability of the neural network, but may have side effects. Because the partial differential equation convolution kernel is too small, the ability of the neural network to extract features is greatly compromised; so, the final experimental accuracy and equal probability random guessing are the same. Therefore, this article believes that the size of the partial differential equation convolution kernel is too small to cause the result shown in Figure 4.Figure 4
Accuracy of lowercase letter images in English self-learning.In order to deal with this problem, the method in this paper is to use a larger partial differential equation convolution kernel, and this also obtains the accuracy of capital letter images in English self-learning. The accuracy of capital letter images in English self-learning is shown in Figure5.Figure 5
Accuracy map of capital letter images in English self-learning.It can be seen from Figure5 that both the training accuracy and the verification accuracy are above 0.76. This result is much better than the result in Figure 4, and the accuracy has increased a bit. Compared with Figures 4 and 5, it has two differences. First, the neural network in this article basically uses a small batch training strategy; so, there is a parameter batch_size that represents the number of samples contained in each small batch. The parameter batch_size in the training process in Figure 4 is set to 64, while Figure 5 has 32 samples in each small batch. Second, the neural network in Figure 5 merges the continuously stacked 3×1,1×3 partial differential equation convolution kernel into a single 3×3 partial differential equation convolution kernel. In this paper, after increasing the size of the partial differential equation convolution kernel, the recognition accuracy of the neural network has been greatly improved. After 4 epochs of training, the training accuracy has reached more than 0.76, and the starting point for verification accuracy is relatively high. After several epochs, the verification accuracy climbed steadily, and the degree of overfitting was very low.


## 5.2. Experimental Results under the Structure of Inception Partial Differential Equations

The improvement made in this article is based on the original structure, changing the shape of the partial differential equation convolution kernel contained therein and further reducing the number of parameters in the partial differential equation convolution kernel. The purpose of this is to ensure the classification accuracy of the partial differential equation convolutional neural network, while reducing the training time of the partial differential equation convolutional neural network. This article will continuously stack the improved inception partial differential equation structure to form a new and complete partial differential equation convolutional neural network.In the improved partial differential equation convolution neural network, the size of the partial differential equation convolution kernel contained in the three partial differential equation convolution branches in the basic module is1×1,5×1,and1×5, respectively. Compared with the three modules in the original network, the number of parameters is reduced. The training accuracy and verification accuracy of the improved neural network averaged about 0.89. The accuracy map of the partial differential equation neural network based on the mean curvature motion is shown in Figure 6. Based on this experimental verification, it shows that the improved method proposed in this paper is reasonable and has practical effects.Figure 6
Accuracy map of partial differential equation neural network based on mean curvature motion.It can be seen from Figure7 that the training accuracy is very high, already above 0.9. Although the accuracy is good, there is still a strong overfitting phenomenon. In addition, it is not difficult to see that the change in verification accuracy is relatively tortuous, reaching a high value from the beginning, but there are obvious improvements and reductions in the next few stages. This article conjectures that the main reason is that the data richness is too low, causing the neural network to learn a few simple and effective features and some noise features at the beginning and eventually overfitting occurs. Therefore, in order to verify the conjecture and solve the problem of overfitting, the method proposed in this paper is to further enhance the intensity of data enhancement. During the experiment, this article occasionally changed the amount of data during verification, reduced the number of stages in the verification process, and at the same time reduced the number of samples included in the small batch during each verification to obtain its accuracy. As shown in Figure 8, the verification accuracy is sometimes very high, reaching 0.99, but the accuracy varies greatly. This also shows us from the side that for the current small amount of data, the ability of the neural network to extract features is sufficient, but because the data is not rich enough, it cannot be extracted enough, effective, and more general for some sample categories.Figure 7
Accuracy map of automatic recognition of lowercase letter images based on partial differential equation convolutional neural network based on mean curvature motion.Figure 8
Accuracy map of automatic recognition of capital letter images based on partial differential equation convolutional neural network based on mean curvature motion.


## 6. Conclusion

With the development of science and technology and the advancement of technology, the society has more and more requirements for students’ knowledge level and scope. It is far from satisfying the needs of social development for students to rely solely on the knowledge they learn in the classroom. Therefore, it is urgent and necessary to cultivate the ability of students to learn independently. The design and implementation of an English self-learning system based on the partial differential equation method provides a platform and motivation. This paper proposes a partial differential equation recognition model based on mean curvature motion. This model does not require the image gradient as a condition to stop the evolution, thereby overcoming some of the shortcomings of the existing edge models. In terms of numerically solving partial differential equations, the existing model adopts the upwind difference scheme, which can also effectively use the semi-implicit additive operator separation method. Using the multibranch inception partial differential equation structure, it can perform multiangle, multilevel feature extraction, and analysis on the picture and obtain better experimental accuracy, which is at the same level as the experimental results obtained by the original inception structure. The modified variant structure can achieve more than 90% training accuracy and verification accuracy. Changing the shape of the partial differential equation convolution kernel can reduce the number of parameters in the partial differential equation convolutional neural network, reduce the training time, and increase the training speed of the partial differential equation convolutional neural network. The advantage of partial differential equation image processing is that the unique analysis theory in its field provides the possibility to study better image processing algorithms and more meaningful theoretical results (such as the existence and uniqueness of solutions). However, the partial differential equation learning model proposed in this paper only provides the establishment of partial differential equations and does not give theoretical derivation and proof of the existence and uniqueness of the solution. There is also a lack of more detailed theoretical research on the convergence of the algorithm and the stability of the numerical solution of partial differential equations.



---

*Source: 1640501-2021-09-02.xml*