Multi-scale GCNN network model construction method based on spatial pyramid pooling

Through the introduction of the spatial pyramid pooling layer and multi -scale input strategy in the GCNN network, the problem of limited ability to recognize different scale changes in convolutional neural networks has been solved. Sexuality with overfitting risks.

CN119378602AActive Publication Date: 2025-01-28HEFEI UNIV OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411386316.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-28
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing convolutional neural network has limited ability to recognize images of different scales and complex network design, which increases the difficulty of training and the risk of overfitting.

Method used

Adopt a multi -scale GCNN network model construction method based on the spatial pyramid -based pyramidization, through multi -scale input strategies, convolutional layers, and spatial pyramid pooling layers, extract different scale and hierarchical features, combined with cross -entropy loss functions and ADAM optimizers for model training Essence

Benefits of technology

Effectively handle different sizes of images, enhance the model's identification ability of the model, simplify the network design and training process, and reduce overfitting risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378602A_ABST
    Figure CN119378602A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-scale GCNN network model construction method based on spatial pyramid pooling, relates to an extendable convolutional neural network GCNN correlation algorithm, and solves the technical problems of limited scale recognition capability, complex network model design and difficult training of an existing method. Comprising the following steps: acquiring a CIFAR-100 data set and preprocessing an image; a multi-scale input strategy is adopted in a GCNN model, feature extraction is carried out in combination with a convolutional layer and a spatial pyramid pooling layer, and a network structure capable of capturing features of different scales and levels is constructed. And a cross entropy loss function is selected to evaluate classification differences, an Adam optimizer is used to update parameters, and a back propagation algorithm is used to iterate model weights so as to carry out multi-scale feature learning and optimization. And evaluating and optimizing the GCNN network model according to the evaluation index. According to the method, the complexity of model design can be reduced, the identification capability of scale change is enhanced, and the accuracy of the model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to a growable convolutional neural network (GCNN) related algorithm, and specifically is a multi-scale GCNN network model construction method based on spatial pyramid pooling. Background Art

[0002] In dealing with multi-scale problems, although the convolutional neural network (CNN) can achieve image translation, rotation and scale invariance to a certain extent, its ability to recognize scale changes is still limited. The traditional processing method is to increase the scale of the network model and apply scale jitter strategies to enhance the model's ability to recognize images of different scales, but it also increases the complexity of the model and the difficulty of training, which easily leads to overfitting. The network structure of the growing convolutional neural network (GCNN) can be dynamically adjusted with the input samples, automatically find an adaptation structure suitable for the complexity of the target task, and has a certain online learning ability. Through its dynamic growth characteristics, GCNN can gradually add new convolutional layers or adjust the parameters of existing layers during the training process to better adapt to data of different scales.

[0003] Existing methods still have the following problems in dealing with multi-scale issues:

[0004] (1) Limited scale recognition capability: Convolutional neural networks have limited ability to recognize images of different scales and lack an effective mechanism to handle multi-scale problems.

[0005] (2) Complex network design: Existing methods design filters and scale normalization operations at different levels, which increases the design complexity and training difficulty of the network model. Summary of the invention

[0006] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a multi-scale GCNN network model construction method based on spatial pyramid pooling, which solves the technical problems of limited scale recognition ability, complex network model design and difficult training of the existing methods.

[0007] To achieve the above object, the present invention provides a method for constructing a multi-scale GCNN network model based on spatial pyramid pooling, comprising:

[0008] Step 1: Data preprocessing: Obtain the CIFAR-100 dataset and preprocess the images in the CIFAR-100 dataset, wherein the preprocessing includes: image scaling, standardization, and data enhancement;

[0009] Step 2: Network architecture design: In the GCNN model, a multi-scale input strategy is adopted, combined with convolutional layers and spatial pyramid pooling layers, to extract features from the pre-processed images of the CIFAR-100 dataset and build a network structure that captures features of different scales and levels;

[0010] Step 3: Model training: cross entropy loss function is used to evaluate classification differences, and Adam optimizer is used to update parameters. The model weights are iterated through the back propagation algorithm to learn and optimize multi-scale features of the GCNN network model.

[0011] Step 4: Model evaluation and optimization: Evaluate and optimize the GCNN network model according to the evaluation indicators, including accuracy, precision, recall and F1 score.

