A training method, system, and application method / system for an image classification model.

CN115601639BActive Publication Date: 2026-09-01NANCHANG HANGKONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

然而,由于这种方法采用的是浅层网络,所以网络过于简洁,能提取到的特征有限,导致图像分类的准确率较低

Benefits of technology

[0036]本发明提供了一种图像分类模型的训练方法、系统及应用方法、系统,基于四元数卷积神经网络构建图像分类模型,四元数卷积神经网络采用GoogleNet的Inception-V2结构,包括两层卷积层和四层Inception模块,每一卷积层对应的隐藏层采用Leakly ReLU函数,且每一Inception模块后设置有一批量归一化层,所述Inception模块用于提取不同尺度的图像特征,并经批量归一化层对图像特征进行自动归一化,所述Leakly ReLU函数用于在模型训练时持续对模型参数进行更新并确定最优解。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601639B_ABST
    Figure CN115601639B_ABST
Patent Text Reader

Abstract

This invention relates to a training method, system, and application method / system for an image classification model, belonging to the field of image classification. The training method includes: constructing an image classification model based on a quaternion convolutional neural network; acquiring a dataset containing several image samples, each labeled with a corresponding category; sequentially performing tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images; inputting the preprocessed images into the image classification model; determining a loss function based on the output of the image classification model and the actual category corresponding to the input image; optimizing the parameters of the image classification model based on the loss function to train the image classification model, thereby obtaining a trained image classification model. This method can obtain an image classification model with higher classification accuracy, improving image classification precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification technology in image processing, and in particular to a training method, system, and application method and system for an image classification model. Background Technology

[0002] With the rapid development of the digital age, machines are able to do more things for humans. Examples include ETC automatic toll collection on highways, license plate recognition in parking lots, and object recognition via mobile phone photography. These activities all require machines to recognize the images they receive, accurately identify numbers and letters on license plates, and recognize plants or animals in images. Therefore, image classification is an essential technology.

[0003] Current mainstream image classification methods include those based on quaternion convolutional neural networks (CNNs). This method primarily uses quaternion matrices to represent images, inputs them into the CNN, and utilizes the information between channels for image classification. However, because this method employs shallow networks, the networks are too simple, resulting in limited feature extraction and low image classification accuracy. Furthermore, this method commonly uses the ReLU function, which is very fragile during neural network training, easily causing neurons to become inactive. Often, excessively large gradients in the input function lead to neurons losing their activation function after network parameter updates, further reducing the accuracy of the neural network model's image classification. Summary of the Invention

[0004] The purpose of this invention is to provide a training method, system, and application method / system for an image classification model, which can effectively improve the accuracy of image classification.

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

[0006] On the one hand, this invention proposes a training method for an image classification model, comprising the following steps:

[0007] An image classification model is constructed based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, which includes two convolutional layers and four Inception modules connected in sequence. The hidden layer corresponding to each convolutional layer adopts the Leakly ReLU function, and a batch normalization layer is set after each Inception module. The Inception module is used to extract image features at different scales, and the image features are automatically normalized by the batch normalization layer. The Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training.

[0008] Obtain a dataset, which includes several image samples, and each image sample is labeled with a corresponding category label;

[0009] Tensor transformation and standardization are performed sequentially on all image samples in the dataset to obtain preprocessed images;

[0010] The preprocessed image is input into the image classification model;

[0011] The loss function is determined based on the output of the image classification model and the actual category corresponding to the input image;

[0012] The parameters of the image classification model are optimized according to the loss function to train the image classification model and obtain a trained image classification model.

[0013] Optionally, after performing tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images, and before inputting the preprocessed images into the image classification model, the image classification method further includes:

[0014] The preprocessed images are divided to obtain training set samples, validation set samples, and test set samples;

[0015] The training set samples are used as preprocessed image samples and input into the image classification model for training.

[0016] Optionally, optimizing the parameters in the image classification model based on the loss function to train the image classification model and obtain a trained image classification model specifically includes:

[0017] During model training, image features are extracted through forward propagation of the image classification model, and the parameters of the image classification model are updated through back propagation based on the value of the loss function, thus obtaining a trained image classification model.

[0018] Optionally, the dataset used is the CIFAR-10 dataset from torchvision, PyTorch's vision toolkit.

