Building classification method and system based on compression excitation mechanism neural network
By introducing a compression incentive mechanism into ResNet and explicitly modeling the interdependence between channels, it solves the problems of traditional ResNet's insufficient feature expression ability and waste of computing resources in building remote sensing image classification, and achieves more efficient feature extraction. and classification accuracy improvement.
Patent Information
- Application Number
- CN202410954671.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional ResNet neural network has limited feature expression ability in building remote sensing image classification and ignores the interdependence of channel dimensions, resulting in a waste of computing resources and reduced model efficiency.
A neural network based on a compression excitation mechanism is used to compress the channel feature map into a scalar through structures such as global average pooling and fully connected layers, adaptively recalibrate the channel feature response, and explicitly model the interdependence between channels. , reduce the waste of computing resources and improve model efficiency.
It significantly improves the feature expression ability and classification accuracy, suppresses redundant information, optimizes the utilization of computing resources, and enhances the generalization ability and robustness of the model.
Smart Images

Figure CN118736323A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of construction engineering, in particular to the application of neural networks in construction engineering, and in particular to a building classification method and system based on a compression excitation mechanism neural network. Background Art
[0002] Neural network technology, especially convolutional neural network (CNN), plays an important role in the classification of architectural remote sensing images. With the continuous development of remote sensing technology, the amount of remote sensing image data acquired has increased dramatically, and the resolution has gradually improved, which provides a rich data source for the classification and application of remote sensing images.
[0003] ResNet (residual network) is a convolutional neural network structure commonly used in building remote sensing image classification. It successfully solves the gradient vanishing and gradient exploding problems in deep network training by introducing residual learning units, thereby being able to train deeper neural network models. However, the traditional ResNet neural network structure has the following defects:
[0004] (1) Limited feature expression capability: Traditional ResNet networks mainly focus on feature extraction in the spatial dimension, while ignoring the interdependence between channel dimensions (i.e., different channels of feature maps). This neglect may result in the network being unable to fully utilize information in the channel dimension, thus limiting its feature expression capability.
[0005] (2) Waste of computing resources: In deep networks, feature maps of different channels may contain redundant or irrelevant information. Traditional ResNet networks that lack a compression incentive mechanism may waste computing resources when processing this information, reducing the efficiency of the model.
[0006] Squeeze-and-Excitation Networks (SE-NET) is a network structure designed to improve the feature expression ability of convolutional neural networks. It improves the performance of the network by explicitly modeling the interdependence between channels and adaptively recalibrating the channel feature response. By explicitly modeling the interdependence between channels, SE-NET can make full use of the information in the channel dimension and improve the feature expression ability of the network. It helps to more accurately identify targets such as buildings in images. And because SE-NET can adaptively recalibrate the channel feature response, it can suppress the influence of redundant or irrelevant information, highlight the role of useful features, and help improve the accuracy and robustness of classification.
[0007] To this end, the present invention proposes a building classification method and system based on a compression excitation mechanism neural network. Summary of the invention
[0008] In view of this, the embodiment of the present invention hopes to provide a building classification method and system based on a compression excitation mechanism neural network to solve or alleviate the technical problems existing in the prior art, that is, how to use a compression excitation network to perform building remote sensing image classification tasks, and at least provide a beneficial option for this; the technical solution of the present invention is implemented as follows:
[0009] First, a building classification method based on a compressed excitation mechanism neural network:
[0010] 1. Overview:
[0011] The present invention aims to solve the above technical problems. A compression-excitation network is used to perform building remote sensing image classification tasks; the feature map of each channel is compressed into a scalar through global average pooling and other methods, and the scalar reflects the global feature information of the channel. The scalar obtained by compression is nonlinearly transformed using structures such as a fully connected layer to obtain the weight of each channel. These weights reflect the importance of different channels and are used to recalibrate the original feature map.
[0012] Through the compression incentive mechanism, SE-NET can reduce the waste of computing resources and improve the efficiency of the model, which is of great significance for processing large-scale remote sensing image data.
[0013] (II) Technical solution:
[0014] To achieve the above technical objectives, this solution needs to execute the following steps S1 to S3.
[0015] 2.1 Step S1, data preparation:
[0016] Collect a dataset D of remote sensing images containing buildings a, roads b, and vegetation c. These data can come from different satellite or aerial sensors with different resolutions and spectral characteristics.
[0017] D=[(a1,b1,c1),(a2,b2,c2),...,(a n ,b n ,c n )];
[0018] Among them, (a i ,b i ,c i ) is the i-th sample, and n is the number of samples.
[0019] The dataset D can also be subjected to conventional preprocessing, including geometric correction, radiation correction, noise removal, image cropping, normalization and other operations, to ensure the quality and consistency of the data.
[0020] 2.2 Step S2, read the network:
[0021] Input dataset D. Read the VGG network as the basic CNN (convolutional neural network) structure. Integrate the SE (Squeeze-and-Excitation) module after each convolution block of the VGG network.
[0022] The SE module explicitly models the interdependence between channels through two steps of compression and excitation, and adaptively recalibrates the channel feature responses. It also uses operations such as global average pooling to compress the feature map of each channel into a scalar that reflects the global feature information of the channel.
[0023] The VGG network transforms the compressed scalar using a fully connected layer and a Sigmoid activation function to obtain the weights of each channel. These weights are then used to recalibrate the original feature map.
[0024] 2.2.1 Step S200, compression step (Squeeze):
[0025]
[0026] Among them, u c represents the feature map of the cth channel, H and W represent the height and width of the feature map respectively. c It is a scalar obtained after compression, reflecting the global feature information of the channel.
[0027] 2.2.2 Step S201, Excitation step:
[0028] s=F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z));
[0029] Where z is the scalar vector obtained from the compression step, W1 and W2 are the weights of the fully connected layer, δ is the ReLU activation function, and σ is the Sigmoid activation function. s is the weight vector obtained after excitation and is used to recalibrate the feature map.
[0030] 2.2.3 Step S202, feature map recalibration:
[0031] Recalibrate the original feature map using the weight vector s obtained in the excitation step:
[0032] x c v=F scale (u c ,s c )=s c ·u c ;
[0033] Among them, x c′ is the recalibrated feature map, s c is the weight of the cth channel.
[0034] 2.3 Model training:
[0035] Although the neural network model is used in the above step S2, it still needs to be trained before deployment. The training steps are:
[0036] 2.3.1 Divide the dataset D:
[0037] The preprocessed remote sensing image dataset D is divided into training set D train , test set D test and validation set D val .
[0038] 2.3.2 Set training parameters:
[0039] Set the training parameters, including learning rate η, batch size B, number of iterations N, and SGD optimization algorithm. The choice of these parameters has an important impact on the training effect and speed of the model.
[0040] 2.3.3 Training Model:
[0041] Using the training set D train The CNN model integrated with the SE module is trained. During the training process, the model parameters θ are optimized by the back propagation algorithm to minimize the classification error L. Specifically, for each batch of training data, the loss function L(D train ,θ), and update the parameters by gradient descent:
[0042]
[0043] Where η is the learning rate, is the gradient of the loss function with respect to the parameter θ. This process is repeated until the predetermined number of iterations N is reached.
[0044] 2.4 Step S3, result output and application:
[0045] For classification models that meet the accuracy requirements, the classification results of the VGG network are output as a data table.
[0046] Among them, for new remote sensing image data, the trained model is used for prediction to obtain the classification label of each image.
[0047] (III) Mechanism for solving technical problems:
[0048] 3.1 Feature extraction stage:
[0049] Remote sensing image data is input into the basic convolutional neural network (VGG). The network extracts low-level to high-level features in the image layer by layer through a combination of multiple convolutional layers, activation functions, and pooling layers. These features contain not only spatial information but also spectral information, which is crucial for distinguishing different types of land objects.
[0050] After the feature extraction of the basic network, a series of feature maps will be generated. Each feature map corresponds to a channel and reflects the characteristic response of the image in a specific aspect. These feature maps are the basis for subsequent classification tasks.
[0051] 3.2 Feature calibration stage:
[0052] After each key convolutional block of the base network, the SE module is used to perform adaptive channel calibration on the feature map to enhance useful features and suppress useless features. The SE module first compresses each feature map through a global average pooling operation to generate a scalar value. This scalar value represents the global feature information of the feature map and reflects the importance of the channel in the entire image.
[0053] 3.2.1 Excitation step:
[0054] Next, the compressed scalar values are transformed using a fully connected layer (or convolutional layer) and a nonlinear activation function (such as Sigmoid) to generate a weight vector equal to the number of channels. These weights reflect the relative importance of different channels.
[0055] 3.2.2 Feature Recalibration:
[0056] Finally, the generated weight vector is applied to the original feature map to recalibrate the feature map through a multiplication operation. Channels with larger weights will be enhanced, while channels with smaller weights will be suppressed. This process allows the network to focus more on features that are useful for classification tasks.
[0057] 3.3 Classification decision stage:
[0058] The feature maps calibrated by the SE module are further fused and processed and finally input into the fully connected layer for classification decision. The fully connected layer maps the feature maps to the classification label space and outputs the probability or score of each category.
[0059] Second, the building classification system based on the compressed incentive mechanism neural network:
[0060] like Figure 2As shown, the system includes a processor and a register coupled to the processor, wherein program instructions are stored in the register, and when the program instructions are executed by the processor, the processor executes the building classification method as described above.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] (1) Improved feature expression capability: By integrating the SE module, the present invention can explicitly model the interdependence between feature channels. This mechanism enables the network to more finely capture and express complex features in remote sensing images, especially those related to buildings, thereby significantly improving the feature expression capability.
[0063] (2) Significantly improve classification accuracy: The SE module of the present invention can effectively suppress the influence of redundant or irrelevant information by adaptively calibrating feature channels, while highlighting the role of useful features. This feature calibration mechanism enables the classifier to more accurately identify buildings in remote sensing images, thereby significantly improving the accuracy and robustness of classification.
[0064] (3) Optimizing the use of computing resources: Traditional convolutional neural networks often waste computing resources when processing remote sensing images. The solution of the present invention introduces the SE module to achieve adaptive calibration of feature channels, thereby reducing unnecessary calculations. This mechanism makes the model more efficient when processing large-scale remote sensing image data and optimizes the use of computing resources.
[0065] (4) Enhance the generalization ability of the model: Since the SE module can adaptively calibrate the feature channels, the model of the present invention can be more flexibly adapted to different remote sensing image data and classification tasks. This flexibility enhances the generalization ability of the model, making the solution have better performance in different scenarios and applications.
[0066] (5) Providing a visual analysis tool: The weight vector generated by the SE module of the present invention can provide an intuitive weight value for each feature channel, which helps to understand which channels are more important for the classification task. This visual analysis tool can help researchers better understand the behavior of the model and provide guidance for further model optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0069] Figure 2 It is a schematic diagram of the system composition of the present invention;
[0070] Figure 3 It is a schematic diagram of the training steps of the second embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below;
[0072] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0073] Embodiment 1: Figure 1 As shown, this embodiment discloses a building classification method based on a compression excitation mechanism neural network, which includes the following steps S1 to S3.
[0074] In this embodiment, regarding step S1, data preparation: first, a remote sensing image dataset D including buildings (a), roads (b) and vegetation (c) is collected. These data can come from different satellites or aerial sensors, which means that the dataset is diverse and covers different resolutions and spectral characteristics.
[0075] D=[(a1,b1,c1),(a2,b2,c2),...,(a n ,b n ,c n )];
[0076] Among them, (a i ,b i ,c i ) is the i-th sample, and n is the number of samples.
[0077] It is understandable that in order to ensure the quality and consistency of the data, we perform conventional preprocessing operations on the dataset D. For example:
[0078] Geometric correction is used to adjust geometric deformation in images to ensure the accuracy and reliability of images.
[0079] Radiation correction is used to eliminate radiation errors caused by factors such as sensors and atmospheric conditions.
[0080] Noise removal is used to reduce random errors in images and improve image clarity.
[0081] Image cropping is used to remove irrelevant areas in an image or to adjust the image to a uniform size.
[0082] The normalization operation is used to scale the pixel values of image data to a uniform range, which helps the training and convergence of the model.
[0083] Furthermore, the python execution program of step S1 is as follows:
[0084] import numpy as np
[0085] from skimage import io,transform
[0086] #Read a list containing remote sensing image file paths
[0087] image_paths=['path / to / image1.jpg','path / to / image2.jpg',...,
[0088] 'path / to / imagen.jpg']
[0089] labels = ['building', 'road', 'vegetation'] #corresponding labels
[0090] # Initialize the dataset
[0091] dataset=[]
[0092] #Traverse each image file
[0093] for image_path in image_paths:
[0094] #Read the image
[0095] image = io.imread(image_path)
[0096] #Crop and normalize
[0097] image = transform.resize(image,(256,256))#crop or scale all images to 256x256
[0098] image=image / 255.0#Normalize to between 0 and 1
[0099] label=labels[np.random.randint(0,len(labels))]
[0100] #Add the preprocessed images and corresponding labels to the dataset
[0101] dataset.append((image,label))
[0102] #Convert the dataset into a numpy array for subsequent processing
[0103] dataset = np.array(dataset)
[0104] #Now, dataset is a numpy array, where each element is a tuple containing the preprocessed image and the corresponding label
[0105] In the above program: First, the remote sensing image files stored in the specified path are read. These files can be images of different formats, resolutions, and spectral characteristics. For each image read, the program performs a series of preprocessing operations. These operations may include cropping, scaling, normalization, etc. to ensure that the image has a uniform size and pixel value range. The preprocessing step is crucial to improve the effectiveness and accuracy of subsequent model training. Each image is randomly assigned a label (building, road, or vegetation). After preprocessing and label assignment, each image is converted into a tuple containing the preprocessed image and the corresponding label. These tuples are added to the dataset and finally form a numpy array for subsequent processing and model training.
[0106] In this embodiment, regarding step S2, read the network: input data set D. Read the VGG network as the basic CNN (convolutional neural network) structure. The SE module is integrated after each convolution block of the VGG network. The purpose of this step is to enhance the network's classification ability for building remote sensing images by explicitly modeling the interdependence between channels and adaptively recalibrating channel feature responses.
[0107] The SE module explicitly models the interdependence between channels through two steps of compression and excitation, and adaptively recalibrates the channel feature response. It also uses operations such as global average pooling to compress the feature map of each channel into a scalar that reflects the global feature information of the channel.
[0108] The compressed scalar is transformed using a fully connected layer and a Sigmoid activation function to obtain the weights of each channel. These weights are then used to recalibrate the original feature map.
[0109] Specifically, step S200, compression step (Squeeze): use the global average pooling operation to compress the feature map of each channel into a scalar. This scalar reflects the global feature information of the channel:
[0110]
[0111] Among them, u c represents the feature map of the cth channel, H and W represent the height and width of the feature map respectively. c It is a scalar obtained after compression, reflecting the global feature information of the channel.
[0112] Specifically, step S201, excitation step: using the fully connected layer and the Sigmoid activation function to transform the compressed scalar to obtain the weight of each channel. These weights are then used to recalibrate the original feature map:
[0113] s=F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z));
[0114] Where z is the scalar vector obtained from the compression step, W1 and W2 are the weights of the fully connected layer, δ is the ReLU activation function, and σ is the Sigmoid activation function. s is the weight vector obtained after excitation and is used to recalibrate the feature map.
[0115] Specifically, in step S202, the original feature map is recalibrated using the weight vector s obtained in the excitation step:
[0116] x c ′=F scale (u c ,s c )=s c ·u c ;
[0117] Among them, x c ′ is the recalibrated feature map, s c is the weight of the cth channel.
[0118] It can be understood that by integrating the SE module, our model is able to explicitly model the interdependence between channels and adaptively recalibrate the channel feature responses. This helps improve the model's ability to classify building remote sensing images because the model can better focus on the key features in the image and suppress unimportant features. The global average pooling operation can reduce the number of parameters and the amount of computation while retaining global feature information, which helps improve the generalization ability and training efficiency of the model. Using the fully connected layer and the Sigmoid activation function for excitation operations, the weights of each channel can be obtained. These weights can reflect the importance of different channels in the classification task, which helps the model to more accurately classify building remote sensing images.
[0119] Furthermore, the Python execution program of step S2 is as follows:
[0120]
[0121]
[0122] #Now vgg_with_se is a VGG network with an integrated SE module, which can be used for training
[0123] In the above program: First, load a pre-trained VGG network, which will serve as the basis of our model. Then define a SE module class, which contains two steps: compression and excitation. In the compression step, we use a global average pooling operation to compress the feature map of each channel into a scalar. In the excitation step, we use two fully connected layers and a Sigmoid activation function to generate the weights of each channel. Next, traverse each layer of the VGG network and integrate an SE module after each convolution layer. In this way, the feature map output by each convolution block will be recalibrated by the SE module, thereby enhancing the model's attention to key features. Finally, return the modified VGG network, which now includes the SE module and can be used to train building remote sensing image classification tasks.
[0124] In this embodiment, regarding step S3, result output and application: for the classification model that meets the accuracy requirements, the classification results of the VGG network are output as a data table. This data table will contain the classification results of each remote sensing image. The specific form is that each row represents an image, and the columns include the image ID, classification label, and classification probability information. Because in the deep learning classification task, after the model training is completed, the classification results of the model need to be saved in a structured form for subsequent analysis and application. The data table is a commonly used structured data storage method, which can clearly display the classification results of each image, including key information such as classification labels and classification probabilities.
[0125] It is understandable that by tabulating the data, the classification results can be easily processed and analyzed later, such as calculating the classification accuracy, drawing the distribution map of the classification results, etc. The data table can also be used as a standardized data exchange format to facilitate integration and sharing with other systems or tools.
[0126] Moreover, by tabulating the data, the classification results can be easily processed and analyzed later, such as calculating the classification accuracy, drawing the distribution map of the classification results, etc. The data table can also be used as a standardized data exchange format to facilitate integration and sharing with other systems or tools.
[0127] At the same time, it can be further understood that for new remote sensing image data, the trained model can be used for prediction to obtain the classification label of each image. This step is the key link to apply the trained model to the actual scene. By using the trained model for prediction, we can quickly classify a large amount of remote sensing image data and greatly improve the efficiency of classification. The predicted classification labels can be used in subsequent remote sensing image analysis, urban planning, environmental monitoring and other application scenarios, and have a wide range of application value.
[0128] Furthermore, the Python execution program of step S3 is as follows:
[0129]
[0130]
[0131]
[0132] In the above program: Use model=... to load the trained model, and use torch.load and other methods to load the model parameters. Use model.eval() to set the model to evaluation mode, so that some layers in the model (such as Dropout and BatchNorm) will work according to the behavior during evaluation.
[0133] Image preprocessing defines the preprocess_image function, which is used to preprocess the input remote sensing image, including resizing, converting to Tensor, and standardizing, to adapt to the input requirements of the model.
[0134] Prediction and Output defines the predict_and_output function, which accepts a set of new remote sensing image paths and a label mapping dictionary as input.
[0135] For each image, first call preprocess_image for preprocessing, and then input the processed image into the model for prediction. Use torch.max to get the category index with the highest probability in the prediction result, and convert it to the corresponding label through labels_map.
[0136] Collect the ID and predicted label of each image and finally return a DataFrame containing all the prediction results.
[0137] Finally, you can view the prediction results by printing results_df. You can also save the prediction results to a CSV file for subsequent analysis and application.
[0138] Embodiment 2: Figure 3 Although step S2 in the first embodiment uses a neural network model, it still needs to be trained before deployment. The training steps are:
[0139] The first step is to divide the data set D:
[0140] The preprocessed remote sensing image dataset D is divided into training set D train , test set D test and validation set D val .
[0141] The second step is to set the training parameters:
[0142] Set the training parameters, including learning rate η, batch size B, number of iterations N, and SGD optimization algorithm. Among them:
[0143] 1) The learning rate determines the step size of parameter update. Too large a learning rate may cause the parameters to update too quickly, while too small a learning rate may cause the training process to be slow.
[0144] 2) The batch size determines the number of samples used for each parameter update. Too large a batch size may cause memory overflow, while too small a batch size may cause an unstable training process.
[0145] 3) The number of iterations determines the total number of rounds in the training process. Too many iterations may lead to overfitting, while too few iterations may result in insufficient training of the model.
[0146] 4) The SGD optimization algorithm is an optimization algorithm used to update the parameters of the model during the training process.
[0147] The third step is to train the model:
[0148] Using the training set D trainThe CNN model integrated with the SE module is trained. The model parameters θ are optimized by the back propagation algorithm to minimize the classification error L. For each batch of training data, the loss function L(D train ,θ), and update the parameters by gradient descent:
[0149]
[0150] Where η is the learning rate, is the gradient of the loss function with respect to the parameter θ. This process is repeated until the predetermined number of iterations N is reached.
[0151] It is understandable that the back propagation algorithm is a commonly used optimization algorithm used to calculate the gradient of the loss function with respect to the model parameters during the training process. The gradient descent method is a commonly used parameter update method that minimizes the loss function by updating the parameters in the opposite direction of the gradient. By continuously iterating the training process, the parameters of the model can be gradually optimized and the classification performance of the model can be improved.
[0152] Moreover, by training the CNN model integrated with the SE module, the SE module's ability to recalibrate channel features can be fully utilized to improve the model's classification performance for building remote sensing images. Through the optimization of the back propagation algorithm and the gradient descent method, it can be ensured that the model continuously approaches the optimal solution during the training process, thereby improving the model's classification accuracy and generalization ability.
[0153] Furthermore, the Python execution program for the above training steps is as follows:
[0154]
[0155]
[0156]
[0157] In the above program: Use DataLoader to load the preprocessed and divided remote sensing image dataset D, and obtain the DataLoaders of the training set, validation set, and test set respectively.
[0158] Define a CNN model CNNWithSE that integrates the SE module. In the structure of the CNN model, the SE module is integrated at the appropriate position to enhance the model's ability to recalibrate channel features.
[0159] Instantiate the model, loss function, and optimizer. Define the train_model function to perform the model training process. In each epoch, traverse each batch of data in the training set DataLoader. For each batch of data, perform forward propagation, calculate the loss function, perform backpropagation, and update the model parameters.
[0160] Use torch.save to save the trained model parameters for subsequent verification, testing, and deployment.
[0161] The above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0162] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0163] At the same time, those skilled in the art can understand that all or part of the processes in all the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Claims
1. A building classification method based on a compression-excitation neural network, characterized in that: The steps include: S1, collects a dataset D of remote sensing images containing buildings a, roads b, and vegetation c; S2, input data set D, read the VGG network as the basic CNN structure, each convolution block of the VGG network is integrated with the SE module; the VGG network uses the fully connected layer and the Sigmoid activation function to transform the compressed scalar to obtain the weight of each channel; S3, output the classification results of the VGG network as a data table.
2. The building classification method according to claim 1, characterized in that: In S1, the data set D is: D = [(a1, b1, c1), (a2, b2, c2), ..., (a n ,b n ,c n )]; Among them, (a i ,b i ,c i ) is the i-th sample, and n is the number of samples.
3. The building classification method according to claim 1, characterized in that: In S2, the SE module explicitly models the interdependence between channels through two steps of compression and excitation, and adaptively recalibrates the channel feature responses; and uses a global average pooling operation to compress the feature map of each channel into a scalar.
4. The building classification method according to claim 3, characterized in that: In S2, the compression method is: Among them, u c represents the feature map of the cth channel, H and W represent the height and width of the feature map respectively; z c is the scalar obtained after compression.
5. The building classification method according to claim 4, characterized in that: In S2, the excitation method is: s=F ex (z,W)=σ(g(z,W))=σ(W2δ(W1z)); Among them, z is the scalar vector obtained in the compression step, W1 and W2 are the weights of the fully connected layer, δ is the ReLU activation function, σ is the Sigmoid activation function; s is the weight vector obtained after excitation.
6. The building classification method according to claim 4, characterized in that: In S2, the recalibration method is: x c ′=F scale (u c ,s c )=s c ·u c ; Among them, x c ′ is the recalibrated feature map, s c is the weight of the cth channel.
7. The building classification method according to claim 1, characterized in that: The training method of the VGG network described in S2 is: using the training set D train Train the CNN model integrated with the SE module; During the training process, the model parameters θ are optimized through the back-propagation algorithm to minimize the classification error L.
8. The building classification method according to claim 7, characterized in that: During the minimization process, the parameters are updated by the gradient descent method: Where η is the learning rate, is the gradient of the loss function with respect to the parameter θ; this process is repeated until the predetermined number of iterations N is reached.
9. The building classification method according to claim 1, characterized in that: In S3, for new remote sensing image data, the trained model is used to perform prediction to obtain a classification label for each image.
10. A building classification system based on a compression-excitation neural network, characterized in that: The system includes a processor and a register coupled to the processor, wherein the register stores program instructions, and when the program instructions are executed by the processor, the processor executes the building classification method according to any one of claims 1 to 9.
Citation Information
Cited By
Convolutional neural network-based low-pressure cast aluminum alloy hub structure prediction method
CN119885824A