[0012] Preferably, the image scaling includes: when the network starts to grow from the input layer, the GCNN network performs a scale adjustment operation on the input image, assuming T is a set of scaling ratios, T = {T1, ..., T N}, T i (i=1,…,N) represents the scaling ratio of the input image when the network grows for the i-th time in the input layer; five scaling ratios are set: T={0.5,0.75,1.0,1.25,1.5}, and the image is scaled to 16×16, 24×24, 32×32, 40×40 and 48×48 pixels respectively; when T i =T N When , GCNN stops growing; let the input image be I, the output of the first scale transformation convolution layer and the output of the sampling layer

[0013]

[0014] Where k represents a 3×3 convolution kernel with a stride of 1 and padding of 1, * represents a convolution operation, b represents a bias, down(.) represents a downsampling function, m×m represents the size of the sampling layer, b represents a bias, and σ represents a ReLu activation function;

[0015] The output of the second scale-transformed convolutional layer and the output of the sampling layer

[0016]

[0017] The present invention performs image scaling processing on images of the CIFAR-100 data set, which helps to improve the robustness of the model to scale changes.

[0018] Preferably, the standardization normalizes the pixel values ​​of each image in the CIFAR-100 dataset to the range of [0, 1]; the data enhancement performs random horizontal flipping, random cropping, color jittering and noise addition operations on the images during training.

[0019] The present invention helps to accelerate the convergence speed of model training by standardizing the images of the CIFAR-100 dataset, while avoiding numerical calculation problems; data enhancement can increase the diversity of the dataset, reduce the risk of model overfitting, and improve the generalization ability of the model.

[0020] Preferably, the combination of the convolution layer and the spatial pyramid pooling layer to extract features from the preprocessed CIFAR-100 dataset image includes: using the spatial pyramid pooling layer SPP to process images of different sizes, assuming that the number of spatial blocks in the second level of the SPP layer is n×n, and the output of the last convolution layer is The size of is a×a, then the sampling window size of the second level is The step length is and They represent the rounding up and rounding down operations respectively, that is, the fixed-size window of the second sampling layer of the original GCNN is changed to an adaptive window size, and the window size is proportional to the input image; assuming that the SPP layer contains L pooling levels, the number of spatial blocks in each level is n j ×n j (j=1,…,L), then the output of the entire SPP layer is dimensional, where M represents the number of filters in the last convolutional layer. Through adaptive pooling and multi-level spatial pooling, input images of different scales are converted into feature vectors of fixed length.

[0021] By processing images of different sizes, the SPP layer can adaptively adjust the window size, so that the model can capture features of different scales and enhance the model's ability to recognize image details.

[0022] Preferably, the cross entropy loss function is selected to evaluate the classification difference, and the Adam optimizer is used to update the parameters, including:

[0023] During the training process, the cross entropy loss function is used to calculate the loss caused by the difference between the predicted probability distribution and the actual category of each sample;

[0024] The Adam optimizer was used, and the initial learning rate was set to 0.001. The parameters β1 = 0.9 and β2 = 0.999 were set. The model was trained for 100 epochs. In each epoch, mini-batch SGD with a batch size of 128 was used for training. At the end of each epoch, the validation set was used to calculate the validation loss and accuracy.

[0025] The present invention optimizes the model through the cross entropy loss function and the Adam optimizer, which helps the model converge to the optimal solution more quickly.

[0026] Preferably, the evaluating the GCNN network model according to the evaluation index includes:

[0027] The model is evaluated using the test dataset, and the accuracy, precision, recall, and F1 score on the test set are calculated. The classification effect of the model on different categories is analyzed by drawing the confusion matrix. For input images of different scales, the scale invariance effect of the GCNN structure is evaluated by comparing the classification performance at each scale.

[0028] Preferably, the optimizing the GCNN network model according to the model evaluation index includes:

[0029] According to the evaluation indicators of the model, the number of pooling layers and the number of spatial blocks of the SPP layer are adjusted; according to the size of the input image, the adaptive window size and step size of the SPP layer are adjusted; and the learning rate decay strategy is used to make the model converge stably in the later stage of training.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] (1) By using multi-scale input and spatial pyramid pooling layer SPP, the present invention can effectively process images of different sizes and enhance the model's ability to recognize scale changes. This adaptive pooling method can retain more information of the image and improve the accuracy of the model.

[0032] (2) The present invention reduces the design complexity by optimizing the network architecture. The spatial pyramid pooling layer can avoid the complexity of the traditional method that requires the careful design of filters at different levels and scale normalization operations, thereby simplifying the design and training process of the network model. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 is a flow chart of the present invention;

[0035] Figure 2 It is a schematic diagram of the specific steps of the present invention. DETAILED DESCRIPTION

[0036] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] See also Figure 1 The first aspect of the present invention provides a method for constructing a multi-scale GCNN network model based on spatial pyramid pooling, comprising:

[0038] Step 1: Data preprocessing;

[0039] The images of the CIFAR-100 dataset are preprocessed, wherein the preprocessing includes: image scaling, standardization and data enhancement; CIFAR-100 dataset: contains 60,000 32×32 color images, divided into 100 categories. Each category has 600 images, of which 50,000 are used for training and 10,000 are used for testing.

[0040] Normalization normalizes the pixel values ​​of each image to the range [0,1].

[0041] Data augmentation, randomly flipping images horizontally, randomly cropping, color jittering, and adding noise during training.

[0042] Image scaling includes: when GCNN grows from the input layer of the network, it performs certain scale adjustments on the input image. Let T be the set of scaling ratios, T = {T1,…,T N}, T i (i=1,…,N) represents the scale adjustment ratio of the input image when the network grows from the input layer for the i-th time; set 5 scaling ratios: T={0.5,0.75,1.0,1.25,1.5}, scale the image to 16×16, 24×24, 32×32, 40×40 and 48×48 pixels respectively; perform multi-scale transformation on each image in the CIFAR-100 dataset, and its scaling ratio meets the following three principles:

[0043] Diversity: Covering enough scale levels to ensure that the model can learn effectively at different scales.

[0044] Relevance: The scaling ratio should match the characteristics of the dataset and the task requirements, and adapt to different detail requirements.

[0045] Balance: Balance computing resources and model performance to avoid excessive scaling that increases the amount of computation.

[0046] When T i =T N When , GCNN stops growing; let the input image be I, the output of the first scale transformation convolution layer and the output of the sampling layer

[0047]

[0048] Where k represents a 3×3 convolution kernel with a stride of 1 and padding of 1, * represents a convolution operation, b represents a bias, down(.) represents a downsampling function, m×m represents the size of the sampling layer, b represents a bias, and σ represents a ReLu activation function;

[0049] The output of the second scale-transformed convolutional layer and the output of the sampling layer

[0050]

[0051] Step 2: Network architecture design;

[0052] In the GCNN model, multi-scale input, convolutional layers, and spatial pyramid pooling layers are used to process images of different sizes; the number of spatial blocks in the second level of the SPP layer is set to n×n, and the output of the last convolutional layer is The size of is a×a, then the sampling window size of this level is The step length is and They represent the rounding up and rounding down operations respectively, that is, the fixed-size window of the second sampling layer of the original GCNN is changed to an adaptive window size, and the window size is proportional to the input image; assuming that the SPP layer contains L pooling levels, the number of spatial blocks in each level is n j ×n j (j=1,…,L), then the output of the entire SPP layer is dimensional, where M represents the number of filters in the last convolutional layer. Through adaptive pooling and multi-level spatial pooling, input images of different scales are converted into feature vectors of fixed length.

[0053] Step 3: Model training;

[0054] The cross entropy loss function and Adam optimizer were used to perform multi-scale feature learning and optimization on the model. The cross entropy loss function was used to calculate the loss caused by the difference between the predicted probability distribution of each sample and the actual category. The Adam optimizer was used, and the initial learning rate was set to 0.001, and the parameters β1=0.9 and β2=0.999 were set to converge to the global optimal point more quickly. The model was trained for a total of 100 epochs. In each epoch, mini-batchSGD with a batch size of 128 was used for training. At the end of each epoch, the validation set was used to calculate the validation loss and accuracy.

[0055] Step 4: Model evaluation and optimization;

[0056] Evaluate model performance and optimize the model according to model evaluation indicators. Evaluate model performance. Use the test data set to evaluate the model, mainly calculating the accuracy, precision, recall and F1 score on the test set; analyze the classification effect of the model on different categories by drawing the confusion matrix; for input images of different scales, compare the classification performance at each scale to evaluate the scale invariance effect of the GCNN structure.

[0057] Optimizing the model according to the model evaluation indicators includes: adjusting the number of pooling layers and the number of spatial blocks of the SPP layer according to the model evaluation indicators; adjusting the adaptive window size and step size of the SPP layer according to the size of the input image; using the learning rate decay strategy to make the model converge stably in the later stage of training.

[0058] The working principle of the present invention is as follows: the images of the CIFAR-100 data set are preprocessed, including standardization, data enhancement and multi-scale scaling, and then the GCNN network architecture is designed to process images of different sizes using multi-scale input, convolutional layers and spatial pyramid pooling layers, and then the model is trained using the cross entropy loss function and the Adam optimizer, with a total of 100 epochs and each epoch having a specific training method and verification operation, and finally the model is evaluated using a test data set, and the performance is measured by multiple indicators and the model is optimized accordingly.