[0019] On the other hand, the present invention also proposes an application method for an image classification model, comprising the following steps:

[0020] Obtain the target image to be classified;

[0021] The target image to be classified is input into an image classification model to obtain the category of the target image to be classified; the image classification model is a model trained according to the image classification model training method described above.

[0022] On the other hand, the present invention also proposes a training system for an image classification model, comprising:

[0023] An image classification model building module is used to construct an image classification model based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, which includes two convolutional layers and four Inception modules connected in sequence. The hidden layer corresponding to each convolutional layer adopts the Leakly ReLU function, and a batch normalization layer is set after each Inception module. The Inception module is used to extract image features at different scales, and the image features are automatically normalized by the batch normalization layer. The Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training.

[0024] The dataset acquisition module is used to acquire a dataset, which includes several image samples, and each image sample is labeled with a corresponding category label;

[0025] The preprocessing module is used to sequentially perform tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images;

[0026] The first input module is used to input the preprocessed image into the image classification model;

[0027] The loss function determination module is used to determine the loss function based on the output of the image classification model and the actual category corresponding to the input image.

[0028] The training module is used to optimize the parameters in the image classification model according to the loss function, so as to train the image classification model and obtain a trained image classification model.

[0029] Optionally, the training system for the image classification model further includes:

[0030] The sample partitioning module is used to partition the preprocessed image to obtain training set samples, validation set samples, and test set samples.

[0031] The second input module is used to input the training set samples as preprocessed image samples into the image classification model for training.

[0032] On the other hand, the present invention also proposes an application system for an image classification model, comprising:

[0033] The target image acquisition module is used to acquire the target image to be classified.

[0034] The third input module is used to input the target image to be classified into the image classification model to obtain the category of the target image to be classified; the image classification model is a model trained according to the image classification model training method described above.

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

[0036] This invention provides a training method, system, and application method / system for an image classification model. The image classification model is constructed based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, including two convolutional layers and four Inception modules. The hidden layer corresponding to each convolutional layer uses the Leakly ReLU function, and each Inception module is followed by a batch normalization layer. The Inception module is used to extract image features at different scales, and the batch normalization layer automatically normalizes the image features. The Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training.

[0037] This invention utilizes a quaternion convolutional neural network, the Inception module, and the Leaky ReLU function as core methods to improve the model's classification accuracy. First, the quaternion convolutional neural network enables parallel processing of the R, G, and B channels of an image, extracting more image features and thus solving the problem of low classification accuracy caused by the limited feature extraction of shallow networks in existing technologies. Second, the Inception module structure possesses both depth and width, allowing for simultaneous convolution and aggregation at multiple dimensions, extracting features at different scales, resulting in richer features and more accurate image classification. Third, the Leaky ReLU function replaces the traditional ReLU function as the activation function. The Leaky ReLU function possesses all the advantages of the ReLU function, extracting more information and finding a better solution during parameter updates during model training. This solves the problem that the traditional ReLU function easily deactivates neurons during neural network training, reducing classification accuracy. Therefore, it effectively improves image classification accuracy and yields accurate and reliable image classification results. Attached Figure Description

[0038] 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 described 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. The following drawings are not intentionally drawn to scale to actual size; their focus is on illustrating the main points of the present invention.

[0039] Figure 1 A flowchart illustrating a training method for an image classification model provided in Embodiment 1 of the present invention;

[0040] Figure 2 This is a schematic diagram of the structure of the image classification model provided in Embodiment 1 of the present invention;

[0041] Figure 3 This is a schematic diagram illustrating the principle of training the image classification model provided in Embodiment 1 of the present invention.

[0042] Figure 4 This is a schematic diagram of the Inception module provided in Embodiment 1 of the present invention;

[0043] Figure 5 This is a flowchart of the application method of the image classification model provided in Embodiment 2 of the present invention;

[0044] Figure 6 This is a structural block diagram of the training system for the image classification model provided in Embodiment 3 of the present invention;

[0045] Figure 7 This is a structural block diagram of the application system of the image classification model provided in Embodiment 2 of the present invention.

[0046] Definitions:

[0047] Deep learning: Deep learning originated from the research of artificial neural networks. "Deep" refers to the number of hidden layers in the neural network. Deep learning refers to the process of extracting and combining low-level features through neural networks to form more abstract high-level representations of attribute categories or features in order to discover the distributed feature representations of data.

