Image classification method and system based on four-element sigmoid activation function

By designing a parallel structure layer based on the quaternary sigmoid activation function, and combining the quaternary sigmoid activation function branch and the convolution branch, the problem of information loss caused by separate processing of quaternion components in the prior art is solved, the accuracy and data integrity of image classification are improved, and rapid convergence to the optimal result is achieved.

CN115424071BActive Publication Date: 2026-02-10NANCHANG HANGKONG UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211075625.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2026-02-10
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

Existing technologies decompose quaternions into four components for separate processing, which fails to effectively utilize the information between channels, resulting in the loss of image data during processing. Furthermore, it does not follow the rules of quaternion arithmetic and cannot meet the differentiability condition for backpropagation in deep learning.

Method used

We design an image classification method based on the quaternary Sigmoid activation function. By combining the quaternary Sigmoid activation function branch and the convolution branch through a parallel structure layer, we satisfy the quaternion operation rules and maintain the integrity of image data during backpropagation. The quaternary Sigmoid activation function branch is used for forward propagation calculation and convolution operation. The results are then combined with a stitching layer to stitch the results in the form of a quaternary feature matrix.

Benefits of technology

It improves the accuracy of image classification, effectively preserves the integrity of image data information, solves the information loss problem caused by processing quaternion components separately in existing technologies, and satisfies the differentiability condition of deep learning, achieving rapid convergence to the optimal result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115424071B_ABST
    Figure CN115424071B_ABST
Patent Text Reader

Abstract

The application relates to an image classification method based on a quaternion Sigmoid activation function, belonging to the technical field of deep learning, which utilizes an image classification network based on a quaternion Sigmoid activation function to perform image classification on an image to be classified. The image classification network comprises a parallel structure layer; the parallel structure layer comprises a splicing layer, a quaternion Sigmoid activation function branch and a convolution branch; wherein the quaternion Sigmoid activation function branch and the convolution branch are in parallel; the quaternion Sigmoid activation function branch performs forward propagation calculation on a quaternion feature matrix by using a quaternion activation function, and then performs convolution operation; the convolution branch performs convolution operation on the quaternion feature matrix; and the splicing layer splices two outputs. The application utilizes the quaternion Sigmoid activation function and the parallel structure matched therewith, can follow the quaternion operation rules, thereby retaining the integrity of image data information and improving the accuracy of image classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and in particular to an image classification method and system based on the quaternary sigmoid activation function. Background Technology

[0002] In recent years, deep learning has gradually replaced traditional algorithms as the mainstream method in image processing due to its powerful performance advantages. However, with numerous experiments conducted by researchers, it has been discovered that neural networks in the real number domain cannot effectively preserve high-dimensional information, leading to performance bottlenecks. Quaternions, due to their inherent ability to process high-dimensional information, have gradually attracted more attention from researchers. Therefore, applying quaternions to neural networks to obtain quaternary neural networks is a very important research topic.

[0003] The rules of quaternion arithmetic mean that a quaternion is not simply a combination of four components, but a high-dimensional information whole. As a whole, its components are interconnected, and the relationships between components also contain data information. The data format of RGB color image pixels is similar to that of quaternion data; each pixel is composed of the three primary color components: R, G, and B. Therefore, many methods use quaternions to represent pixel information, that is, using quaternion matrices to represent color images and perform image processing. Image data represented by quaternions also contains image information due to the interconnectedness of its color components. Failure to follow the rules of quaternion arithmetic will result in the loss of image data during image processing. Therefore, it is necessary to follow the rules of quaternion arithmetic when using images represented by quaternions for image processing to preserve the integrity of the data information.

[0004] Most existing image processing methods using quaternions treat the quaternion representing pixel information as a simple sum of four components (one real part and three imaginary parts). Calculating the quaternion activation function involves first splitting a complete quaternion into four real parts, then inputting each real part into the activation function to obtain the output of each component, and finally piecing the outputs back together to restore the quaternion form. This method fails to consider that the image data represented by quaternions is interconnected and contains image information, resulting in the loss of some image data during processing.

[0005] Therefore, there is an urgent need in this field for a technical solution that follows the arithmetic rules of quaternions and preserves the integrity of image data information. Summary of the Invention

[0006] The purpose of this invention is to provide an image classification method and system based on the quaternion sigmoid activation function. This method follows the rules of quaternion arithmetic and satisfies the differentiability condition of backpropagation in deep learning, thereby preserving the integrity of image data information, improving the accuracy of image classification, and effectively solving the problem in the prior art that the quaternion is split into four components for separate processing, which cannot effectively utilize the information between channels.

[0007] To achieve the above objectives, the present invention provides the following solution:

[0008] An image classification method based on the quaternary sigmoid activation function, the method comprising:

[0009] Obtain the image to be classified;

[0010] The image to be classified is classified using an image classification network based on the quadruple sigmoid activation function.

[0011] The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel;

[0012] The quadruple sigmoid activation function branch performs forward propagation calculation on the quadruple feature matrix using the quadruple activation function, and then performs a convolution operation to obtain quadruple feature activation processing data; the convolution branch performs a convolution operation on the quadruple feature matrix to obtain quadruple convolution processing data; the concatenation layer concatenates the quadruple feature activation processing data and the quadruple convolution processing data in the form of a quadruple feature matrix.

[0013] In some embodiments, the quaternary activation function is: q = q a +q b i+q c j+q d k

[0014] Where q represents the quaternion image feature information, q a q represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. c The component representing the imaginary part k of the quaternion image feature information;

[0015] The formula for calculating the division of quaternions in the quaternion activation function is as follows:

[0016] In some embodiments, after obtaining the image to be classified, the method further includes:

[0017] The image to be classified is processed by taking the mean and normalizing the variance, and then adjusted to a 32x32 RGB image.

[0018] In some embodiments, the training process of the image classification network based on the four-gram sigmoid activation function specifically includes:

[0019] Acquire training images;

[0020] The training images are extracted using a quadrilateral convolutional layer;

[0021] The quaternary image feature information is input into the quaternary Sigmoid activation function branch and the convolution branch respectively; the quaternary Sigmoid activation function branch performs forward propagation calculation on the quaternary image feature information using the quaternary activation function, and then performs convolution operation to obtain quaternary activation processing data; the convolution branch performs convolution operation on the quaternary image feature information to obtain convolution processing data.

[0022] The quaternary activation data and the convolutional data are concatenated in the form of a quaternary feature matrix to obtain a quaternary feature matrix.

