Red date disaster unmanned aerial vehicle image recognition method based on improved ResNet50
By introducing CBAM attention mechanisms and focus loss functions in the ResNet50 model, and optimizing the super -added, the problem of low efficiency in the natural disaster recognition of red dates and insufficient model attention in the recognition of red dates, and achieve higher recognition accuracy and training efficiency.
Patent Information
- Application Number
- CN202411422357.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art has problems of inefficiency in the identification of red date natural disasters and insufficient attention to categories with fewer samples.
Based on the improved Resnet50 model, the CBAM attention mechanism and focus loss function introduced the cstan, and the super -added optimization was performed to improve the identification performance and adaptability of the model.
It has significantly improved the identification performance of the model on the wind disaster data, improves the perception of the information of the key domain of the image, and enhances the training efficiency and recognition accuracy of the model.
Smart Images

Figure CN119380188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and remote sensing technology, and in particular to, but not limited to, a method for identifying red date disaster drone images based on an improved ResNet50. Background Art
[0002] As one of my country's important cash crops, the production of red dates has continued to rise in recent years, and has developed into a fruit industry with Chinese characteristics. my country's jujube planting is mainly concentrated in Xinjiang. According to relevant statistics, the planting area of jujube in Xinjiang accounts for about 70% of the country's total area. However, the climate conditions in Xinjiang are relatively unstable. During the growth of red dates, they are prone to various natural disasters, such as drought, strong winds, hail, and pests and diseases. These natural disasters not only pose a serious threat to the growth and yield of red dates, but also directly affect the income of fruit farmers and the sustainable development of the entire red date industry.
[0003] In recent years, the use of UAV remote sensing technology to obtain field crop growth and disaster assessment has made some progress. UAVs are flexible and maneuverable, can fly freely under various complex terrain conditions, and can obtain high-resolution ground images of large areas in a short time. Traditional methods for identifying natural disasters in red dates mostly rely on manual observation and empirical judgment, which are inefficient and highly subjective, and are difficult to adapt to the needs of large-scale red date planting. Therefore, using UAVs to obtain disaster images for disaster monitoring and assessment has become a major trend.
[0004] As one of the typical network structures in deep learning, the residual network (ResNet50) effectively alleviates the gradient vanishing and gradient exploding problems in deep network training by introducing residual connections, allowing the network to be trained at a deeper level, thereby achieving better performance. However, due to the similarities between disasters and the imbalanced number of samples of different disasters in the red date natural disaster dataset, the categories with relatively large numbers of samples are overfitted, resulting in the model not paying enough attention to the categories with fewer samples. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method for identifying red date disasters using drone images based on an improved ResNet50, which at least solves the problem that existing research on the identification of red date natural disasters is lacking and the model does not pay enough attention to categories with fewer samples.
[0006] The technical solutions of the embodiments of the present invention are as follows:
[0007] The embodiment of the present invention provides a method for identifying drone images of red dates disasters based on an improved ResNet50, the method comprising:
[0008] The unmanned aerial vehicle (UAV) image data collected in the red date natural disaster area are obtained; the UAV image data are preprocessed and divided into a training set and a test set according to a certain ratio; the training set is input into the constructed improved ResNet50 model for recognition and classification; wherein, the CBAM attention mechanism is embedded between the deep residual blocks of the improved ResNet50 model, and a Dropout regularization layer is added after the average pooling layer; the classification loss value is calculated using the focal loss function, and the classification result is evaluated in combination with the accuracy; the hyperparameters of the improved ResNet50 model are optimized according to the evaluation results, and the optimal hyperparameter combination is selected for model training; and the trained red date natural disaster recognition model is verified using the test set.
[0009] Furthermore, the acquisition of drone image data collected in the red date natural disaster area includes: building a drone visible light image acquisition system by using a drone equipped with a visible light camera, and setting the heading side overlap rate and flight path information; using the drone visible light image acquisition system to collect red date natural disaster areas to obtain drone image data, including a strong wind disaster data set, a hail disaster data set and a normal date tree data set; placing the drone image data in different folders according to different disaster categories to establish a red date disaster image database.
[0010] Furthermore, the drone image data is preprocessed and divided into a training set and a test set according to a certain ratio, including: adaptively scaling the drone image data; enhancing each image data after scaling by using four methods, namely Gaussian blur, horizontal flip, elastic transformation and random rotation of 90°, and then randomly selecting one method from rectangular discard, grid distortion and optical distortion to perform data enhancement operation; and dividing all data samples after enhancement processing into a training set and a test set according to a ratio of 7:3.
[0011] Furthermore, the improved ResNet50 model is hyperparameter optimized based on the evaluation results, and the optimal hyperparameter combination is selected for model training, including: for the improved ResNet50 model, the learning rate is set to three momentum gradients of 0.01, 0.001, and 0.0001, the batch size is set to three gradients of 8, 16, and 32, the momentum is set to 0.9, the model training rounds are set to 50 for each experiment, multiple experiments are conducted and the experimental results are compared, and a set of optimal hyperparameter combinations are selected for model training.
[0012] Furthermore, the improved ResNet50 model is mainly divided into 6 stages: the first stage includes the input layer and preliminary convolution, and extracts features through convolution layers and maximum pooling; the second to fifth stages are mainly composed of residual blocks, which are used to extract high-level features, wherein the CBAM attention mechanism is embedded between the residual blocks of the fourth stage to the residual blocks of the fifth stage; the sixth stage outputs the classification results through adaptive average pooling and fully connected layers, and each stage effectively trains the deep network through residual connections, and gradually learns the image features of drone image data from low-level to high-level.
[0013] Furthermore, the CBAM attention mechanism includes a channel attention module and a spatial attention module; the channel attention module uses average pooling and maximum pooling to generate two 1×1×C feature vectors, where C is the number of channels; and calculates the channel weight through a fully connected layer, thereby weighting each channel of the original feature map to highlight important features; the spatial attention module focuses on the spatial position information of the feature map, and generates two H×W×1 feature maps by performing maximum pooling and average pooling on the channel-weighted feature map, where H and W are the height and width of the feature map, respectively; the stacked feature maps are passed through a convolutional layer to generate a single-channel spatial attention map, and weights are assigned to the positions in the image that need to be suppressed or enhanced, which serve as input for further learning and inference of the improved ResNet50 model.
[0014] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0015] Based on the ResNet50 model, the present invention introduces a focal loss function to effectively balance the weights of each category during the training process, successfully solving the problem of sample imbalance, thereby significantly improving the recognition performance of the model on high wind disaster data;
[0016] The present invention embeds the CBAM mechanism between the deep residual blocks of the model, and enhances the important features of the image by channel domain and spatial domain, so that the model can focus on the important feature information in the image more accurately and improve the model's perception ability of the key domain information of the image;
[0017] The present invention optimizes the hyperparameters in the improved ResNet50 network structure and selects the optimal hyperparameter combination for model training, thereby effectively improving the training efficiency and recognition accuracy of the model.
[0018] In summary, the present invention can meet the requirements of natural disaster identification of red dates with large planting areas and high canopy coverage, and has high identification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. 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 work, among which:
[0020] Figure 1 A schematic diagram of the process of the red date disaster drone image recognition method based on the improved ResNet50 provided in an embodiment of the present invention;
[0021] Figure 2 The overall framework flow chart of the red date disaster drone image recognition method based on improved ResNet50 provided in an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of the network structure of the improved ResNet50 model provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of the CBAM attention mechanism module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0025] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0026] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the embodiments of the present invention belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0027] Figure 1A flowchart of a method for identifying red date disaster drone images based on improved ResNet50 is provided in an embodiment of the present invention, as shown in FIG. Figure 1 As shown, the method comprises at least the following steps:
[0028] Step S110, obtaining drone image data collected in the red date natural disaster area.
[0029] Here, drone images of the jujube natural disaster area are collected by using a drone equipped with a visible light camera, such as the collection of jujube natural disaster images around Ruoqiang County, Bayinguoleng Mongol Autonomous Prefecture, Xinjiang Uygur Autonomous Region.
[0030] Step S120, preprocessing the drone image data, and dividing it into a training set and a test set according to a certain ratio.
[0031] Here, due to external environmental factors such as illumination during data collection using the visible light system of the drone, the natural disaster images of red dates collected by the present invention have problems such as overbrightness and image distortion. And a small data set will cause overfitting of the model during the training process. In order to solve these problems, it is necessary to perform preprocessing operations such as adaptive image scaling and data enhancement on the collected drone image data. The preprocessing operation is a crucial step, which directly affects the efficiency and effect of model training.
[0032] The preprocessed dataset is divided into a training set and a test set. The common ratio is 7:3. This ensures that the model has enough data during the training process, and the test set can effectively evaluate the generalization ability of the model.
[0033] Step S130, inputting the training set into the constructed improved ResNet50 model for recognition and classification.
[0034] Here, the CBAM attention mechanism is embedded between the deep residual blocks of the improved ResNet50 model, and a Dropout regularization layer is added after the average pooling layer.
[0035] Based on the ResNet50 model, the embodiment of the present invention embeds the CBAM attention mechanism in the deep residual block, conducts comparative experiments, guides the residual network to focus on the disaster area, and reduces the weight of the background area; and adds a Dropout regularization layer after the average pooling layer to obtain an improved ResNet50 model. Optionally, the Dropout rate is set to 0.3, and 30% of the parameters are randomly discarded to reduce overfitting.
[0036] In order to enable the model to quickly locate the red date disaster area with the highest probability of damage and improve the recognition performance of the model, this example introduces the CBAM (Convolutional Block Attention Module) attention mechanism. The CBAM attention mechanism consists of two attention modules: channel attention mechanism and spatial attention. Channel attention is responsible for allocating resources between each convolution channel, and spatial attention transforms the spatial information in the original image into a space and retains key information, so that the neural network pays more attention to the area that plays a decisive role in image classification.
[0037] Step S140, using the focal loss function to calculate the classification loss value, and evaluating the classification result in combination with the accuracy.
[0038] Here, the focal loss function (Focal Loss) is mainly used to solve the loss function of data sample imbalance in model training tasks. In tasks such as red date natural disaster image recognition and classification, the model often faces the situation that data samples of different categories are extremely unbalanced, which may cause the model to over-train categories with relatively large sample sizes, while the recognition effect is poor for categories with relatively small sample sizes. Since there are fewer data samples of red dates caused by gale disasters during the data collection process, and there are certain similarities in the characterization of red dates caused by gale disasters and unaffected red dates, in order to alleviate the above problems, the embodiment of the present invention selects the focal loss function as the loss function of the improved ResNet50 model, so that the model pays more attention to samples that are difficult to classify and small samples. The focal loss function mainly solves the problem of data sample imbalance by increasing the weights of small samples (red dates caused by gale disasters) and difficult-to-classify samples, and reducing the weights of easy-to-classify samples. The expression of the focal loss function is:
[0039] FL(p t )=-α t (1-p t ) γ log(p t ) formula (1);
[0040] In the formula, p t is the model’s predicted probability for the true category; α t is a regulating factor used to balance the importance of each category; γ is a focus parameter that controls the degree of attention paid to difficult-to-classify samples.
[0041] The focal loss function is introduced by (1-p t ) γ Item, which increases the attention to difficult-to-classify samples. When the model predicts the probability p of the sample tWhen α is low (i.e. the sample is difficult to classify), the value of this item will be larger, thereby increasing the loss of the sample and making the model pay more attention to the samples that are difficult to classify. In addition, the focal loss function adjusts α t and γ, making the loss of red dates gale disaster samples more prominent, thereby guiding the improved ResNet50 model to pay more attention to these samples.
[0042] Accuracy is a direct indicator for evaluating the prediction accuracy of the model, which is specifically defined as the ratio of the number of correctly classified samples to the total number of samples. In order to objectively evaluate the effectiveness of the improved ResNet50 model, multiple indicators such as accuracy, loss value and confusion matrix are used to evaluate the classification results.
[0043] Step S150, performing hyperparameter optimization on the improved ResNet50 model according to the evaluation results, and selecting the optimal hyperparameter combination for model training.
[0044] Here, after multiple hyperparameter optimization combination experiments, the last saved model weight file is selected as the final training result.
[0045] Step S160, using the test set to verify the trained red date natural disaster identification model.
[0046] Here, the trained red date natural disaster identification model is verified, and the data shows that its accuracy rate can reach 97.27%.
[0047] In the embodiment of the present invention, a method for identifying red date disasters using drone images based on improved ResNet50 is proposed. By introducing attention mechanism and focal loss function, optimizing hyperparameters and structural design, the performance of the model in the task of identifying red date natural disasters is improved, and the identification of red date natural disasters with large planting areas and high canopy coverage is met. By combining drone remote sensing images and improved ResNet50 networks, rapid and accurate identification of natural disasters in red date planting areas is achieved, providing reliable data support and decision-making basis for agricultural management.
[0048] In some embodiments, the above-mentioned step S110 "obtaining drone image data collected in the red date natural disaster area" is further implemented through the following process: building a drone visible light image acquisition system by using a drone equipped with a visible light camera, and setting the heading lateral overlap rate and flight path information; using the drone visible light image acquisition system to collect red date natural disaster areas, and obtain drone image data, including a strong wind disaster data set, a hail disaster data set and a normal date tree data set; placing the drone image data in different folders according to different disaster categories, and establishing a red date disaster image database.
[0049] Here, when setting up the drone visible light image acquisition system, ensure that the drone is stable and the visible light camera is firmly installed. Check the camera parameter settings, such as resolution, exposure, etc. The heading overlap rate (along the route direction) and the side overlap rate (perpendicular to the route direction) are usually set between 60%-80% to ensure that there is enough overlap when the images are stitched. The setting of the overlap rate depends on the flight altitude of the drone and the characteristics of the camera.
[0050] The built-in GPS and IMU of the drone can be used to obtain the heading overlap rate and flight path information. After the flight is completed, the image data and location information data are downloaded from the drone. After sorting, the collected data of different disaster types and healthy red dates are placed in different folders to represent different categories, which is convenient for subsequent model training and testing.
[0051] In some embodiments, the above-mentioned step S120 "preprocessing the drone image data and dividing it into a training set and a test set according to a certain ratio" is further implemented through the following process: adaptively scaling the drone image data; for each image data after scaling, enhancing it by using four methods including Gaussian blur, horizontal flipping, elastic transformation and random rotation of 90°, and then randomly selecting one method from rectangular discarding, grid distortion and optical distortion to perform data enhancement operation; dividing all data samples after enhancement processing into a training set and a test set according to a ratio of 7:3.
[0052] Here, the three categories of data sets are divided into training sets and test sets in a ratio of 7:3, and the resolution of all sample data is uniformly adjusted to 512 pixels × 512 pixels to reduce the pixel value of disaster pictures and remove redundant information in the images to reduce the computational complexity of the model.
[0053] Data augmentation methods include: Gaussian blur: Adding Gaussian noise to simulate different imaging conditions and increase the robustness of the model. Horizontal flip: Increase the diversity of the image and simulate the situation of the image in different directions. Elastic transformation: Simulate the deformation that the image may encounter in the actual environment. Random rotation of 90°: Increase the rotation diversity of the image and simulate observations at different angles. Then randomly select one of the methods from rectangle drop, grid distortion and optical distortion for data augmentation operation to further improve the diversity of the dataset.
[0054] Through these preprocessing steps, the training efficiency and generalization ability of the model can be effectively improved, laying a solid foundation for subsequent model training.
[0055] In some embodiments, the improved ResNet50 model is mainly divided into 6 stages: the first stage (Stage0) includes the input layer and preliminary convolution, and extracts features through convolution layers and maximum pooling; the second stage to the fifth stage (Stage1-Stage4) are mainly composed of residual blocks, which are used to extract high-level features, wherein the CBAM attention mechanism is embedded between the residual blocks of the fourth stage to the residual blocks of the fifth stage; the sixth stage (Stage5) outputs the classification results through adaptive average pooling and a fully connected layer. Each stage effectively trains the deep network through residual connections, and gradually learns the image features of the drone image data from low-level to high-level.
[0056] Here, if Figure 3 As shown, the improved ResNet50 model constructed in the embodiment of the present invention is mainly divided into 6 stages. Stage0 includes the input layer and preliminary convolution, and extracts features through a 7×7 convolution layer (Conv Block1) and a 3×3 maximum pooling layer (Max Pool); Stage1-Stage4 are mainly composed of residual blocks (Bottleneck) to extract high-level features, wherein the CBAM attention mechanism is embedded between the residual blocks of Stage3-Stage4, the purpose of which is to filter semantic information at a high-order semantic level through the attention mechanism, so as to quickly locate the red date disaster area with the highest probability of damage, thereby improving the classification accuracy of the residual network model; Stage5 outputs the classification result through adaptive average pooling (Ave Pool) and a fully connected layer (FC layer). Each stage effectively trains the deep network through residual connections, and gradually learns the features of the image from low-level to high-level. The output formula of the residual block is as follows:
[0057] y=F(x,{W i})+x Formula (2);
[0058] In the formula, x represents the input vector, y represents the output vector, Wi represents the weight of each layer, F(x,{W i}) represents the internal mapping of the residual block to be learned.
[0059] In some embodiments, the improved ResNet50 model is hyperparameter optimized based on the evaluation results, and the optimal hyperparameter combination is selected for model training, including: for the improved ResNet50 model, the learning rate is set to three momentum gradients of 0.01, 0.001, and 0.0001, the batch size is set to three gradients of 8, 16, and 32, the momentum is set to 0.9, the model training rounds are set to 50 for each experiment, multiple experiments are conducted and the experimental results are compared, and a set of optimal hyperparameter combinations are selected for model training.
[0060] Here, the hardware platform used is Intel(R) Core(TM) i9-9900 CPU@3.60GHz, and the GPU used for model testing is NVIDIA RTX 1080 (video memory 11GB). All experiments are implemented in the Pytorch1.8 deep learning framework using python3.9. The hyperparameters of the constructed improved ResNet50 model are optimized. According to the characteristics of the network depth and the data set, the momentum is set to 0.9, the learning rate is set to 0.01, 0.001, and 0.0001, and the batch size is set to 8, 16, and 32. The combination of three gradients is used to search for the optimal combination experiment. In the process of training the model, after 50 epochs, the model training accuracy reaches a convergence state, so the training epoch is set to 50 epochs.
[0061] Accuracy is a direct indicator for evaluating the prediction accuracy of the model, which is specifically defined as the ratio of the number of correctly classified samples to the total number of samples. In order to objectively evaluate the effectiveness of the improved ResNet50 model, the test set results were evaluated using multiple indicators such as accuracy, loss value, and confusion matrix, and the last saved model weight file was selected as the final training result. According to the results of the hyperparameter optimization combination experiment, the model training effect is optimal when the final learning rate is set to 0.0001 and the batch size is set to 8.
[0062] By comparing with the accuracy of 95.51% of the ResNet50 model, the recognition accuracy of the improved ResNet50 model proposed in the present invention reaches 97.27%, which improves the accuracy by 1.76%, and the loss value is only 0.0285, which proves the rationality of the improved ResNet50 model and helps to improve the accuracy of natural disaster identification and classification of red dates.
[0063] In some embodiments, the CBAM attention mechanism includes a channel attention module and a spatial attention module; the channel attention module uses average pooling and maximum pooling to generate two 1×1×C feature vectors, where C is the number of channels; and calculates the channel weight through a fully connected layer, thereby weighting each channel of the original feature map to highlight important features; the spatial attention module focuses on the spatial position information of the feature map, and generates two H×W×1 feature maps by performing maximum pooling and average pooling on the channel-weighted feature map, where H and W are the height and width of the feature map, respectively; the stacked feature maps are passed through a convolutional layer to generate a single-channel spatial attention map, and weights are assigned to the positions in the image that need to be suppressed or enhanced, which serve as input for further learning and inference of the improved ResNet50 model.
[0064] Here, the embodiment of the present invention introduces the CBAM attention mechanism structure, such as Figure 4 As shown in the figure, the specific scheme includes the following: the channel attention mechanism applies global average pooling (avgpool) and global maximum pooling (maxpool) to the input feature map F (shape is B×C×H×W, B is the batch size) to aggregate spatial information and reduce the dimension of the feature to two 1×1×C vectors, representing the average pooling feature F and the average pooling feature F. avg And the maximum pooling feature F max Then the two eigenvectors (F avg 、F max ) pass through a multi-layer perceptron with shared weights, and output z avg and z max Finally, the channel attention map z is calculated, and its shape is B×C×1×1. Then, the channel attention map z is multiplied by the original feature map F to obtain the weighted feature map F'. Finally, the Sigmoid activation function is used to activate the weighted feature map F', and the output M of the channel attention module is finally obtained. c .
[0065] The spatial attention module SAM is different from the channel attention mechanism in that the spatial attention mechanism focuses on the position information. As a supplement to the channel attention in the H×W dimension, it uses the weighted feature map F' generated on the channel to generate F' through channel compression. avg and F' max , and concatenate these two feature descriptors to get F' concat . Then the spatial attention map s (shape is B×1×H×W) generated by the convolutional layer is multiplied by the weighted feature map F' to output the final feature map F'. The calculation formula is as follows:
[0066]
[0067] In the formula, represents the element-by-element multiplication operation, z and s are the channel attention map and the spatial attention map respectively.
[0068] By introducing the CBAM attention mechanism and enhancing the features in the channel and spatial domains, the improved ResNet50 model pays more attention to the important feature information in the image and improves the perception of the improved ResNet50 model on the key domains of the image, so that the red date disaster areas with the highest probability of damage can be quickly located, thereby improving the recognition performance of the model.
[0069] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0070] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0071] In the several embodiments provided by the present invention, it should be understood that the disclosed methods can be implemented in other ways. The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments. The features disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0072] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for identifying red date disaster drone images based on improved ResNet50, characterized in that: include: Obtain drone image data collected in the red date natural disaster area; Preprocess the drone image data and divide them into a training set and a test set according to a certain ratio; Input the training set into the constructed improved ResNet50 model for recognition and classification; wherein the CBAM attention mechanism is embedded between the deep residual blocks of the improved ResNet50 model, and a Dropout regularization layer is added after the average pooling layer; The classification loss value is calculated using the focal loss function, and the classification result is evaluated in combination with the accuracy; According to the evaluation results, the hyperparameters of the improved ResNet50 model are optimized, and the optimal hyperparameter combination is selected for model training; The test set is used to verify the trained red date natural disaster identification model.
2. The method according to claim 1, characterized in that The acquisition of drone image data collected in the red date natural disaster area includes: Build a UAV visible light image acquisition system by using a visible light camera mounted on the UAV, and set the heading side overlap rate and flight path information; The unmanned aerial vehicle visible light image acquisition system is used to collect data from the red date natural disaster area to obtain unmanned aerial vehicle image data, including a high wind disaster data set, a hail disaster data set, and a normal date tree data set; The drone image data are placed in different folders according to different disaster categories to establish a red date disaster image database.
3. The method according to claim 1, characterized in that The data preprocessing of the drone image data and dividing it into a training set and a test set according to a certain ratio includes: Performing adaptive image scaling on the drone image data; For each scaled image data, four methods are used for enhancement: Gaussian blur, horizontal flip, elastic transformation, and random rotation of 90°. Then, one method is randomly selected from rectangular discard, grid distortion, and optical distortion for data enhancement. All enhanced data samples are divided into training set and test set in a ratio of 7:
3.
4. The method according to claim 1, characterized in that: The improved ResNet50 model is optimized for hyperparameters based on the evaluation results, and the optimal hyperparameter combination is selected for model training, including: For the improved ResNet50 model, the learning rate was set to three momentum gradients of 0.01, 0.001, and 0.0001, the batch size was set to three gradients of 8, 16, and 32, the momentum was set to 0.9, and the model training rounds were set to 50 in each experiment. Multiple experiments were conducted and the experimental results were compared to select a set of optimal hyperparameter combinations for model training.
5. The method according to any one of claims 1 to 4, characterized in that: The improved ResNet50 model is mainly divided into 6 stages: the first stage includes the input layer and preliminary convolution, and extracts features through convolution layers and maximum pooling; the second to fifth stages are mainly composed of residual blocks, which are used to extract high-level features, and the CBAM attention mechanism is embedded between the residual blocks in the fourth stage and the residual blocks in the fifth stage; the sixth stage outputs the classification results through adaptive average pooling and fully connected layers. Each stage effectively trains the deep network through residual connections, and gradually learns the image features of drone image data from low-level to high-level.
6. The method according to any one of claims 1 to 4, characterized in that: The CBAM attention mechanism includes a channel attention module and a spatial attention module; The channel attention module generates two 1×1×C feature vectors using average pooling and maximum pooling, where C is the number of channels; The channel weights are calculated through the fully connected layer, so that each channel of the original feature map is weighted to highlight important features; The spatial attention module focuses on the spatial position information of the feature map, and generates two H×W×1 feature maps by performing maximum pooling and average pooling on the channel-weighted feature maps, where H and W are the height and width of the feature maps, respectively. The stacked feature maps are passed through a convolutional layer to generate a single-channel spatial attention map, and weights are assigned to the positions in the image that need to be suppressed or enhanced, which serve as input for further learning and inference of the improved ResNet50 model.
Citation Information
Cited By
Unmanned aerial vehicle forest damage monitoring method and system based on time perception attention
CN120544082A