[0059] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A multi-scale GCNN network model construction method based on spatial pyramid pooling, characterized in that: include: Step 1: Data preprocessing; Obtain a CIFAR-100 data set, and preprocess images in the CIFAR-100 data set, wherein the preprocessing includes: image scaling, standardization, and data enhancement; Step 2: Network architecture design: In the GCNN model, a multi-scale input strategy is adopted, combined with convolutional layers and spatial pyramid pooling layers, to extract features from the pre-processed images of the CIFAR-100 dataset and build a network structure that captures features of different scales and levels; Step 3: Model training: cross entropy loss function is used to evaluate classification differences, and Adam optimizer is used to update parameters. The model weights are iterated through the back propagation algorithm to learn and optimize multi-scale features of the GCNN network model. Step 4: Model evaluation and optimization: Evaluate and optimize the GCNN network model according to the evaluation indicators, including accuracy, precision, recall and F1 score.

2. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The image scaling includes: when the network starts to grow from the input layer, the GCNN network performs a scale adjustment operation on the input image, assuming T is a set of scaling ratios, T = {T1, ..., T N }, T i (i=1,…,N) represents the scaling ratio of the input image when the network grows for the i-th time in the input layer; when T i =T N When , GCNN stops growing; let the input image be I, the output of the first scale transformation convolution layer and the output of the sampling layer Where k represents a 3×3 convolution kernel with a stride of 1 and padding of 1, * represents a convolution operation, b represents a bias, down(.) represents a downsampling function, m×m represents the size of the sampling layer, b represents a bias, and σ represents a ReLu activation function; The output of the second scale-transformed convolutional layer and the output of the sampling layer 3. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The standardization normalizes the pixel values ​​of each image in the CIFAR-100 dataset to the range of [0, 1]. The data enhancement performs random horizontal flipping, random cropping, color jittering, and noise addition operations on the images during training.

4. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The method combines the convolution layer and the spatial pyramid pooling layer to extract features from the preprocessed CIFAR-100 dataset image, including: using the spatial pyramid pooling layer SPP to process images of different sizes, assuming that the number of spatial blocks in the second level of the SPP layer is n×n, and the output of the last convolution layer The size of is a×a, then the sampling window size of the second level is The step length is and They represent the rounding up and rounding down operations respectively, that is, the fixed-size window of the second sampling layer of the original GCNN is changed to an adaptive window size, and the window size is proportional to the input image; assuming that the SPP layer contains L pooling levels, the number of spatial blocks in each level is n j ×n j (j=1,…,L), then the output of the entire SPP layer is dimensional, where M represents the number of filters in the last convolutional layer. Through adaptive pooling and multi-level spatial pooling, input images of different scales are converted into feature vectors of fixed length.

5. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The cross entropy loss function is used to evaluate the classification difference, and the Adam optimizer is used to update the parameters, including: During the training process, the cross entropy loss function is used to calculate the loss caused by the difference between the predicted probability distribution and the actual category of each sample; The Adam optimizer was used, and the initial learning rate was set to 0.

001. The parameters β1 = 0.9 and β2 = 0.999 were set. The model was trained for 100 epochs. In each epoch, mini-batch SGD with a batch size of 128 was used for training. At the end of each epoch, the validation set was used to calculate the validation loss and accuracy.

6. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The GCNN network model is evaluated according to the evaluation indicators, including: The model is evaluated using the test dataset, and the accuracy, precision, recall, and F1 score on the test set are calculated. The classification effect of the model on different categories is analyzed by drawing the confusion matrix. For input images of different scales, the scale invariance effect of the GCNN structure is evaluated by comparing the classification performance at each scale.

7. The multi-scale GCNN network model construction method based on spatial pyramid pooling according to claim 1, characterized in that: The optimization of the GCNN network model according to the model evaluation index includes: According to the evaluation indicators of the model, the number of pooling layers and the number of spatial blocks of the SPP layer are adjusted; according to the size of the input image, the adaptive window size and step size of the SPP layer are adjusted; and the learning rate decay strategy is used to make the model converge stably in the later stage of training.

Citation Information

Patent Citations

  • Remote sensing image classification method based on attention mechanism deep Contourlet network

    CN110728224A

  • Occluded pedestrian re-identification method combining spatial transformation network and multi-scale feature extraction

    CN112396036A

  • Breast cancer detection method based on multi-scale cavity convolution

    CN112950614A

  • Geographic object spatial relationship identification method and system based on multi-scale pooling

    CN113591685A

  • Remote sensing image cloud detection method based on multi-scale convolutional neural network

    CN114022408A