[0048] Quaternions: Quaternions are hypercomplex numbers and are a generalization of real and complex numbers. They have one real part and three imaginary parts, and are of the form q = a + bi + cj + dk, where a, b, c, d ∈ R.

[0049] Batch Normalization (BN): Since the changes in the distribution of nodes within a deep network during training are considered internal covariate shifts, eliminating these shifts can provide faster training. Batch normalization is used to reduce internal covariate shifts, which can greatly accelerate the training of deep neural networks.

[0050] Convolutional Neural Networks (CNNs) are a type of feedforward neural network. They are inspired by the biological mechanism of receptive fields. Receptive fields primarily refer to properties of neurons in the auditory, proprioceptive, and visual systems. Artificial neurons can respond to surrounding units and can be used for large-scale image processing. A CNN consists of convolutional layers and pooling layers.

[0051] Convolutional layers: These are mainly used to extract local features of an image through convolution.

[0052] Convolution kernel: An operator, specifically the weight matrix used in convolution. This matrix is ​​the same size as the image region used, and has an odd number of rows and columns.

[0053] Max pooling: Generally used after convolutional layers, it maximizes the feature points in the neighborhood based on the correlation between adjacent data, which can reduce dimensionality without losing too much information.

[0054] Activation functions: Activation functions play a crucial role in enabling artificial neural network models to learn and understand highly complex and nonlinear functions. They refer to how to preserve and map the features of activated neurons through a function.

[0055] Loss function: a standard for measuring the quality of a trained model, and generally, functions that are easy to optimize are preferred as the standard.

[0056] Gradient descent optimization learning algorithm: Gradient descent is one of the most popular methods in the optimization process and is widely used in the optimization of neural networks. It is a method to minimize the objective function by updating the parameters in the opposite direction of the gradient of the objective function. It goes down along the slope direction of the ramp generated by the objective function until it reaches the bottom.

[0057] Learning rate (lr): The speed at which trainable parameters reach their optimal values ​​during gradient descent optimization. Its value determines the magnitude of gradient descent during optimization, and directly influences the performance of the learning algorithm.

[0058] Dropout: In the training process of deep learning networks, neural network units are temporarily dropped from the network with a certain probability to prevent overfitting.

[0059] Inception is a key architecture in GoogleNet that performs multiple convolutional or pooling operations in parallel on the input image and concatenates all outputs into a very deep feature map. Its main characteristic is increased network width. Detailed Implementation

[0060] 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.

[0061] As indicated in this invention and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0062] While this invention makes various references to certain modules in systems according to embodiments of the invention, any number of different modules can be used and run on user terminals and / or servers. The modules are merely illustrative, and different aspects of the systems and methods may use different modules.

[0063] This invention uses flowcharts to illustrate the operations performed by the system according to embodiments of the invention. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously, as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0064] Current image classification models include LeNet, AlexNet, VGG networks, ResNet, the Inception series, GoogleNet, and DenseNet. Among them, LeNet, though small, includes the basic modules of deep learning: convolutional layers, pooling layers, and fully connected layers, forming the foundation of deep learning models. AlexNet, a pioneering work in deep learning, utilizes many modern data processing methods and achieves good results. VGG networks use small convolutional and pooling kernels, have deeper layers, and wider feature maps. ResNet uses residual blocks and batch normalization (BN) layers to address model degradation issues and mitigate gradient vanishing and exploding. However, all of these image classification models use real-valued convolutions, failing to utilize the correlation between the three channels of a color image. Therefore, traditional convolutional neural networks generally process the three channels of a color image separately, ignoring the correlation between channels, leading to poor classification accuracy and performance.

[0065] Based on this, the purpose of this invention is to provide a training method, system, and application method / system for an image classification model, aiming to improve the accuracy of image classification.

[0066] 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.

[0067] Example 1

[0068] like Figure 1 As shown, this embodiment provides a training method for an image classification model, specifically including the following steps:

[0069] Step S1: Construct an image classification model based on a quaternion convolutional neural network.

[0070] Step S2: Obtain the dataset, which includes several image samples, and each image sample is labeled with a corresponding category label.

[0071] Step S3: Perform tensor transformation and standardization on all image samples in the dataset in sequence to obtain preprocessed images.

[0072] Step S4: Input the preprocessed image into the image classification model.