[0023] Batch normalization and ReLU activation function operation are performed on the quaternary feature matrix to obtain a normalized quaternary feature matrix;

[0024] The probability of image classification is calculated using the normalized quaternion feature matrix through a fully connected layer, and the network output vector is obtained.

[0025] The loss value between the network output vector and the real label is calculated using the cross-entropy loss function;

[0026] The loss value is then used for backpropagation, and the network parameters are updated to obtain an image classification network based on the quaternary sigmoid activation function.

[0027] In some embodiments, after performing batch normalization and ReLU activation function operations on the quaternary feature matrix to obtain a normalized quaternary feature matrix, the method further includes:

[0028] The normalized quaternary feature matrix is ​​pooled using a quaternary pooling layer to obtain a pooled quaternary feature matrix.

[0029] The pooled quadruple feature matrix is ​​subjected to convolution, batch normalization, and ReLU activation function operations in sequence.

[0030] In some embodiments, the quaternary activation function is: q = qa +q b i+q c j+q d k

[0031] Where q represents the quaternion image feature information, q a q represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. c The component representing the imaginary part k of the quaternion image feature information;

[0032] The formula for calculating the division of quaternions in the quaternion activation function is as follows:

[0033] In some embodiments, after acquiring the training images, the method further includes:

[0034] The training images are subjected to mean and variance normalization operations, and the size of the training images is adjusted to a 32x32 3-channel RGB image.

[0035] In some embodiments, the extraction of quaternion image feature information from the training image using a quaternion convolutional layer specifically includes:

[0036] Perform a convolution operation with a stride of 1 on the training image to obtain a one-dimensional four-element feature matrix;

[0037] The quaternary image feature information of the one-dimensional quaternary feature matrix is ​​extracted using a quaternary convolutional layer; the kernel size of the quaternary convolutional layer is 3x3, the feature edge padding is 1, the stride is 1, and the quaternary convolutional kernel size is 32.

[0038] In some embodiments, after extracting the four-element image feature information of the training image using a four-element convolutional layer, the method further includes:

[0039] The mean and variance normalization operations are performed on the feature data of each channel of the quaternary image feature information.

[0040] This invention also provides an image classification system based on the quaternary sigmoid activation function, the system comprising:

[0041] Image acquisition unit, used to acquire images to be classified;

[0042] An image classification unit is used to classify the image to be classified using an image classification network based on a quadratic sigmoid activation function.

[0043] The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel;

[0044] The quadruple sigmoid activation function branch performs forward propagation calculation on the quadruple feature matrix using the quadruple activation function, and then performs a convolution operation to obtain quadruple feature activation processing data; the convolution branch performs a convolution operation on the quadruple feature matrix to obtain quadruple convolution processing data; the concatenation layer concatenates the quadruple feature activation processing data and the quadruple convolution processing data in the form of a quadruple feature matrix.

[0045] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0046] This invention provides an image classification method and system based on the quaternary sigmoid activation function. First, an image to be classified is acquired. Then, an image classification network based on the quaternary sigmoid activation function is used to classify the image. The image classification network includes a parallel structure layer, comprising a concatenation layer, a quaternary sigmoid activation function branch, and a convolution branch. The quaternary sigmoid activation function branch and the convolution branch are connected in parallel. The quaternary sigmoid activation function branch performs forward propagation calculation on the quaternary feature matrix using the quaternary activation function, followed by convolution to obtain quaternary feature activation processed data. The convolution branch performs convolution on the quaternary feature matrix to obtain quaternary convolution processed data. The concatenation layer concatenates the quaternary feature activation processed data and the quaternary convolution processed data in the form of a quaternary feature matrix. Because this invention utilizes the quaternion sigmoid activation function and its associated parallel structure, it can follow the quaternion arithmetic rules and satisfy the differentiability condition of deep learning backpropagation. This preserves the integrity of image data information, improves the accuracy of image classification, and effectively solves the problem in existing technologies where quaternions are split into four components for separate processing, failing to effectively utilize the information between channels. Furthermore, because this invention proposes a parallel network structure to complement it, the overall system can converge quickly to achieve optimal results. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 The image of the Sigmoid function provided by this invention.

[0049] Figure 2 This is a schematic diagram of the parallel structure of the quaternary Sigmoid activation function provided by the present invention.

[0050] Figure 3 The flowchart is provided for the image classification method based on the quaternary Sigmoid activation function in Embodiment 1 of the present invention.

[0051] Figure 4 This is a schematic diagram of the network model of an image classification network based on the quaternary Sigmoid activation function provided in Embodiment 1 of the present invention.

[0052] Figure 5 This is a schematic diagram illustrating the usage of the quaternary Sigmoid activation function structure provided in Embodiment 1 of the present invention.

[0053] Figure 6 This is a flowchart of the training process for an image classification network based on the quaternary sigmoid activation function, provided in Embodiment 1 of the present invention.

[0054] Figure 7 This is a schematic diagram of a network model without parallel structure provided in Embodiment 1 of the present invention.

[0055] Figure 8 This is a schematic diagram illustrating the recognition accuracy provided in Embodiment 1 of the present invention.

[0056] Figure 9 This is a block diagram of an image classification system based on the quaternary Sigmoid activation function provided in Embodiment 2 of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] In recent years, deep learning has gradually replaced traditional algorithms as the mainstream method in image processing due to its powerful performance advantages. However, with numerous experiments conducted by researchers, it has been discovered that neural networks in the real number domain cannot effectively preserve high-dimensional information, leading to performance bottlenecks. Quaternions, due to their inherent ability to process high-dimensional information, have gradually attracted more attention from researchers. Therefore, applying quaternions to neural networks to obtain quaternary neural networks is a very important research topic.

[0059] The quaternion was invented by W.R. Hamilton in 1843. It is an associative, noncommutative four-dimensional algebra[1]. The quaternion is shown below. A complete quaternion consists of a real part and three imaginary parts.

[0060] q = q a +q b i+q c j+q d k (1.1)

[0061] Symbol definitions used: q represents a quaternion; q a q is the real part of the quaternion; b q represents the components of the imaginary part i of the quaternion; c q is the component of the imaginary part j of the quaternion; d Let k be the component of the imaginary part of the quaternion.

[0062] The orthogonal imaginary units i, j, k follow the following rules:

[0063] i 2 =j 2 =-1,k=ij=-ji→k 2 =-1 (1.2)