[0073] Step S5: Determine the loss function based on the output of the image classification model and the actual category corresponding to the input image.

[0074] Step S6: Optimize the parameters of the image classification model according to the loss function to train the image classification model and obtain a trained image classification model.

[0075] like Figure 2As shown, when constructing the image classification model, the quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, replacing all real-valued convolutions in the Inception structure with quaternion convolutions. The quaternion convolutional neural network includes two convolutional layers and four Inception modules connected in sequence. The hidden layer corresponding to each convolutional layer uses the Leakly ReLU function, and a batch normalization layer is set after each Inception module. The four Inception modules include the first Inception module, the second Inception module, the third Inception module, and the fourth Inception module. After the first Inception module, the third Inception module, and the fourth Inception module, there is a max pooling layer. After the max pooling layer corresponding to the fourth Inception module, there is an average pooling layer. The dropout rate is 0.5. After the average pooling layer, there is a quaternion fully connected layer and a normal fully connected layer in sequence.

[0076] The Inception module is used to extract image features at different scales and automatically normalize the image features through a batch normalization layer. The Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training.

[0077] In this embodiment, as Figure 2 As shown, the first and second convolutional layers both have a 1x1 kernel size, the first max pooling layer has a 3x3 kernel size with a stride of 2, and subsequent pooling layers all have a 2x2 kernel size with a stride of 2. The dropout rate is 0.5. The specific Inception structure is as follows: Figure 4 As shown, a 5x5 convolution is replaced by two 3x3 convolutions. This increases the network depth, enhances the ability to express non-linear features, and reduces the number of network parameters. A 5x5 convolution has 5×5=25 parameters, while two 3x3 convolutions have 3×3×2=18 parameters. It should be noted that the padding of the 3x3 quaternion convolution kernel pooling layers is all 1, so the image size remains unchanged after passing through the Inception module.

[0078] In designing the image classification model, this invention first utilizes traditional real-valued convolution to enlarge the input data from 3D to 4D. Simultaneously, based on the results of multiple experiments, the network depth is set to 13 layers (including hidden layers and output layers), with four layers being Inception modules. A batch normalization (BN) layer is added after each Inception module. This ensures automatic normalization of the data distribution after feature extraction, saving time for the network to learn and adapt to the new data distribution and improving model training efficiency. Finally, the Leakly ReLU activation function is used in the hidden layers. It possesses all the advantages of the ReLU function while also addressing the drawback of some neurons not being activated or dying in the ReLU function. This invention, by combining BN layers and the Leakly ReLU function, achieves a significant improvement in both classification efficiency and accuracy.

[0079] In this embodiment, the dataset used is the CIFAR-10 dataset from torchvision, PyTorch's vision toolkit. The CIFAR-10 dataset contains 10 categories, 50,000 training images, and 10,000 test images. Each image is a RGB three-channel color image with a size of 32x32. The 10 category labels include: plane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck.

[0080] It is easy to understand that the dataset and training samples used in this embodiment are not fixed or unique, and can be selected according to the actual situation.

[0081] Before training the model, this invention requires converting all image samples in the dataset into tensors and standardizing them. This converts the data into a standard normal distribution, making the model more likely to converge.

[0082] This embodiment uses the cross-entropy loss function to calculate the loss. The optimization algorithm is stochastic gradient descent with an impulse of 0.9, a mini-batch size of 128, and a total of 30 training epochs. During training, a cyclic learning rate (CLR) policy is used to set the learning rate for each parameter group. This strategy cyclically changes the learning rate between two boundaries at a constant frequency, with a lower bound of 0.003 and an upper bound of 0.01. The cross-entropy loss function is as follows:

[0083]

[0084] Where n represents the number of training samples, i represents the i-th training sample, and y i Represents the category label value, yi ′ represents the predicted value.

[0085] like Figure 3 As shown, the training and image classification process of the image classification model of this invention essentially includes: First, converting all images into tensors (ToTensor). This step divides all numbers by 255 to normalize the data to the range [0, 1], and then performs normalization processing with a mean of 0.5 and a standard deviation of 0.5, distributing the data between [-1, 1]. This step scales the data proportionally to make it fall into a small, specific interval. The unit restrictions on the data are removed, transforming it into dimensionless pure numerical values, facilitating comparison and weighting of indicators of different units or magnitudes. The ultimate goal is to accelerate the convergence speed of the model, improve its accuracy, and prevent gradient explosion. Next, the images are divided into training, validation, and test sets. Then, the images are loaded into the data loader with a batch size of 128, meaning 128 images are retrieved each time. The model is then instantiated, using the cross-entropy function as the loss function, and employing a recurrent learning rate policy and stochastic gradient descent algorithm. Finally, the model is trained, features are extracted, and forward propagation is performed. Simultaneously, parameters are updated via backpropagation based on the loss function value. Validation is performed using a validation set after each training round; backpropagation is not performed during the validation and testing phases. Finally, training ends after 30 iterations, the model is saved, and it is evaluated using a test set to determine the model's accuracy.

[0086] In this embodiment, after performing tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images, and before inputting the preprocessed images into the image classification model, the image classification method further includes:

[0087] The preprocessed image is divided into training set samples, validation set samples, and test set samples; and the training set samples are used as preprocessed image samples and input into the image classification model for training.

[0088] The training set consists of 50,000 images. The validation set consists of 5,000 images selected from the test set, used for validation after each training iteration. The final test set consists of 10,000 images fed into the trained network model for performance testing and evaluation.

[0089] In this embodiment, step S6 optimizes the parameters of the image classification model according to the loss function to train the image classification model and obtain a trained image classification model, specifically including:

[0090] During model training, image features are extracted through forward propagation of the image classification model, and the parameters of the image classification model are updated through back propagation based on the value of the loss function, thus obtaining a trained image classification model.

[0091] It should be noted that in some other embodiments, the convolutional and pooling layers in a quaternion convolutional neural network can also be used to extract useful information and features from the image. Then, the extracted image features are reconstructed using a deconvolutional network, i.e., by upsampling through convolutional and pooling layers. Finally, using cross-entropy as the target loss function, a stochastic gradient descent optimization algorithm is employed to iteratively train and optimize the target loss function for a preset number of rounds (the number of rounds is determined based on experimental data). This implementation method achieves higher classification accuracy and better classification performance than traditional classification methods based on shallow quaternion networks.

[0092] To verify that the present invention has higher classification accuracy and effect than existing related technologies, experiments were conducted below. All experiments were performed in a Python 3.8.5 environment on a PC with an Intel(R) Core(TM) i7-10875H CPU@2.30GHz and an NVIDIA GeForce RTX 2060.

[0093] (1) The final classification effect of the present invention is measured by the classification accuracy and compared with the classification effect of traditional methods and QCNN. The test accuracy of each method is shown in Table 1:

[0094] Table 1 Comparison of Test Accuracy Results

[0095] Shallow real-value networks Cifar-10 0.7546 Shallow Quaternion Network (QCNN) Cifar-10 0.7778 Real-valued Inception Cifar-10 0.8205 This invention (Quaternion Inception) Cifar-10 0.8471

[0096] (2) The number of parameters of real-valued convolution and quaternion convolution are compared. The parameters are all calculated and generated by calling the summary method in torchsummary. The comparison results of the number of parameters are shown in Table 2:

[0097] Table 2 Comparison of Parameter Quantities

[0098] Overall parameters 6810 1438938 Trainable parameters 4186 1438938 Untrainable parameters 2624 0

[0099] According to Tables 1 and 2, it can be seen that the method of the present invention is indeed superior to shallow quaternion networks and real-valued networks in terms of classification accuracy. At the same time, the method of the present invention reduces the number of parameters significantly under the same conditions as real-valued convolutional neural networks.

[0100] This invention primarily utilizes quaternion convolutional neural networks, the Inception structure, and the Leaky ReLU function to improve classification accuracy. First, the quaternion convolutional neural network can process the three channels of an image in parallel, extracting more features and achieving stronger representational capabilities. Second, the Inception structure, possessing both depth and width, can perform convolution and aggregation simultaneously at multiple scales, extracting features at different scales and resulting in richer features. Different convolutional operations and pooling operations, such as 1x1, 3x3, or 5x5, within the Inception structure can obtain different information from the input image. Parallel processing of these operations and combining all results yields better image representation, meaning more accurate final classification. Furthermore, by using the Leaky ReLU function instead of the ReLU function, the advantages of ReLU are retained while overcoming its shortcomings. This fully utilizes available image information, making image feature learning more efficient and comprehensive. The Leaky ReLU function can address the problem of neuron inactivation or death, allowing computation to continue, extracting more information, finding better solutions, and updating parameters, thereby improving classification accuracy.