[0064] As can be seen from the above operational rules, quaternions are not simply a combination of four components, but a high-dimensional information whole. As a whole, the components are interconnected, and the relationships between components also store data information. The data format of RGB color image pixels is similar to that of quaternions; each pixel is composed of the R, G, and B primary color components. Therefore, many methods use quaternions to represent pixel information, that is, using quaternion matrices to represent color images and perform image processing. Image data represented by quaternions also has interconnected color components that store image information. Failure to follow the quaternion operational rules will result in data loss during image processing. Therefore, it is necessary to follow the quaternion operational rules when using quaternions to represent images for image processing to preserve the integrity of the data information.

[0065] Existing researchers have combined quaternions with deep learning algorithms to improve components such as quaternion convolution operations and quaternion pooling layers, proposing different quaternion neural networks. A classic example is the paper "Quaternion Convolutional Neural Network for Color Image Classification and Forensics," which proposed a relatively complete set of quaternion neural network components. This paper transforms quaternion multiplication into convolution operations to obtain quaternion convolutional layers and proposes the sum of squares of each quaternion component as the guiding matrix for quaternion pooling layers. To simplify calculations and avoid the analytical problems of quaternion functions in the nonlinear part, i.e., the activation function, this method divides the complete quaternion into four real numbers, performs operations on each using real number functions, and then sums them to obtain the output. This is shown in equation (2.1).

[0066] F(q)=F(q a )+F(q b )i+F(q c )j+F(q d )k (2.1)

[0067] (Note: F(·) in the above formula represents any standard real number activation function, and q represents a quaternion.)

[0068] The main technical solution of this method is to input the four components that make up the quaternion into the activation function (the ReLU activation function is used in this paper), calculate the output of each component, and then combine the components to restore the quaternion form.

[0069] The activation function method proposed above treats a quaternion as a simple sum of four components (one real part and three imaginary parts). To calculate the activation function for a quaternion, a complete quaternion is first split into four real parts. Then, each real part is input into the activation function of the real number to obtain the output of each component. Finally, the outputs are pieced together to restore the quaternion form.

[0070] Although the input and output of this design appear to be a nonlinear layer of quaternions, a deeper examination of its design principles reveals some shortcomings:

[0071] A quaternion, as a whole, contains information beyond the simple sum of its components; there is also significant correlation between its channels. This method decomposes the quaternion into four components for separate processing, failing to effectively utilize the information between the channels.

[0072] The backpropagation process of updating network parameters in a neural network requires the use of first-order differential information from quaternions. As a hypercomplex number, quaternions, requiring the use of partial derivatives, must naturally satisfy the condition of being differentiable for complex numbers. However, this method's design did not consider or address this issue.

[0073] In summary, the activation function proposed in this paper for quaternion neural networks does not adhere to the rules of quaternion operations; it only superficially performs operations similar to quaternion operations. Based on these issues, this invention aims to accomplish the following tasks:

[0074] Design a quaternion activation function that processes complete quaternions so that it can extract all the information contained in the quaternion.

[0075] Design a function that satisfies the quaternion analyzability condition, so that it can theoretically and practically perform directional propagation and gradient descent of errors in the network.

[0076] After studying the advantages and disadvantages of existing methods and the research objectives, this invention proposes an activation function in quaternion form for commonly used nonlinear functions, which satisfies the differentiability condition of backpropagation in deep learning while adhering to the rules of quaternion arithmetic. Furthermore, a matching network structure is designed to enable the overall system to converge quickly to achieve optimal results. The entire system design is based on the application domain of image classification, and the invention aims to improve the accuracy of quaternion neural networks in image classification tasks.

[0077] To process quaternions globally, quaternion functions are needed. However, applying quaternion functions to neural networks requires satisfying the condition of global analyzability. The global analyzability condition for quaternions is given by the Cauchy-Riemann-Fueter (CRF) equation, as shown in Equation 4.1.

[0078]

[0079] Where f(q) denotes a function containing the quaternion q. Let f(q) be the partial derivative with respect to ·.

[0080] This commonly used global analyzability condition is so strict that it can only be satisfied by linear functions, which greatly limits the development of quaternary nonlinear functions.

[0081] Although neural networks require quaternion nonlinear functions, which does not satisfy the global analyzability of CRF, backpropagation in neural networks only requires local analyzability to update parameters. To prove the local analyzability of quaternions, a relaxed CRF condition is proposed, as shown in Equation 4.2.

[0082]

[0083] The imaginary unit of a mathematical quantity is defined therein. The expression for the unit quantity α is as follows:

[0084]

[0085] The locality mentioned here refers to the imaginary unit. First-order differentiability in the vicinity. Since gradient descent only requires partial derivatives in the vicinity of a point, this condition applies to the partial derivative proof of neural network parameter updates.

[0086] This invention will use the sigmoid activation function, a commonly used activation function in real-valued neural networks. Its expression is shown in Equation 4.4.

[0087]

[0088] Its function graph is as follows Figure 1 As shown.

[0089] The advantages of the Sigmoid function are:

[0090] The Sigmoid function is differentiable everywhere in its domain and has no non-differentiable singularities. This is advantageous in image classification tasks, where the parameters of the neural network are updated using differential gradient descent.

[0091] The Sigmoid function is widely used, and its practical value has been verified by numerous practices. It is widely used in image classification.

[0092] The Sigmoid function can compress data while preserving the amplitude of the signal. This allows the network to control the values ​​of features within a reasonable range, which is beneficial for preserving higher-order features and for the convergence of network training results.

[0093] Based on the advantages mentioned above, it can be concluded that the inherent characteristics of the Sigmoid function make it well-suited for image classification tasks.

[0094] As can be seen from Equation 4.4, the Sigmoid function is composed of quaternion exponential functions. Quaternion exponential functions in the complex field are not simple. Due to the non-commutative nature of quaternion products, there are several definitions of quaternion exponential functions. For convenience, we will use the following definition of exponential functions, as shown in Equation 4.5.

[0095]

[0096] Where e q This represents a quaternary exponential function with the natural number e as the base.

[0097] According to Euler's formula, it can also be expressed as shown in Equation 4.6:

[0098]

[0099] where α and As given in Equation 4.3. Through calculation, we obtain:

[0100]

[0101] It can be concluded that the quaternary exponential function satisfies the relaxed CRF condition of local analyticity.

[0102] The differential of the quaternary exponential function is shown in Equation 4.8.

[0103]

[0104] The quaternary activation function designed in this invention is as follows:

[0105]

[0106] The division operation of quaternions is defined as follows:

[0107]

[0108] Proof of the local analyticity of the quaternion sigmoid activation function:

[0109] According to the chain rule for differentiating multivariable functions, we can obtain...

[0110]

[0111] Substituting formula 4.9 into formula 4.11 yields...

[0112]

[0113] That is, the quaternion Sigmoid activation function proposed in this invention satisfies the locally analytic relaxed CRF condition.

[0114] Differential derivation of the quaternary activation function:

[0115]

[0116] Substituting Equation 4.8 into Equation 4.13, we can obtain the differential of the quaternary Sigmoid activation function as follows:

[0117]

[0118] Based on the above proof and derivation, the quaternion Sigmoid activation function proposed in this invention satisfies the local resolvability condition. It also fulfills the design objective of processing quaternions holistically, which ensures good preservation of inter-channel information in features. More and more complete feature information improves the accuracy of the network in image classification.

[0119] Meanwhile, considering that the Sigmoid function suffers from vanishing and exploding gradients compared to the commonly used ReLU activation function, making network training difficult, this invention proposes a four-element Sigmoid activation function structure to address this issue. The principle is as follows:

[0120] Neural networks essentially use gradient descent to reduce the loss function, thereby learning the network as a high-dimensional mapping from input data to output data after processing, as shown in Equation 4.15.

[0121] f r A→B (4.15)

[0122] Here let f r Let f be the mapping from input dataset A to dataset B, projecting A onto a dimension m. The dimension of this mapping is initially determined when defining the network structure. If a mapping f that projects input dataset A onto an n-dimensional plane is defined during network definition, the mapping dimension needs to be reduced through parameter learning when n >> m. This will complicate network training. To avoid this problem, the classic ResNet network proposes a jumper structure, using parallel jumpers to make it easier for the network to learn mappings from 0 to n dimensions.

[0123] Considering that Sigmoid significantly enhances the nonlinear expressive power of a network compared to the commonly used ReLU, this invention proposes a parallel jump connection for activation functions to make this capability more controllable during the learning process. Furthermore, to allow the network to better select whether the jump connection or the activation function should have a larger weight, a 1x1 convolutional layer is connected in parallel after each of the two branches as a weight selection. Finally, the outputs of the two branches are concatenated along the channel dimension to obtain the final output.

[0124] Finally, this invention proposes as follows: Figure 2 The multi-path parallel structure shown is used in conjunction with the quaternion sigmoid function. The input variables are simultaneously fed into both the 1x1 branch and the quaternion sigmoid activation function branch. The 1x1 convolution is used as weights, and the learning process adjusts the weights of the two branches during forward propagation. After calculating the outputs of the two branches, the data is concatenated along the channel dimension to obtain the final output.

[0125] The purpose of this invention is to provide an image classification method and system based on the quaternion sigmoid activation function. This method follows the rules of quaternion arithmetic and satisfies the differentiability condition of backpropagation in deep learning, thereby preserving the integrity of image data information, improving the accuracy of image classification, and effectively solving the problem in the prior art that the quaternion is split into four components for separate processing, which cannot effectively utilize the information between channels.

[0126] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0127] Example 1:

[0128] like Figure 3 As shown, this embodiment provides an image classification method based on the quaternary sigmoid activation function, the method comprising:

[0129] S1. Obtain the image to be classified.

[0130] Then, the image to be classified is subjected to mean and variance normalization processing, and adjusted to a 32x32 RGB image.

[0131] S2. Perform image classification on the image to be classified using an image classification network based on the quadrature sigmoid activation function;

[0132] The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel;

[0133] The quadruple sigmoid activation function branch performs forward propagation calculations on the quadruple feature matrix using the quadruple activation function, followed by convolution to obtain quadruple feature activation processed data. The convolution branch performs convolution operations on the quadruple feature matrix to obtain quadruple convolution processed data. The concatenation layer concatenates the quadruple feature activation processed data and the quadruple convolution processed data in the form of a quadruple feature matrix. Here, the quadruple feature matrix refers to the image feature information extracted using quaternions from the quadruple convolutional layer.

[0134] The quaternary activation function is: q = q a +q b i+q c j+q d k

[0135] Where q represents the quaternion image feature information, q aq represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. c The component representing the imaginary part k of the quaternion image feature information;

[0136] The formula for calculating the division of quaternions in the quaternion activation function is as follows:

[0137] The main technology of this invention is to design a nonlinear layer structure that conforms to quaternion operations using the Sigmoid function and apply it to the quaternion network structure for image classification, thereby enhancing the network's data processing capabilities and improving the recognition accuracy of image classification.

[0138] In this embodiment, the four-element neural network structure (an image classification network based on the four-element Sigmoid activation function) is designed as follows:

[0139] This paper utilizes traditional quaternion neural network components: quaternion convolution, quaternion pooling, batch normalization, fully connected layers, and activation function layers to construct a quaternion neural network. The preprocessed color image is used as input data. First, a simple convolutional layer transforms the 3D input data into 4D data represented by quaternions. Then, a series of alternating feature extraction operations, including quaternion convolution, pooling, and batch normalization, are performed to obtain the feature information of the input image. Finally, a fully connected layer fuses all the feature information, and the output image calculates the probability of classifying the image into each category (here, "probability" is not a true mathematical probability, but rather an interpretation of the physical quantity of the network output data; essentially, it is the data output by the network). The category with the highest probability is then identified as the image's classification category. Since the dataset used in this embodiment contains images of 10 categories, including airplanes, cars, birds, cats, deer, dogs, frogs, horses, boats, and trucks, the output of the last fully connected layer is set to 10. These 10 numbers represent the probability that the input image will be classified into one of these 10 categories by the network. The larger the output value, the greater the likelihood of being classified into that category. During network training, the goal is to maximize the number of images correctly classified by the network and minimize the probability of being classified into other categories. When finally using the network, the image classification output uses the maximum value of the 10 numbers from the fully connected layer output as the network's category output. The specific network structure is as follows: Figure 4 As shown. Figure 4In the diagram, the quaternion convolutional layer uses "K(3x3)P1 S1", where "K(3x3)" indicates a 3x3 kernel size, "P1" indicates a padding size of 1, and "S1" indicates a stride of 1. The numbers on the connectors represent the feature dimensions, expressed as Width × Height × (Channel). All convolutions use quaternion convolutions, along with quaternion pooling layers. Based on experimental data, batch normalization using quaternions and fully connected layers are not necessary. Therefore, for convenience, this embodiment uses common real-domain batch normalization layers and fully connected layers.

[0140] Replace the activation function of the shallow four-element network with Figure 2 The quaternary activation function structure is shown. The usage of the quaternary sigmoid activation function structure designed in this embodiment is as follows: Figure 5 As shown.

[0141] The method for using a parallel structure with a quaternary sigmoid activation function is as follows:

[0142] First, the forward propagation calculation of the quaternary Sigmoid function is implemented using Equation 4.9 of the quaternary Sigmoid function layer mentioned above, and the backward propagation calculation is implemented using Equation 4.14. Equation 4.10 provides a convenient way to implement quaternion division operations in the forward and backward propagation calculations. After obtaining the quaternary Sigmoid function component, the following steps are taken: Figure 2 The activation function parallel structure is shown.

[0143] The difference between this method and the method of applying the same nonlinear processing to each quaternion component using the ordinary ReLU activation function is that, in order to make the input and output interfaces of this embodiment consistent with those of the traditional ReLU activation function (the input of the traditional ReLU activation function is a complete quaternion sigmoid multi-channel feature data, and the output is a complete quaternion sigmoid multi-channel feature data after nonlinear processing), the activation function layer in this embodiment needs to extract each quaternion component before nonlinear processing, and then concatenate the corresponding quaternion components when splicing the data of the parallel branches. Details are as follows:

[0144] The input to a quaternion activation layer is a quaternion feature matrix, which is a concatenation of a real-part multi-channel data matrix and three imaginary-part multi-channel matrices. (Similar to the storage of RGB color images, the feature information at each pixel level of the image is represented by a quaternion. Since images are two-dimensional information, a quaternion matrix is ​​used to represent an image. However, because computers currently do not have a direct storage type for quaternions, q is used instead.) a q b q c q dThese four components are concatenated along the channel dimension to form a multi-channel quaternion matrix for storage (the quaternion is then stored as a quaternion). When calculating the quaternion sigmoid function, the real part q of the quaternion matrix needs to be extracted. a With the imaginary part q b q c q d Each component is assigned to its corresponding channel position (i.e., the total number of channels is divided into four parts, with the channel positions from low to high corresponding to q respectively). a q b q c q d The multidimensional features are separated to calculate the forward and backward propagation processes. Figure 2 In this structure, the feature data input to the nonlinear processing layer (i.e., the activation function layer) is processed by a single 1x1 convolution operation branch and a 1x1 convolution branch with a quaternary sigmoid activation function, respectively, to obtain two quaternion multi-channel data. To make the output a complete quaternion multi-channel data, when concatenating the channels of the output feature data from the single 1x1 convolution operation branch and the 1x1 convolution branch with a quaternary sigmoid activation function, the quaternion outputs of the two branches need to be processed according to their real parts q. a With the imaginary part q b q c q d The corresponding quaternary component types are concatenated. This concatenation allows the parallel structure of the quaternary Sigmoid activation function in this embodiment to be directly replaced by the traditional ReLU activation function layer without modifying other network structures.

[0145] The above steps result in a complete parallel structure layer of the quaternary sigmoid activation function. To use it, simply replace the ReLU activation function layer of the original quaternion network with this structure to obtain the deep learning network based on the parallel structure of the quaternary sigmoid activation function in this embodiment. Since the input-output interfaces of the activation function layers in this embodiment are consistent with those of the original network, there are no restrictions on the position or number of activation function layers when using the parallel structure of the quaternary sigmoid activation function in this embodiment to replace the activation function layers of the original network.

[0146] In this embodiment, the training process of the image classification network based on the four-gram Sigmoid activation function specifically includes:

[0147] A1. Obtain training images.

[0148] The dataset used in this embodiment is the classic CIFAR10 color image 10-class dataset. The CIFAR10 dataset consists of 60,000 RGB color images of size 32x32, with a total of 10 classes. Each class has 6,000 images. Among them, there are 50,000 training images and 10,000 test images.

[0149] Then, data augmentation processing is performed on these training images. By removing the mean and normalizing the variance of the training images, the image size is adjusted to 32x32 3-channel RGB images, and the final 6000 mean-removed and variance-normalized color images are used as the training data for this embodiment.

[0150] A2. Extract the four-element image feature information of the training image using a four-element convolutional layer.

[0151] In this embodiment, a convolution operation with a stride of 1 is performed on the training image to obtain a one-dimensional quaternion feature matrix. Quaternion convolutional layers are then used to extract quaternion image feature information from this one-dimensional quaternion feature matrix. The kernel size of the quaternion convolutional layer is 3x3, the feature edge padding is 1, the stride is 1, and the quaternion kernel size is 32. Finally, the feature data of each channel of the quaternion image feature information are subjected to mean removal and variance normalization operations.

[0152] A3. Input the quaternary image feature information into the quaternary Sigmoid activation function branch and the convolution branch respectively; the quaternary Sigmoid activation function branch performs forward propagation calculation on the quaternary image feature information using the quaternary activation function, and then performs convolution operation to obtain quaternary activation processing data; the convolution branch performs convolution operation on the quaternary image feature information to obtain convolution processing data.

[0153] A4. Concatenate the quaternion activation data and the convolution data in the form of a quaternion feature matrix to obtain a quaternion feature matrix.

[0154] A5. Perform batch normalization and ReLU activation function operation on the quaternary feature matrix to obtain a normalized quaternary feature matrix.

[0155] A6. Calculate the probability of image classification using the normalized quaternion feature matrix through the fully connected layer to obtain the network output vector.

[0156] As a specific implementation method, in this embodiment, a batch of images in the training dataset are read according to random categories, and the mean, variance normalization and adjustment of the image size to 32x32 3-channel RGB images are performed, and the corresponding label data are recorded.

[0157] A 32x32, 3-channel image is input into the image classification network model. After entering the model, a standard 1x1 convolution kernel with a stride of 1 is first used to adjust the channel dimension to 4, which corresponds to the quaternion q. a q b q c q dThe system has four components. The output is a 32x32 four-channel image feature matrix, which is a complete one-dimensional quaternion feature matrix. This is then fed into a quaternion convolutional layer with a kernel size of 3x3, feature edge padding of 1, stride of 1, and 32 quaternion kernels to extract quaternion image feature information. The output is a 32x32 quaternion feature matrix (a one-dimensional quaternion feature matrix consists of four components, each represented by one channel). Therefore, the "32-dimensional quaternion feature matrix" is essentially feature data with 32x4 = 128 channels. The arrangement of the quaternion matrix components is as follows: the first 0 to 31 channels are q... a Components, 32-63 channels are q b Components, 64-95 channels are q c Components, 96-127 channels are q d The feature data q of channels with the same channel number within each component. a q b q c q d The component is a complete four-element feature matrix; then the 32-dimensional four-element feature matrix is ​​input into the batch normalization layer, which performs mean and variance normalization operations on the feature data of each channel. The purpose is to adjust the distribution of the feature data to make it more stable and concentrated, which is conducive to the learning process of convolution parameters. The size of the output feature is consistent with the feature input to the batch normalization layer, which is a 32-dimensional 32x32 four-element feature matrix.