[0101] Example 2

[0102] Corresponding to the image classification model training method in Example 1, this example also proposes an application method for the image classification model, which is an application method based on the model trained in Example 1, such as... Figure 5 As shown, this application method specifically includes the following steps:

[0103] Step A1: Obtain the image of the target to be classified;

[0104] Step A2: Input the target image to be classified into the image classification model to obtain the category of the target image to be classified; the image classification model is a model trained according to the image classification model training method described above.

[0105] Example 3

[0106] Corresponding to the image classification model training method in Example 1, this example proposes an image classification model training system, such as... Figure 6 As shown, it specifically includes:

[0107] The image classification model building module M1 is used to build an image classification model based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, which includes two convolutional layers and four Inception modules connected in sequence. The hidden layer corresponding to each convolutional layer adopts the Leakly ReLU function, and a batch normalization layer is set after each Inception module. The Inception module is used to extract image features at different scales, and the image features are automatically normalized by the batch normalization layer. The Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training.

[0108] The dataset acquisition module M2 is used to acquire a dataset, which includes several image samples, and each image sample is labeled with a corresponding category label;

[0109] The preprocessing module M3 is used to perform tensor transformation and standardization on all image samples in the dataset in sequence to obtain preprocessed images;

[0110] The first input module M4 is used to input the preprocessed image into the image classification model;

[0111] The loss function determination module M5 is used to determine the loss function based on the output of the image classification model and the actual category corresponding to the input image;

[0112] The training module M6 is used to optimize the parameters in the image classification model according to the loss function, so as to train the image classification model and obtain a trained image classification model.

[0113] In this embodiment, the training system for the image classification model further includes:

[0114] The sample partitioning module is used to partition the preprocessed image to obtain training set samples, validation set samples, and test set samples.

[0115] The second input module is used to input the training set samples as preprocessed image samples into the image classification model for training.

[0116] Example 4

[0117] Corresponding to the application method of the image classification model in Example 2, this example proposes an application system for the image classification model, such as... Figure 7 As shown, it specifically includes:

[0118] The target image acquisition module N1 is used to acquire the target image to be classified;

[0119] The third input module N2 is used to input the target image to be classified into the image classification model to obtain the category of the target image to be classified; the image classification model is a model trained according to the image classification model training method described above.

[0120] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.

[0121] The above description is illustrative of the invention and should not be construed as limiting it. Although several exemplary embodiments of the invention have been described, those skilled in the art will readily understand that many modifications can be made to the exemplary embodiments without departing from the novelty and advantages of the invention. Therefore, all such modifications are intended to be included within the scope of the invention as defined in the claims. It should be understood that the above description is illustrative of the invention and should not be construed as limiting it to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The invention is defined by the claims and their equivalents.

Claims

1. A training method for an image classification model, characterized in that, Includes the following steps: An image classification model is constructed based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 architecture, replacing all real-valued convolutions in the Inception architecture with quaternion convolutions. It includes two convolutional layers and four quaternion Inception modules connected sequentially. All convolutional operations within each quaternion Inception module are quaternion convolutions. The hidden layers corresponding to each convolutional layer use the Leakly ReLU function, and each quaternion Inception module is followed by a batch normalization layer. The four quaternion Inception modules include a first Inception module, a second Inception module, a third Inception module, and a fourth Inception module. Each of the first, third, and fourth Inception modules is followed by a max-pooling layer. The fourth Inception module is followed by an average pooling layer after its max-pooling layer. After the average pooling layer, a quaternion fully connected layer and a regular fully connected layer are sequentially placed. The kernel size of the first and second convolutional layers is 1.

1. The size of the first max pooling layer is 3.