[0158] Next comes the parallel structure of the quaternary sigmoid activation function. The 32-dimensional 32x32 quaternary feature matrix is ​​input into two branches. One branch is the nonlinearly processed data obtained after the forward propagation calculation of the quaternary sigmoid activation function (Equations 4.9 and 4.10), and its output is a 32-dimensional 32x32 quaternary feature matrix.

[0159]

[0160]

[0161] Where q represents the quaternion image feature information, q a q represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. c The component k represents the imaginary part of the quaternary image feature information.

[0162] The first branch is followed by a standard convolution operation with a size of 1x1, a stride of 1, and 16 kernels, outputting a 32x32 16-dimensional quaternion feature matrix. The second branch performs the same single 1x1 convolution operation as the first, also outputting a 32x32 16-dimensional quaternion feature matrix. Finally, the channels from both branches are concatenated as quaternion feature matrices (creating two complete quaternion feature matrices from the two branches). The channel data is concatenated by separating the components sequentially and connecting corresponding components. The mathematical expression for the entire operation is: Output in, This represents a data concatenation operation along the channel dimension, where two quaternion matrices are concatenated into a single quaternion matrix to obtain a 32-dimensional (32x32) quaternion feature matrix. The features are then fed into a quaternion convolutional layer with a kernel size of 3x3, edge padding of 1, stride of 1, and 32 quaternion kernels to extract quaternion image feature information, outputting a 32x32 quaternion feature matrix. This is followed by batch normalization and ReLU activation function layers. The operations in these two layers are consistent with the previous ones: batch normalization normalizes the mean and variance of each channel's feature data input to this layer; the ReLU activation function layer processes the input feature data using the ReLU activation function (RELU activation function formula: RELU(input) = max(input, 0), where input represents the input data; max(input, 0) represents taking the larger value between 0 and the input data). The goal is the same as the previous batch normalization and activation function layers. Neither layer changes the size of the input feature matrix; the input and output feature data are consistent, and the output remains a 32-dimensional, 32x32 quadruple feature matrix. Although the dimension and size of the feature data remain unchanged, the feature matrix now contains more and deeper feature information because it has passed through more convolutional layers, batch normalization, and activation function layers.

[0163] Then, the 32-dimensional 32x32 quadruple feature matrix is ​​input into a 2x2 quadruple pooling layer with a stride of 2. The purpose is to reduce the influence of feature location on the output and improve the network's feature extraction performance. The output is a 32-dimensional 16x16 quadruple feature matrix.

[0164] After the pooling layer output, the feature data is input into two concatenated sub-network units consisting of a convolutional layer, batch normalization, and a ReLU activation function layer. The convolutional layer uses 64 quadruple convolutional kernels (3x3, padded to 1, stride 1) to extract deeper features from the input data, outputting a 64-dimensional 16x16 feature matrix. Batch normalization similarly normalizes the channel data by removing the mean and variance, resulting in more evenly distributed feature data with data concentrated around 0. The ReLU activation function layer processes the data using the ReLU activation function, outputting non-linearly processed feature data. Both concatenated sub-network units share the same operation and purpose, outputting a 64-dimensional 16x16 quadruple feature matrix. Using these two identical sub-networks in series deepens the network to extract deeper information from the feature data. More and deeper information improves the network's accuracy in image classification. The features are then input into a 2x2 quad pooling layer with a stride of 2. The purpose is also to extract significant features and reduce the influence of position on the features. The output is a 64-dimensional 8x8 quad feature matrix.

[0165] Finally, the extracted features are input into two fully connected layers. The purpose is to integrate the features extracted by previous convolutional operations for image classification. Two layers are used to increase the depth of the fully connected layers and enhance their feature processing capabilities. The input size of the first fully connected layer is 8x8x64x4 = 16384, and the output size is the same as the number of nodes in the fully connected layer, set to 512 here. After calculation by the first fully connected layer, the input 64-dimensional 8x8 quadruple feature matrix outputs a one-dimensional feature vector of length 512. The input of the second layer is this one-dimensional feature vector of length 512, and the output is a vector of length 10 (network output vector) consistent with the image categories in the dataset. The significance of these 10 numbers is generally interpreted as the "probability" that the input image is predicted by the network to belong to one of 10 image categories (arranged in a fixed order: "0: airplane, 1: car, 2: bird, 3: cat, 4: deer, 5: dog, 6: frog, 7: horse, 8: boat, 9: truck"). (Here, "probability" is not a true mathematical probability, but rather an interpretation of the physical quantity of the network's output data by researchers. Its meaning is similar to the physical meaning of mathematical probability, and there is a positive correlation. The larger the value, the greater the likelihood that the input image will be predicted by the network to belong to that category.)

[0166] A7. Calculate the loss value between the network output vector and the real label using the cross-entropy loss function.

[0167] In this embodiment, after obtaining the network output vector of length 10, the cross-entropy loss function is applied (the formula is: Where M represents the category of the dataset; p c y represents the value of the c-th element in the network output vector. c Let c be the sign function ("1" if c matches the true class of the image, "0" otherwise). The loss value is calculated between the network output vector and the true class vector of its corresponding image (where one true label position is 1 and the other nine are 0). This completes the forward propagation process of the entire network training.

[0168] A8. Perform backpropagation using the loss value and update the network parameters to obtain an image classification network based on the quaternary sigmoid activation function.

[0169] After obtaining the "forward propagation" process of the network, the gradient of each parameter in the network is calculated starting from the "loss value" along the "computation graph" of its computation process. This process is called "backpropagation," and it mainly involves calculating the gradient. The partial derivative of the loss value with respect to each network parameter, i.e., the gradient value, is calculated using the chain rule for partial derivatives. When the chain calculation reaches the Sigmoid activation function, the partial derivative (gradient) of the backward input with respect to each quaternary parameter component can be calculated using Equation 4.14. Since the purpose of training the network is to reduce the network's computational loss value, the update direction of the network parameters is the opposite direction of the gradient of the network parameters with respect to the loss value. This embodiment specifically uses the Adam algorithm to update the network parameters.

[0170] Repeat steps A1 to A8 until the network's classification performance reaches its maximum, i.e., the loss value and classification accuracy converge. At this point, network training is considered complete, and the network model, along with its parameters, is saved. Convergence confirmation is usually done manually. For example, if the accuracy reaches 90% after 80 training epochs and remains relatively stable for several consecutive epochs, convergence is considered achieved. A few more training epochs are typically performed.

[0171] The overall process of neural network training is as follows: Figure 6 As shown, the network parameters are trained by inputting training images and their corresponding image categories. Backpropagation is used to calculate the gradients needed for updating the network parameters. The goal of network training is to output a complete set of network parameters that enables high recognition accuracy after several rounds of gradient descent of the network loss value. Experiments show that the network converges within 100 iterations, so the training iteration period is specified as 100.

[0172] The general steps for using this model in this embodiment include:

[0173] Step 1: Take the mean, normalize the variance, and resize the image to a 32x32 RGB image.

[0174] Step 2: Read the network model that has been trained during the training phase and its corresponding network parameters.

[0175] Step 3: Input the image output from Step 1 into the network for calculation to obtain the probability value of the image being classified into 10 categories.

[0176] Step 4: Select the category with the highest probability value calculated by the network as the image classification category. This completes the task of classifying images using a network.

[0177] To more strongly demonstrate the effectiveness of this embodiment, six control experimental groups were designed as shown in Table 1 below:

[0178] Table 1. Experimental control group setup

[0179]

[0180] For experimental groups 1, 2, and 3, which contain parallel structures, the network model is as follows: Figure 4 As shown. Different experimental groups only need to change Figure 1 The activation function in the structure shown is sufficient.

[0181] For experimental groups 4, 5, and 6, which do not contain parallel structures, the network model is as follows: Figure 7 As shown. To ensure the consistency of model parameters and eliminate model differences caused by variations in production quantity, a 1×1 convolutional layer was added after the activation function module.

[0182] All experimental groups used the widely adopted Adam gradient descent learning algorithm. The learning rate was set to 0.0005, and a cosine annealing learning rate decay strategy was used, with a cosine period defined as one training epoch. The cross-entropy loss function was used as the cost function.

[0183] Experimental platform:

[0184] Hardware platform: GPU: TITAN XP; Video memory: 12GB

[0185] CPU: 7-core Intel(R) Xeon(R) CPU E5-2680 v4; Memory: 16GB

[0186] Software platform: PyTorch: 1.7.0, Python 3.8, CUDA 11.0

[0187] After multiple experiments, the model with the highest accuracy was selected as the final result, and its accuracy on the test dataset was plotted as follows: Figure 8 As shown.

[0188] from Figure 8 As can be seen, the quaternion sigmoid activation function structure proposed in this embodiment (i.e., Experiment 1) achieved the highest recognition accuracy and best performance. The highest recognition accuracy throughout the entire learning process was extracted, resulting in the following table:

[0189] Table 2 Network Experiment Results

[0190]

[0191] A comparison of Experiments 1, 2, and 3 shows that, under the same parallel network structure model, the quaternion activation function in this embodiment performs well, resulting in better generalization ability of the network. A comparison of Experiments 1 and 4 shows that the parallel structure proposed in this embodiment effectively overcomes the difficulty of training the Sigmoid function and enhances the network's ability to represent data distributions with different dimensions.

[0192] This embodiment provides an image classification method based on the quaternary Sigmoid activation function. First, the image to be classified is acquired. Then, a quaternary Sigmoid activation function image classification network is used to classify the image. The quaternary Sigmoid activation function image classification network includes a parallel structure layer. This parallel structure layer includes parallel quaternary Sigmoid activation function branches and convolutional branches. The quaternary Sigmoid activation function branches perform forward propagation calculations on the quaternary feature matrix using the quaternary activation function, followed by convolution operations to obtain quaternary feature activation processed data. The convolutional branches perform convolution operations on the quaternary feature matrix to obtain quaternary convolution processed data. Finally, the quaternary feature activation processed data and the quaternary convolution processed data are concatenated in the form of a quaternary feature matrix. By analyzing the quaternion exponential function and combining it with the commonly used real-valued Sigmoid activation function, a quaternion Sigmoid activation function is obtained. Using the relaxed LAC condition, the local resolvability of the quaternary Sigmoid function under the quaternion representation corresponding to commonly used nonlinear activation functions is demonstrated. The differential derivative of the quaternion sigmoid function is derived and used to update parameters in the backpropagation process of a neural network. A parallel structure suitable for the quaternion sigmoid activation function is proposed by combining jump connections and Inception structures, improving the network's ability to represent images of different dimensions. A quaternion nonlinear activation function is proposed, enriching the design components of quaternion neural networks in terms of activation functions. Based on quaternion functions satisfying relaxed CRF conditions, a function with local analyzability that can process quaternion data globally is proposed. Its local analyzability is obtained through computational derivation and applied to the gradient descent algorithm for quaternion activation functions. The parallel structure of the quaternion activation function improves the network's generalization ability, suppresses overfitting, and greatly enhances the network's ability to represent data of different dimensions, thereby improving the performance of the quaternion neural network. Because this invention utilizes the quaternion sigmoid activation function and its associated parallel structure, it can follow the quaternion arithmetic rules and satisfy the differentiability condition of deep learning backpropagation. This preserves the integrity of image data information, improves the accuracy of image classification, and effectively solves the problem in existing technologies where quaternions are split into four components for separate processing, failing to effectively utilize the information between channels. Furthermore, because this invention proposes a parallel network structure to complement it, the overall system can converge quickly to achieve optimal results.

[0193] Example 2:

[0194] like Figure 9 As shown, this embodiment provides an image classification system based on the quaternary sigmoid activation function, the system comprising:

[0195] Image acquisition unit M1 is used to acquire images to be classified;

[0196] Image classification unit M2 is used to classify the image to be classified using an image classification network based on the quadrature sigmoid activation function.

[0197] The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel;

[0198] The quadruple sigmoid activation function branch performs forward propagation calculation on the quadruple feature matrix using the quadruple activation function, and then performs a convolution operation to obtain quadruple feature activation processing data; the convolution branch performs a convolution operation on the quadruple feature matrix to obtain quadruple convolution processing data; the concatenation layer concatenates the quadruple feature activation processing data and the quadruple convolution processing data in the form of a quadruple feature matrix.

[0199] The system also includes: a network training module, used for:

[0200] Acquire training images;

[0201] The training images are extracted using a quadrilateral convolutional layer;

[0202] The quaternary image feature information is input into the quaternary Sigmoid activation function branch and the convolution branch respectively; the quaternary Sigmoid activation function branch performs forward propagation calculation on the quaternary image feature information using the quaternary activation function, and then performs convolution operation to obtain quaternary activation processing data; the convolution branch performs convolution operation on the quaternary image feature information to obtain convolution processing data.

[0203] The quaternary activation data and the convolutional data are concatenated in the form of a quaternary feature matrix to obtain a quaternary feature matrix.

[0204] Batch normalization and ReLU activation function operation are performed on the quaternary feature matrix to obtain a normalized quaternary feature matrix;

[0205] The probability of image classification is calculated using the normalized quaternion feature matrix through a fully connected layer, and the network output vector is obtained.

[0206] The loss value between the network output vector and the real label is calculated using the cross-entropy loss function;

[0207] The loss value is then used for backpropagation, and the network parameters are updated to obtain an image classification network based on the quaternary sigmoid activation function.

[0208] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0209] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An image classification method based on the quaternary sigmoid activation function, characterized in that, The method includes: Obtain the image to be classified; The image to be classified is classified using an image classification network based on the quadruple sigmoid activation function. The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel; The quadruple sigmoid activation function branch performs forward propagation calculation on the quadruple feature matrix using the quadruple activation function, and then performs a convolution operation to obtain quadruple feature activation processing data; the convolution branch performs a convolution operation on the quadruple feature matrix to obtain quadruple convolution processing data; the concatenation layer concatenates the quadruple feature activation processing data and the quadruple convolution processing data in the form of a quadruple feature matrix. The quaternary activation function is: q = q a +q b i+q c j+q d k Where q represents the quaternion image feature information, q a q represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. d The component representing the imaginary part k of the quaternion image feature information; The formula for calculating the division of quaternions in the quaternion activation function is as follows:

2. The image classification method based on the quaternary sigmoid activation function according to claim 1, characterized in that, After acquiring the image to be classified, the process also includes: The image to be classified is processed by taking the mean and normalizing the variance, and then adjusted to a 32x32 RGB image.

3. The image classification method based on the quaternary sigmoid activation function according to claim 1, characterized in that, The training process of the image classification network based on the four-gram sigmoid activation function specifically includes: Acquire training images; The training images are extracted using a quadrilateral convolutional layer; The quaternary image feature information is input into the quaternary Sigmoid activation function branch and the convolution branch respectively; the quaternary Sigmoid activation function branch performs forward propagation calculation on the quaternary image feature information using the quaternary activation function, and then performs convolution operation to obtain quaternary activation processing data; the convolution branch performs convolution operation on the quaternary image feature information to obtain convolution processing data. The quaternary activation data and the convolutional data are concatenated in the form of a quaternary feature matrix to obtain a quaternary feature matrix. Batch normalization and ReLU activation function operation are performed on the quaternary feature matrix to obtain a normalized quaternary feature matrix; The probability of image classification is calculated using the normalized quaternion feature matrix through a fully connected layer, and the network output vector is obtained. The loss value between the network output vector and the real label is calculated using the cross-entropy loss function; The loss value is then used for backpropagation, and the network parameters are updated to obtain an image classification network based on the quaternary sigmoid activation function.

4. The image classification method based on the quaternary sigmoid activation function according to claim 3, characterized in that, After performing batch normalization and ReLU activation function operations on the four-element feature matrix to obtain a normalized four-element feature matrix, the method further includes: The normalized quaternary feature matrix is ​​pooled using a quaternary pooling layer to obtain a pooled quaternary feature matrix. The pooled quadruple feature matrix is ​​subjected to convolution, batch normalization, and ReLU activation function operations in sequence.

5. The image classification method based on the quaternary sigmoid activation function according to claim 3, characterized in that, After acquiring the training images, the process also includes: The training images are subjected to mean and variance normalization operations, and the size of the training images is adjusted to a 32x32 3-channel RGB image.

6. The image classification method based on the quaternary sigmoid activation function according to claim 3, characterized in that, The extraction of quaternion image feature information from the training image using a quaternion convolutional layer specifically includes: The training images are subjected to a convolution operation with a stride of 1 to obtain a one-dimensional four-element feature matrix; The quaternary image feature information of the one-dimensional quaternary feature matrix is ​​extracted using a quaternary convolutional layer; the kernel size of the quaternary convolutional layer is 3x3, the feature edge padding is 1, the stride is 1, and the quaternary convolutional kernel size is 32.

7. The image classification method based on the quaternary sigmoid activation function according to claim 3, characterized in that, After extracting the four-element image feature information of the training image using the four-element convolutional layer, the method further includes: The mean and variance of each channel feature data of the quaternary image feature information are normalized.

8. An image classification system based on the quaternary sigmoid activation function, characterized in that, The system includes: Image acquisition unit, used to acquire images to be classified; An image classification unit is used to classify the image to be classified using an image classification network based on a quadratic sigmoid activation function. The image classification network based on the quadratic sigmoid activation function includes a parallel structure layer; the parallel structure layer includes: a splicing layer, a quadratic sigmoid activation function branch, and a convolutional branch; the quadratic sigmoid activation function branch and the convolutional branch are connected in parallel; The quadruple sigmoid activation function branch performs forward propagation calculation on the quadruple feature matrix using the quadruple activation function, and then performs a convolution operation to obtain quadruple feature activation processing data; the convolution branch performs a convolution operation on the quadruple feature matrix to obtain quadruple convolution processing data; the concatenation layer concatenates the quadruple feature activation processing data and the quadruple convolution processing data in the form of a quadruple feature matrix. The quaternary activation function is: q = q a +q b i+q c j+q d k Where q represents the quaternion image feature information, q a q represents the real component of the quaternion image feature information; b The component representing the imaginary part i of the quaternion image feature information; q c The component q represents the imaginary part j of the quaternion image feature information. d The component representing the imaginary part k of the quaternion image feature information; The formula for calculating the division of quaternions in the quaternion activation function is as follows:

Citation Information

Patent Citations

  • PolSAR data compression crop classification method based on NCSAE

    CN113469077A