3. The step size is 2, and the size of the subsequent pooling layers is also 2. 2, step size is 2, Dropout drop rate is 0.5, 5 The 5-convolution uses two 3-bit convolutions. The convolutions are replaced with 3x3 to increase the network depth, enhance the ability to express non-linear features, and also reduce the number of network parameters. The padding of the quaternion convolutional kernel pooling layer is all 1, ensuring that the size of the image does not change after passing through each Inception module; the quaternion Inception module is used to extract image features at different scales, and the image features are automatically normalized by the batch normalization layer; the Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training. Obtain a dataset, which includes several image samples, and each image sample is labeled with a corresponding category label; Tensor transformation and standardization are performed sequentially on all image samples in the dataset to obtain preprocessed images; The preprocessed image is input into the image classification model; The loss function is determined based on the output of the image classification model and the actual category corresponding to the input image; The parameters of the image classification model are optimized according to the loss function to train the image classification model and obtain a trained image classification model.

2. The training method for the image classification model according to claim 1, characterized in that, After performing tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images, and before inputting the preprocessed images into the image classification model, the image classification method further includes: The preprocessed images are divided to obtain training set samples, validation set samples, and test set samples; The training set samples are used as preprocessed image samples and input into the image classification model for training.

3. The training method for the image classification model according to claim 1, characterized in that, The step of optimizing the parameters in the image classification model according to the loss function to train the image classification model and obtain a trained image classification model specifically includes: During model training, image features are extracted through forward propagation of the image classification model, and the parameters of the image classification model are updated through back propagation based on the value of the loss function, thus obtaining a trained image classification model.

4. The training method for the image classification model according to claim 1, characterized in that, The dataset used is the CIFAR-10 dataset from torchvision, PyTorch's vision toolkit.

5. An application method for an image classification model, characterized in that, Includes the following steps: Obtain the target image to be classified; The target image to be classified is input into an image classification model to obtain the category of the target image to be classified; the image classification model is a model trained by the training method of the image classification model according to any one of claims 1-4.

6. A training system for an image classification model, characterized in that, include: An image classification model construction module is used to build an image classification model based on a quaternion convolutional neural network. The quaternion convolutional neural network adopts the GoogleNet Inception-V2 structure, replacing all real-valued convolutions in the Inception structure with quaternion convolutions. It includes two sequentially connected convolutional layers and four quaternion Inception modules. All convolutional operations within each quaternion Inception module are quaternion convolutions. The hidden layers corresponding to each convolutional layer use the Leakly ReLU function, and each quaternion Inception module is followed by a batch normalization layer. The four quaternion Inception modules include a first Inception module, a second Inception module, a third Inception module, and a fourth Inception module. Each of the first, third, and fourth Inception modules is followed by a max-pooling layer. The fourth Inception module is followed by an average pooling layer after its max-pooling layer. After the average pooling layer, a quaternion fully connected layer and a regular fully connected layer are sequentially placed. The kernel size of the first and second convolutional layers is 1.

1. The size of the first max pooling layer is 3.

3. The step size is 2, and the size of the subsequent pooling layers is also 2. 2, step size is 2, Dropout drop rate is 0.5, 5 The 5-convolution uses two 3-bit convolutions. The convolutions are replaced with 3x3 to increase the network depth, enhance the ability to express non-linear features, and also reduce the number of network parameters. The padding of the quaternion convolutional kernel pooling layer is all 1, ensuring that the size of the image does not change after passing through each Inception module; the quaternion Inception module is used to extract image features at different scales, and the image features are automatically normalized by the batch normalization layer; the Leakly ReLU function is used to continuously update the model parameters and determine the optimal solution during model training. The dataset acquisition module is used to acquire a dataset, which includes several image samples, and each image sample is labeled with a corresponding category label; The preprocessing module is used to sequentially perform tensor transformation and standardization on all image samples in the dataset to obtain preprocessed images; The first input module is used to input the preprocessed image into the image classification model; The loss function determination module is used to determine the loss function based on the output of the image classification model and the actual category corresponding to the input image. The training module is used to optimize the parameters in the image classification model according to the loss function, so as to train the image classification model and obtain a trained image classification model.

7. The training system for the image classification model according to claim 6, characterized in that, The training system for the image classification model also includes: The sample partitioning module is used to partition the preprocessed image to obtain training set samples, validation set samples, and test set samples. The second input module is used to input the training set samples as preprocessed image samples into the image classification model for training.

8. An application system for an image classification model, characterized in that, include: The target image acquisition module is used to acquire the target image to be classified. The third input module is used to input the target image to be classified into the image classification model to obtain the category of the target image to be classified; the image classification model is a model trained by the training method of the image classification model according to any one of claims 1-4.