An efficient identification and safety warning method for hazardous chemical vehicles based on drones
Through drone-based image acquisition and deep learning model training, fast intelligent identification and safety warning of hazardous chemical vehicles are achieved, solving the problems of complex response and inaccurate detection in the existing technology, and improving safety and response efficiency.
Patent Information
- Application Number
- CN202411595000.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The prior art has failed to effectively realize the rapid and intelligent identification and safety warning of hazardous chemical vehicles, resulting in complex and difficult responses in the event of an accident.
Using a drone-based method, we collect images of vehicles traveling on the road, enhance image quality and update pixels, build data sets and train deep learning models, integrate the interchange and comparison optimization method to achieve efficient intelligent detection and identification of hazardous chemical vehicles, and conduct safety warnings.
It improves the accuracy and response speed of hazardous chemical vehicle inspection, reduces the risk of personnel facing dangerous environments, and enhances safety protection for sensitive areas.
Smart Images

Figure CN119091402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for efficient identification and safety warning of hazardous chemical vehicles, and in particular to a method for efficient identification and safety warning of hazardous chemical vehicles based on unmanned aerial vehicles, belonging to the technical field of traffic monitoring and safety warning. Background Art
[0002] Hazardous chemical vehicles refer to vehicles used to transport hazardous chemicals. They are specially designed to safely transport chemicals classified as potentially hazardous, such as flammable liquids, corrosive substances, toxic chemicals, etc. Hazardous chemical vehicles face a variety of potential risks when transporting hazardous chemicals. Vehicle accidents may cause serious environmental pollution, affect soil, water and air quality, and have long-term ecological impacts. Because chemical leaks may cause burns, poisoning or other serious injuries, personal safety is also extremely vulnerable to threats. In addition, many hazardous chemicals are flammable and explosive. Once an accident occurs, it may cause a large-scale fire or explosion, causing huge property losses and life safety risks. The driving of hazardous chemical vehicles on the road may also affect the maneuverability due to the weight and properties of the chemicals, increasing the possibility of traffic accidents. Finally, hazardous chemical vehicle accidents require professional handling teams and efficient emergency measures to cope with the various challenges and high-risk environments brought about by the accidents, so there is a problem of complex and difficult emergency response.
[0003] The use of drones to identify hazardous chemical vehicles is of great significance. Drones can conduct efficient aerial monitoring in vast or inaccessible areas, quickly identify and track hazardous chemical vehicles, and improve response speed and monitoring range. Drones can capture dynamic information of vehicle movement in real time and promptly detect abnormal behavior or potential dangers, thereby preventing accidents or taking rapid response measures in the early stages of an accident. In addition, the use of drones reduces the risk of personnel directly facing dangerous environments and improves the efficiency and effectiveness of safety supervision.
[0004] For sensitive areas such as hospitals, schools, and densely populated areas, accidents involving hazardous chemical vehicles have serious consequences. Early warning can enhance safety, protect sensitive facilities in hospitals and other areas from vibrations or chemical leaks, and ensure the normal operation of medical equipment. In addition, early warning can enable hospitals, schools, and surrounding communities to prepare for emergency services in advance, effectively respond to possible emergencies, and quickly implement evacuation and emergency medical response. The above measures not only protect the operational safety of hospitals, schools, and other areas, but also maintain the health of residents in surrounding communities. However, in the existing technology, traffic monitoring has not yet involved rapid intelligent identification of hazardous chemical vehicles, nor can it achieve safety early warnings for hazardous chemical vehicles.
[0005] Therefore, there is a need for an efficient identification and safety warning method for hazardous chemical vehicles based on drones. Summary of the invention
[0006] A brief overview of the present invention is provided below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this overview is not an exhaustive overview of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0007] In view of this, in order to solve the problem that the traditional traffic condition monitoring method in the prior art does not involve rapid intelligent identification and safety warning for hazardous chemical vehicles, the present invention provides an efficient identification and safety warning method for hazardous chemical vehicles based on a drone.
[0008] The technical solution is as follows: A method for efficient identification and safety warning of hazardous chemical vehicles based on drones, comprising the following steps:
[0009] S1. Collect images of vehicles traveling on the road to generate an image matrix, and enhance the image quality to obtain a new image matrix;
[0010] S2. equally divide the image in the new image matrix and update the image pixels to obtain an image after pixel update;
[0011] S3. construct a data set based on the image after pixel update, input the data set into the established basic model, auxiliary model and enhanced model for training, fuse the loss functions of the three models to obtain the fused loss function, train the three models, and obtain the three trained models;
[0012] S4. According to the intersection-and-union optimization method, the three trained models are trained, and the trained basic model is used as the final model. The accuracy of the optimal model is screened to obtain the final optimal model, and the driving status of the hazardous chemical vehicle is output;
[0013] Specifically: the driving status of hazardous chemicals vehicles includes the location and speed of hazardous chemicals vehicles;
[0014] S5. Predict the driving status of the hazardous chemicals vehicle based on the output driving status of the hazardous chemicals vehicle, update it by introducing parameters, and obtain the updated driving status of the hazardous chemicals vehicle. Obtain the warning result of the hazardous chemicals vehicle based on the distance between the updated position of the hazardous chemicals vehicle and the marked location and the set distance safety threshold.
[0015] Furthermore, the S1 specifically includes the following steps:
[0016] S11. Using the high-definition camera on the drone, collect the image ph of the vehicle traveling on the road, and the corresponding image matrix is PH;
[0017] S12. Construct a 5th-order denoising kernel function N, normalize all elements in the kernel function, and obtain the normalized denoising kernel function ;
[0018] S13. According to the normalized denoising kernel function , perform denoising kernel function processing on the image to obtain a new image matrix P to achieve image quality enhancement;
[0019] In S12, the fifth-order denoising kernel function N is expressed as:
[0020] ;
[0021] ;
[0022] Where x=1, 2, 3, 4 or 5, x is the row number of the matrix, and y=1, 2, 3, 4 or 5, y is the column number of the matrix. is the standard deviation of all elements in the kernel function, is the base of natural logarithms;
[0023] Normalized denoising kernel function It is expressed as:
[0024] ;
[0025] In S13, the new image matrix P is expressed as:
[0026] .
[0027] Furthermore, the step S2 includes the following steps:
[0028] S21. According to the new image matrix P, the pixel grayscale value is divided into 16 grayscale levels, and the image in the new image matrix P is divided into n equal parts to obtain the divided image;
[0029] S22. Count the pixel frequencies corresponding to each gray level in the equally divided image , calculate the grayscale frequency cumulative value corresponding to each grayscale level in the equally divided image ;
[0030] S23.According to the gray frequency cumulative value , construct a pixel value update method and calculate the pixel update value corresponding to the gray level , get the image after pixel update;
[0031] In S21, the pixel gray value is 0-255, and the gray level is , =1, 2, 3, …, 16, is the grayscale number, and the image after equal division is Pnum, num=1, 2, ..., n;
[0032] In S22, each gray level in the equally divided image Pnum The corresponding gray frequency cumulative value It is expressed as:
[0033] ;
[0034] in, is less than or equal to The gray level number, Indicates the gray level number is Gray level;
[0035] In S23, the pixel update value corresponding to the gray level It is expressed as:
[0036] ;
[0037] in, is the minimum non-zero value among all pixel frequency accumulation values, is the total number of pixels corresponding to the equally divided image Pnum, is the maximum value of the gray level.
[0038] Furthermore, the step S3 specifically includes the following steps:
[0039] S31. Based on the pixel updated image, select all images containing hazardous chemicals vehicles, passenger cars, commercial vehicles and buses as input images;
[0040] S32. Through manual annotation, four types of vehicles, namely, hazardous chemical vehicles, passenger cars, commercial vehicles, and buses, are selected from the input image, and a data set is constructed. The data set is divided into a training set and a test set in a ratio of 8:2;
[0041] S33. According to the data set, a basic model, an auxiliary model and an enhanced model are constructed, and the loss functions of the three models are calculated and integrated to obtain a fused loss function;
[0042] In S32, hazardous chemicals vehicles, passenger cars, commercial vehicles and buses are marked as Dangerous, Passenger, Commercial and Bus respectively;
[0043] In the S33, a network structure of a basic model, i.e., a deep learning model A, is constructed, and the deep learning model A consists of 1 input layer, 9 convolutional layers, 9 activation layers, 3 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer;
[0044] Input the data set into the deep learning model A, calculate the weights and biases of the neural network units of the deep learning model A through the error back propagation algorithm, complete the training of the deep learning model A, and obtain the trained deep learning model A and its loss function ;
[0045] The output value of the output unit node corresponding to the deep learning model A is , respectively, are the output values of the first output unit node , the output value of the second output unit node , the output value of the third output unit node and the output value of the fourth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model A are initially converted into the probability values of the first preliminary output value and the first preliminary output value. , and then further optimize and transform it to obtain the first optimized output value and the enhanced probability value of the first optimized output value ;
[0046] The enhanced probability value using the first optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model A. After the training is completed, the output value of the first vehicle type is obtained The actual vehicle type label corresponding to the node of the output layer of the deep learning model A , the output value of the first vehicle type They are the output values of the first hazardous chemicals vehicle , the output value of the first passenger car , the output value of the first commercial vehicle and the first bus output value ;
[0047] The first auxiliary model, deep learning model B, is constructed. Deep learning model B consists of 1 input layer, 9 convolutional layers, 9 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer.
[0048] Input the data set into the deep learning model B, calculate the weights and biases of the neural network units of the deep learning model B through the error back propagation algorithm, complete the training of the deep learning model B, and obtain the trained deep learning model B and its loss function ;
[0049] The output value of the output unit node corresponding to the deep learning model B is , respectively, are the output values of the fifth output unit node , the output value of the sixth output unit node , the output value of the seventh output unit node and the output value of the eighth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model B are initially converted into the second preliminary output value and the probability value of the second preliminary output value , and then further optimize and transform it to obtain the second optimized output value and the enhanced probability value of the second optimized output value ;
[0050] The enhanced probability value using the second optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model B. After the training is completed, the output value of the second vehicle type is obtained The actual vehicle type labels corresponding to the nodes in the output layer of the deep learning model B , the output value of the second vehicle type They are the output values of the second hazardous chemicals vehicle , Output value of the second passenger car , Output value of the second commercial vehicle and the second bus output value ;
[0051] The second auxiliary model, namely the deep learning model C, is constructed. The deep learning model C consists of 1 input layer, 12 convolutional layers, 12 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer.
[0052] Input the data set into the deep learning model C, calculate the weights and biases of the neural network units of the deep learning model C through the error back propagation algorithm, complete the training of the deep learning model C, and obtain the trained deep learning model C and its loss function ;
[0053] The output value of the output unit node corresponding to the deep learning model C is , respectively, are the output values of the ninth output unit node , the output value of the tenth output unit node , the output value of the eleventh output unit node and the output value of the twelfth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model C are initially converted into the third preliminary output value and the probability value of the third preliminary output value , and then further optimize and transform it to obtain the third optimized output value and the enhanced probability value of the third optimized output value ;
[0054] The enhanced probability value using the third optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model C. After the training is completed, the output value of the third vehicle type is obtained The actual vehicle type labels corresponding to the nodes in the output layer of the deep learning model B , the output value of the third vehicle type They are the output values of the third hazardous chemicals vehicle , Output value of the third passenger car , Output value of third commercial vehicle and the third bus output value ;
[0055] Construct a reinforcement model, namely the deep learning model D, which consists of 1 input layer, 14 convolutional layers, 14 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer and 1 output layer;
[0056] Input the data set into the deep learning model D, calculate the weights and biases of the neural network units of the deep learning model D through the error back propagation algorithm, complete the training of the deep learning model D, and obtain the trained deep learning model D and its loss function ;
[0057] The output value of the output unit node corresponding to the deep learning model D is , respectively, are the output values of the thirteenth output unit node , the output value of the fourteenth output unit node , the output value of the fifteenth output unit node and the output value of the sixteenth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model D are initially converted into the fourth preliminary output value and the probability value of the fourth preliminary output value , and then further optimize and transform it to obtain the fourth optimized output value and the enhanced probability value of the fourth optimized output value ;
[0058] The enhanced probability value using the fourth optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model D. After the training is completed, the output value of the fourth vehicle type is obtained The actual vehicle type annotations corresponding to the nodes in the output layer of the deep learning model D , output value of the fourth vehicle type They are the output values of the fourth hazardous chemicals vehicle , Output value of the fourth passenger car , Fourth Commercial Vehicle Output Value and the fourth bus output value ;
[0059] The output value is based on the second vehicle type and the enhanced probability value of the first optimized output value , construct the loss function between deep learning model B and deep learning model A , get the corresponding weight coefficient;
[0060] Probability value based on the first preliminary output value The actual vehicle type label corresponding to the node of the output layer of the deep learning model A , construct the probability value considering the first preliminary output value The loss function of the deep learning model A is , get the corresponding weight coefficient;
[0061] Based on the loss function between deep learning model B and deep learning model A and the probability value considering the first preliminary output value The loss function of the deep learning model A is , establish the relationship loss function between the output layer of deep learning model B and deep learning model A ;
[0062] According to the above operations, the relationship loss function between the output layers of deep learning model C and deep learning model B is established. , the relationship loss function between the output layer of deep learning model C and deep learning model A , the relationship loss function between the output layer of deep learning model D and deep learning model A The relationship loss function between the output layers of deep learning model D and deep learning model C .
[0063] Furthermore, the step S4 specifically includes the following steps:
[0064] S41. For each target prediction bounding box and the corresponding true bounding box of the three trained models, calculate the intersection area between the two ;
[0065] S42. For each target prediction bounding box and the corresponding true bounding box of the three trained models, calculate the union area of the two ;
[0066] S43. Calculate the intersection area and the area of the union Corresponding intersection-over-union ratio IoU, introducing adjustment coefficient , construct the loss function of the target position , get the optimized intersection-over-union ratio IoU;
[0067] S44. According to the optimized intersection-over-union ratio IoU, the optimized intersection-over-union ratio calculation method is used to train the model, and the optimal model with the highest accuracy is selected to obtain the final optimal model, and the driving status of the hazardous chemicals vehicle is output;
[0068] In S43, the intersection over union (IoU) is expressed as:
[0069] ;
[0070] Loss function for target location It is expressed as:
[0071] ;
[0072] Set the intersection-over-union ratio threshold , according to the intersection ratio Intersection-over-Union Threshold The relationship between range, when When , the corresponding loss function of the target position Adjustment factor ,when When , the corresponding loss function of the target position Adjustment factor ,when When , the corresponding adjustment coefficient of the loss function ;
[0073] In S44, the corresponding overall loss function between deep learning model A, deep learning model B, deep learning model C and deep learning model D is defined. , , and get 32 overall loss functions In the form of, the three models are trained, and 32 deep learning models A trained with the overall loss function are obtained as the optimal model;
[0074] Overall loss function It is expressed as:
[0075] ;
[0076] in, is the relationship loss function between the output layers of deep learning model D and deep learning model C The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model C and deep learning model B The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model B and deep learning model A The weight coefficient is 0 or 1. is the relationship loss function between the output layer of deep learning model D and deep learning model A The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model D and deep learning model C The weight coefficient of is 0 or 1;
[0077] The accuracy of the deep learning model A trained with the overall loss function is recorded as , 32, calculate the maximum accuracy of the deep learning model A trained with the overall loss function , , select the maximum value The corresponding deep learning model A is the final optimal model.
[0078] Furthermore, the step S5 specifically includes the following steps:
[0079] S51. According to the output driving state of the hazardous chemical vehicle, locate the hazardous chemical vehicle, establish a two-dimensional coordinate system, calculate the speed of the hazardous chemical vehicle in the x-axis direction and the y-axis direction, and construct the vehicle initial state matrix;
[0080] S52. Construct the vehicle state transfer matrix and obtain the predicted The driving status of the hazardous chemicals vehicle at the moment is updated by introducing parameters to obtain the updated The driving status of hazardous chemicals vehicles at all times;
[0081] S53. Updated by analyzing The driving status of hazardous chemicals vehicles at the moment is updated according to the The distance between the hazardous chemical vehicle position at the moment and the marked location and the set distance safety threshold are used to obtain the early warning result of the hazardous chemical vehicle;
[0082] In S51, a two-dimensional coordinate system is constructed with the point where the drone is vertically dropped on the ground as the coordinate origin, the due east direction as the x-axis direction, and the due north direction as the y-axis direction. The location of the hazardous chemicals vehicle at this moment is , The position at time is ,based on Moment and The position relationship of hazardous chemicals vehicles at all times and the speed of hazardous chemicals vehicles ;
[0083] Speed of hazardous chemicals vehicles It is expressed as:
[0084] ;
[0085] The angle between the driving direction of the hazardous chemicals vehicle and the x-axis direction is , then the speed of the hazardous chemicals vehicle in the x-axis direction is , , the speed of the hazardous chemicals vehicle in the y-axis direction is , , the position of the hazardous chemicals vehicle identified by the drone for the first time is calculated as The speeds of the hazardous chemicals vehicle in the x-axis and y-axis directions are and On this basis, construct the vehicle initial state matrix ;
[0086] In S52, the vehicle state transfer matrix is expressed as , ,in, Indicates the time difference between the previous time and the next time, which is the time difference between the calculated prediction and the next prediction. The driving state of the hazardous chemicals vehicle at the moment introduces the process noise covariance Q, the observation matrix H, the observation noise covariance matrix R and the initial covariance matrix , get the updated The driving status of hazardous chemicals vehicles at all times ;
[0087] Predicted The driving status of hazardous chemicals vehicles at the moment is expressed as:
[0088] ;
[0089] in, for The horizontal coordinate of the position of the hazardous chemicals vehicle at the moment, for The vertical coordinate of the hazardous chemicals vehicle’s position at the moment, for The speed of the hazardous chemicals vehicle in the x-axis direction at the moment, is the speed of the hazardous chemicals vehicle in the y-axis direction;
[0090] For the prediction Error covariance prediction of the driving status of hazardous chemicals vehicles at the time ;
[0091] Error Covariance Forecast It is expressed as:
[0092] ;
[0093] Forecasting the error covariance Introduce gain value ZY;
[0094] The gain value ZY is expressed as:
[0095] ;
[0096] in, Transpose the matrix;
[0097] Updated The driving status of hazardous chemicals vehicles at all times It is expressed as:
[0098] ;
[0099] in, is the horizontal coordinate of the updated position of the hazardous chemicals vehicle, is the vertical coordinate of the updated position of the hazardous chemicals vehicle, is the speed of the hazardous chemicals vehicle in the x-axis direction, is the speed of the hazardous chemicals vehicle in the y-axis direction;
[0100] In S54, the coordinates of the marked location are obtained. , calculate the updated The distance between the hazardous chemicals vehicle's position and the marked location at any given moment ;
[0101] Updated The distance between the hazardous chemicals vehicle's position and the marked location at any given moment It is expressed as:
[0102] ;
[0103] in, is the horizontal coordinate of the marked location, is the vertical coordinate of the marked location;
[0104] Set distance safety threshold ,when When The distance between the position of the hazardous chemicals vehicle and the marked location at all times meets safety requirements. When The distance between the position of the hazardous chemical vehicle and the marked location at any moment does not meet the safety requirements, and an early warning of the hazardous chemical vehicle is required to obtain an early warning result of the hazardous chemical vehicle.
[0105] Furthermore, in S33, the layers in the network structure of the deep learning model A are connected in the following order:
[0106] Input layer: image size 227×227×3;
[0107] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0108] Activation layer 1: LeakyReLU;
[0109] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0110] Activation layer 2: LeakyReLU;
[0111] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0112] Activation layer 3: LeakyReLU;
[0113] Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0114] Activation layer 4: LeakyReLU;
[0115] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0116] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0117] Pooling layer 2: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0118] Pooling layer 3: Type: global average pooling, pooling size: 13×13, Stride: 1;
[0119] Pooling concatenation layer: connect the outputs of the three pooling layers;
[0120] PANet layer: aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0121] Convolutional layer 5: kernel size 3×3, number of kernels 768, stride: 2, batch normalization;
[0122] Activation layer 5: LeakyReLU;
[0123] Convolutional layer 6: kernel size 3×3, number of kernels 768, stride: 2, batch normalization;
[0124] Activation layer 6: LeakyReLU;
[0125] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0126] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0127] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0128] Activation layer 7: LeakyReLU;
[0129] Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0130] Activation layer 8: LeakyReLU;
[0131] Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0132] Activation layer 9: LeakyReLU;
[0133] Output layer: Type: Softmax, Number of neurons: 4.
[0134] Furthermore, in S33, the layers in the network structure of the deep learning model B are connected in the following order:
[0135] Input layer: image size 227×227×3;
[0136] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0137] Activation layer 1: LeakyReLU;
[0138] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0139] Activation layer 2: LeakyReLU;
[0140] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0141] Activation layer 3: LeakyReLU;
[0142] Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0143] Activation layer 4: LeakyReLU;
[0144] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0145] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0146] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0147] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0148] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0149] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0150] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0151] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0152] Convolution layer 5: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0153] Activation layer 5: LeakyReLU;
[0154] Convolutional layer 6: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0155] Activation layer 6: LeakyReLU;
[0156] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0157] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0158] Convolutional layer 7: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0159] Activation layer 7: LeakyReLU;
[0160] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0161] Activation layer 7: LeakyReLU;
[0162] Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0163] Activation layer 8: LeakyReLU;
[0164] Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0165] Activation layer 9: LeakyReLU;
[0166] Output layer: Type: Softmax, Number of neurons: 4.
[0167] Furthermore, in S33, the layers in the network structure of the deep learning model C are connected in the following order:
[0168] Input layer: image size 227×227×3;
[0169] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0170] Activation layer 1: LeakyReLU;
[0171] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0172] Activation layer 2: LeakyReLU;
[0173] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0174] Activation layer 3: LeakyReLU;
[0175] Convolutional layer 4: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0176] Activation layer 4: LeakyReLU;
[0177] Convolutional layer 5: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0178] Activation layer 5: LeakyReLU;
[0179] Convolutional layer 6: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0180] Activation layer 6: LeakyReLU;
[0181] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0182] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0183] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0184] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0185] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0186] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0187] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0188] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0189] Convolutional layer 7: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0190] Activation layer 7: LeakyReLU;
[0191] Convolutional layer 8: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0192] Activation layer 8: LeakyReLU;
[0193] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0194] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0195] Convolutional layer 9: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0196] Activation layer 9: LeakyReLU;
[0197] Convolution layer 10: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0198] Activation layer 10: LeakyReLU;
[0199] Convolutional layer 11: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0200] Activation layer 11: LeakyReLU;
[0201] Convolutional layer 12: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0202] Activation layer 12: LeakyReLU;
[0203] Output layer: Type: Softmax, Number of neurons: 4.
[0204] Furthermore, in S33, the layers in the network structure of the deep learning model D are connected in the following order:
[0205] Input layer: image size 227×227×3;
[0206] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0207] Activation layer 1: LeakyReLU;
[0208] Convolutional layer 2: convolution kernel size 3×3, number of convolution kernels 32, stride: 1, batch normalization;
[0209] Activation layer 2: LeakyReLU;
[0210] Convolution layer 3: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0211] Activation layer 3: LeakyReLU;
[0212] Convolutional layer 4: convolution kernel size 3×3, number of convolution kernels 64, stride: 1, batch normalization;
[0213] Activation layer 4: LeakyReLU;
[0214] Convolutional layer 5: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0215] Activation layer 5: LeakyReLU;
[0216] Convolutional layer 6: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0217] Activation layer 6: LeakyReLU;
[0218] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0219] Activation layer 7: LeakyReLU;
[0220] Convolutional layer 8: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0221] Activation layer 8: LeakyReLU;
[0222] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0223] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0224] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0225] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0226] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0227] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0228] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0229] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0230] Convolutional layer 9: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0231] Activation layer 9: LeakyReLU;
[0232] Convolution layer 10: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0233] Activation layer 10: LeakyReLU;
[0234] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0235] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0236] Convolutional layer 11: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0237] Activation layer 11: LeakyReLU;
[0238] Convolutional layer 12: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0239] Activation layer 12: LeakyReLU;
[0240] Convolutional layer 13: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0241] Activation layer 13: LeakyReLU;
[0242] Convolutional layer 14: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0243] Activation layer 14: LeakyReLU;
[0244] Output layer: Type: Softmax, Number of neurons: 4.
[0245] The beneficial effects of the present invention are as follows: the present invention enhances the quality of images of vehicles traveling on the road collected by drones, improves the image clarity, and reduces the image noise; the present invention updates the pixels of the quality-enhanced images, and improves the contrast between the target vehicle area and the surrounding environment; the present invention optimizes the optimal basic model by integrating the intersection-and-union method, thereby realizing efficient and intelligent detection and identification of hazardous chemical vehicles, improving the accuracy of hazardous chemical vehicle detection, and enhancing the adaptability and accuracy of the model to vehicle detection; the present invention analyzes the distance between the current position of the hazardous chemical vehicle and the marked location, and performs a safety warning for the hazardous chemical vehicle in combination with a set distance safety threshold, thereby ensuring public safety and enhancing the emergency response capability of public areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0246] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0247] Figure 1 The figure is a flow chart of an efficient identification and safety warning method for hazardous chemical vehicles based on drones. DETAILED DESCRIPTION
[0248] In order to make the technical solutions and advantages of the embodiments of the present invention more clearly understood, the exemplary embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0249] refer to Figure 1 The present embodiment is described in detail, a method for efficiently identifying hazardous chemical vehicles and providing safety warning based on a drone, specifically comprising the following steps:
[0250] S1. Collect images of vehicles traveling on the road to generate an image matrix, and enhance the image quality to obtain a new image matrix;
[0251] S2. equally divide the image in the new image matrix and update the image pixels to obtain an image after pixel update;
[0252] S3. construct a data set based on the image after pixel update, input the data set into the established basic model, auxiliary model and enhanced model for training, fuse the loss functions of the three models to obtain the fused loss function, train the three models, and obtain the three trained models;
[0253] S4. According to the intersection-and-union optimization method, the three trained models are trained, and the trained basic model is used as the final model. The accuracy of the optimal model is screened to obtain the final optimal model, and the driving status of the hazardous chemical vehicle is output;
[0254] Specifically: the driving status of hazardous chemicals vehicles includes the location and speed of hazardous chemicals vehicles;
[0255] S5. Predict the driving status of the hazardous chemicals vehicle based on the output driving status of the hazardous chemicals vehicle, update it by introducing parameters, and obtain the updated driving status of the hazardous chemicals vehicle. Obtain the warning result of the hazardous chemicals vehicle based on the distance between the updated position of the hazardous chemicals vehicle and the marked location and the set distance safety threshold.
[0256] Furthermore, the S1 specifically includes the following steps:
[0257] S11. Using the high-definition camera on the drone, collect the image ph of the vehicle traveling on the road, and the corresponding image matrix is PH;
[0258] S12. Construct a 5th-order denoising kernel function N, normalize all elements in the kernel function, and obtain the normalized denoising kernel function ;
[0259] S13. According to the normalized denoising kernel function , perform denoising kernel function processing on the image to obtain a new image matrix P to achieve image quality enhancement;
[0260] In S12, the fifth-order denoising kernel function N is expressed as:
[0261] ;
[0262] ;
[0263] Where x=1, 2, 3, 4 or 5, x is the row number of the matrix, and y=1, 2, 3, 4 or 5, y is the column number of the matrix. is the standard deviation of all elements in the kernel function, is the base of natural logarithms;
[0264] Normalized denoising kernel function It is expressed as:
[0265] ;
[0266] In S13, the new image matrix P is expressed as:
[0267] ;
[0268] Specifically, drones may be affected by wind or other environmental factors during flight, causing body vibrations, which in turn affects the stability and clarity of the image. The camera equipment of drones is limited by their size and cost, and is prone to noise under undesirable lighting conditions. Changes in the flight altitude and angle of the drone will also affect the angle and proportion of the image, increasing the complexity of image processing. Due to the combined effect of the above factors, the quality of images collected by drones is affected and the noise level is relatively high. Therefore, in order to accurately identify hazardous chemical vehicles, the image quality is enhanced.
[0269] Furthermore, the step S2 includes the following steps:
[0270] S21. According to the new image matrix P, the pixel grayscale value is divided into 16 grayscale levels, and the image in the new image matrix P is divided into n equal parts to obtain the divided image;
[0271] S22. Count the pixel frequencies corresponding to each gray level in the equally divided image , calculate the grayscale frequency cumulative value corresponding to each grayscale level in the equally divided image ;
[0272] S23.According to the gray frequency cumulative value , construct a pixel value update method and calculate the pixel update value corresponding to the gray level , get the image after pixel update;
[0273] In S21, the pixel gray value is 0-255, and the gray level is , =1, 2, 3, …, 16, is the grayscale number, and the image after equal division is Pnum, num=1, 2, ..., n;
[0274] In S22, each gray level in the equally divided image Pnum The corresponding gray frequency cumulative value It is expressed as:
[0275] ;
[0276] in, is less than or equal to The gray level number, Indicates the gray level number is Gray level;
[0277] In S23, the pixel update value corresponding to the gray level It is expressed as:
[0278] ;
[0279] in, is the minimum non-zero value among all pixel frequency accumulation values, is the total number of pixels corresponding to the equally divided image Pnum, is the maximum value of gray level;
[0280] Specifically, when drones collect vehicle images, the constantly changing lighting conditions, such as cloud cover, changes in sunlight angle, and weather changes, will affect the brightness and contrast of the image, reducing the distinction between the vehicle and the background. The flight altitude and angle changes of the drone also have an important impact on the image quality. Different shooting angles will cause perspective problems, such as obscured vehicles, further interfering with the recognition process. The technical limitations of drone cameras, especially in terms of dynamic range and color processing, will also lead to a decrease in the ability to capture details under complex lighting. Natural and man-made environmental factors, such as reflections and visual clutter, will interfere with the clarity and contrast of vehicle images. The above problems make it more difficult to identify vehicles from images collected by drones. Therefore, in order to obtain more accurate recognition results, the image pixels need to be updated.
[0281] The S3 specifically includes the following steps:
[0282] S31. Based on the pixel updated image, select all images containing hazardous chemicals vehicles, passenger cars, commercial vehicles and buses as input images;
[0283] S32. Through manual annotation, four types of vehicles, namely, hazardous chemical vehicles, passenger cars, commercial vehicles, and buses, are selected from the input image, and a data set is constructed. The data set is divided into a training set and a test set in a ratio of 8:2;
[0284] S33. According to the data set, a basic model, an auxiliary model and an enhanced model are constructed, and the loss functions of the three models are calculated and integrated to obtain a fused loss function;
[0285] In S32, hazardous chemicals vehicles, passenger cars, commercial vehicles and buses are marked as Dangerous, Passenger, Commercial and Bus respectively;
[0286] In the S33, a network structure of a basic model, i.e., a deep learning model A, is constructed, and the deep learning model A consists of 1 input layer, 9 convolutional layers, 9 activation layers, 3 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer;
[0287] Input the data set into the deep learning model A, calculate the weights and biases of the neural network units of the deep learning model A through the error back propagation algorithm, complete the training of the deep learning model A, and obtain the trained deep learning model A and its loss function ;
[0288] Loss function of the trained deep learning model A It is expressed as:
[0289] ;
[0290] in, is the total number of data samples in the dataset of deep learning model A, For the The true labels of samples, For deep learning model A, predict The probability that a sample is of category 1, is the natural logarithm;
[0291] The output value of the output unit node corresponding to the deep learning model A is , respectively, are the output values of the first output unit node , the output value of the second output unit node , the output value of the third output unit node and the output value of the fourth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model A are initially converted into the probability values of the first preliminary output value and the first preliminary output value. , and then further optimize and transform it to obtain the first optimized output value and the enhanced probability value of the first optimized output value ;
[0292] Probability value of the first preliminary output value It is expressed as:
[0293] ;
[0294] The enhanced probability value of the first optimized output value It is expressed as:
[0295] ;
[0296] in, G is the enhancement coefficient;
[0297] The enhanced probability value using the first optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model A. After the training is completed, the output value of the first vehicle type is obtained The actual vehicle type label corresponding to the node of the output layer of the deep learning model A , the output value of the first vehicle type They are the output values of the first hazardous chemicals vehicle , the output value of the first passenger car , the output value of the first commercial vehicle and the first bus output value ;
[0298] The first auxiliary model, deep learning model B, is constructed. Deep learning model B consists of 1 input layer, 9 convolutional layers, 9 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer.
[0299] Input the data set into the deep learning model B, calculate the weights and biases of the neural network units of the deep learning model B through the error back propagation algorithm, complete the training of the deep learning model B, and obtain the trained deep learning model B and its loss function ;
[0300] Loss function of the trained deep learning model B It is expressed as:
[0301] ;
[0302] in, is the total number of data samples in the dataset of deep learning model B, For the The true labels of samples, For deep learning model B to predict The probability that a sample is class 1;
[0303] The output value of the output unit node corresponding to the deep learning model B is , respectively, are the output values of the fifth output unit node , the output value of the sixth output unit node , the output value of the seventh output unit node and the output value of the eighth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model B are initially converted into the second preliminary output value and the probability value of the second preliminary output value , and then further optimize and transform it to obtain the second optimized output value and the enhanced probability value of the second optimized output value ;
[0304] Probability value of the second preliminary output value It is expressed as:
[0305] ;
[0306] The enhanced probability value of the second optimized output value It is expressed as:
[0307] ;
[0308] The enhanced probability value using the second optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model B. After the training is completed, the output value of the second vehicle type is obtained The actual vehicle type labels corresponding to the nodes in the output layer of the deep learning model B , the output value of the second vehicle type They are the output values of the second hazardous chemicals vehicle , Output value of the second passenger car , Output value of the second commercial vehicle and the second bus output value ;
[0309] The second auxiliary model, namely the deep learning model C, is constructed. The deep learning model C consists of 1 input layer, 12 convolutional layers, 12 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer.
[0310] Input the data set into the deep learning model C, calculate the weights and biases of the neural network units of the deep learning model C through the error back propagation algorithm, complete the training of the deep learning model C, and obtain the trained deep learning model C and its loss function ;
[0311] Loss function of the trained deep learning model C It is expressed as:
[0312] ;
[0313] in, is the total number of data samples in the dataset of the deep learning model C, For the The true labels of samples, For the deep learning model C to predict The probability that a sample is class 1;
[0314] The output value of the output unit node corresponding to the deep learning model C is , respectively, are the output values of the ninth output unit node , the output value of the tenth output unit node , the output value of the eleventh output unit node and the output value of the twelfth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model C are initially converted into the third preliminary output value and the probability value of the third preliminary output value , and then further optimize and transform it to obtain the third optimized output value and the enhanced probability value of the third optimized output value ;
[0315] The probability value of the third preliminary output value It is expressed as:
[0316] ;
[0317] The enhanced probability value of the third optimized output value It is expressed as:
[0318] ;
[0319] The enhanced probability value using the third optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model C. After the training is completed, the output value of the third vehicle type is obtained The actual vehicle type labels corresponding to the nodes in the output layer of the deep learning model B , the output value of the third vehicle type They are the output values of the third hazardous chemicals vehicle , Output value of the third passenger car , Output value of third commercial vehicle and the third bus output value ;
[0320] Construct a reinforcement model, namely the deep learning model D, which consists of 1 input layer, 14 convolutional layers, 14 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer and 1 output layer;
[0321] Input the data set into the deep learning model D, calculate the weights and biases of the neural network units of the deep learning model D through the error back propagation algorithm, complete the training of the deep learning model D, and obtain the trained deep learning model D and its loss function ;
[0322] Loss function of the trained deep learning model D It is expressed as:
[0323] ;
[0324] in, is the total number of data samples in the dataset of the deep learning model D, For the The true labels of samples, For the deep learning model D to predict The probability that a sample is class 1;
[0325] The output value of the output unit node corresponding to the deep learning model D is , respectively, are the output values of the thirteenth output unit node , the output value of the fourteenth output unit node , the output value of the fifteenth output unit node and the output value of the sixteenth output unit node , according to the exponential function First, the output values of the four output unit nodes corresponding to the deep learning model D are initially converted into the fourth preliminary output value and the probability value of the fourth preliminary output value , and then further optimize and transform it to obtain the fourth optimized output value and the enhanced probability value of the fourth optimized output value ;
[0326] Probability value of the fourth preliminary output value It is expressed as:
[0327] ;
[0328] Enhanced probability value of the fourth optimized output value It is expressed as:
[0329] ;
[0330] The enhanced probability value using the fourth optimized output value And the data set, combined with the error chain derivative rule, continue to train the deep learning model D. After the training is completed, the output value of the fourth vehicle type is obtained The actual vehicle type annotations corresponding to the nodes in the output layer of the deep learning model D , output value of the fourth vehicle type They are the output values of the fourth hazardous chemicals vehicle , Output value of the fourth passenger car , Fourth Commercial Vehicle Output Value and the fourth bus output value ;
[0331] The output value is based on the second vehicle type and the enhanced probability value of the first optimized output value , construct the loss function between deep learning model B and deep learning model A , get the corresponding weight coefficient;
[0332] Loss function between deep learning model B and deep learning model A It is expressed as:
[0333] ;
[0334] Probability value based on the first preliminary output value The actual vehicle type label corresponding to the node of the output layer of the deep learning model A , construct the probability value considering the first preliminary output value The loss function of the deep learning model A is , get the corresponding weight coefficient;
[0335] Consider the probability value of the first preliminary output value The loss function of the deep learning model A is It is expressed as:
[0336] ;
[0337] Based on the loss function between deep learning model B and deep learning model A and the probability value considering the first preliminary output value The loss function of the deep learning model A is , establish the relationship loss function between the output layer of deep learning model B and deep learning model A ;
[0338] The relationship loss function between the output layer of deep learning model B and deep learning model A It is expressed as:
[0339] ;
[0340] in, is the loss function between deep learning model B and deep learning model A The weight coefficient of is the probability value considering the first preliminary output value The loss function of the deep learning model A is The weight coefficient of
[0341] According to the above operations, the relationship loss function between the output layers of deep learning model C and deep learning model B is established. , the relationship loss function between the output layer of deep learning model C and deep learning model A , the relationship loss function between the output layer of deep learning model D and deep learning model A The relationship loss function between the output layers of deep learning model D and deep learning model C ;
[0342] Loss function between deep learning model C and deep learning model B It is expressed as:
[0343] ;
[0344] Consider the probability value of the second preliminary output value The loss function of the deep learning model B is It is expressed as:
[0345] ;
[0346] The relationship loss function between the output layers of deep learning model C and deep learning model B It is expressed as:
[0347] ;
[0348] in, is the loss function between deep learning model C and deep learning model B The weight coefficient of is the probability value considering the second preliminary output value The loss function of the deep learning model B is The weight coefficient of
[0349] Loss function between deep learning model C and deep learning model A It is expressed as:
[0350] ;
[0351] The relationship loss function between the output layer of deep learning model C and deep learning model A It is expressed as:
[0352] ;
[0353] in, is the loss function between deep learning model C and deep learning model A The weight coefficient of
[0354] Loss function between deep learning model D and deep learning model A It is expressed as:
[0355] ;
[0356] The relationship loss function between the output layer of deep learning model D and deep learning model A It is expressed as:
[0357] ;
[0358] in, is the loss function between deep learning model D and deep learning model A The weight coefficient of
[0359] Loss function between deep learning model D and deep learning model C It is expressed as:
[0360] ;
[0361] Consider the probability value of the third preliminary output value The loss function of the deep learning model C It is expressed as:
[0362] ;
[0363] The relationship loss function between the output layers of deep learning model D and deep learning model C It is expressed as:
[0364] ;
[0365] in, is the loss function between deep learning model D and deep learning model C The weight coefficient of
[0366] Specifically, in the vehicle images collected by drones, different types of vehicles have differences in size features, shape features, color features and logos. It is necessary to design the deep learning model structure based on the characteristics of different vehicle types. The designed model includes input layer, convolution layer, activation layer, pooling layer, merging layer, upsampling layer, PANet layer, pooling splicing layer, SPP layer and output layer. The functions of each layer in the structure are as follows:
[0367] Input layer: receives image data collected by drones and provides the network with raw pixel value input; Convolution layer: identifies basic image features of vehicles, such as edges and corners. Further deep convolution layers can identify complex features such as windows and contours; Activation layer: enables the model to handle nonlinear problems, such as distinguishing different models from various angles and conditions; Pooling layer: reduces the spatial size of data, improves computational efficiency, and makes feature detection more robust, helping the model maintain feature invariance in vehicle images of different sizes and shapes; Merging layer: merges feature maps from different paths, increases the information flow of the network, and combines features of different scales, which helps to process local details and overall structures of vehicles at the same time; Upsampling layer: enlarges the size of feature maps for restoration to higher resolution. When performing vehicle classification and detection, it helps to restore detail information and improve the accuracy of boundaries; PANet layer: enhances feature pyramids and feature fusion to improve the utilization of multi-scale features. Effectively integrate features of different scales to improve the recognition ability of small vehicles and long-distance vehicles; Pooling splicing layer: Combine multiple pooling outputs of different sizes to enhance the model's adaptability to scale, and enhance the recognition ability of vehicle size and shape through fields of view of different sizes; SPP layer: Allow the network to process input images of different sizes, ensure that the model can work effectively for vehicle images of different sizes and proportions, and enhance scale invariance; Output layer: Output key information such as vehicle category, location, and size based on the feature processing of the previous layer.
[0368] Furthermore, the step S4 specifically includes the following steps:
[0369] S41. For each target prediction bounding box and the corresponding true bounding box of the three trained models, calculate the intersection area between the two ;
[0370] S42. For each target prediction bounding box and the corresponding true bounding box of the three trained models, calculate the union area of the two ;
[0371] S43. Calculate the intersection area and the area of the union Corresponding intersection-over-union ratio IoU, introducing adjustment coefficient , construct the loss function of the target position , get the optimized intersection-over-union ratio IoU;
[0372] S44. According to the optimized intersection-over-union ratio IoU, the optimized intersection-over-union ratio calculation method is used to train the model, and the optimal model with the highest accuracy is selected to obtain the final optimal model, and the vehicle driving status and type are output;
[0373] In S43, the intersection over union (IoU) is expressed as:
[0374] ;
[0375] Loss function for target location It is expressed as:
[0376] ;
[0377] Set the intersection-over-union ratio threshold , according to the intersection ratio Intersection-over-Union Threshold The relationship between range, when When , the corresponding loss function of the target position Adjustment factor ,when When , the corresponding loss function of the target position Adjustment factor ,when When , the corresponding adjustment coefficient of the loss function ;
[0378] In S44, the corresponding overall loss function between deep learning model A, deep learning model B, deep learning model C and deep learning model D is defined. , , and get 32 overall loss functions In the form of, the three models are trained, and 32 deep learning models A trained with the overall loss function are obtained as the optimal model;
[0379] Overall loss function It is expressed as:
[0380] ;
[0381] in, is the relationship loss function between the output layers of deep learning model D and deep learning model C The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model C and deep learning model B The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model B and deep learning model A The weight coefficient is 0 or 1. is the relationship loss function between the output layer of deep learning model D and deep learning model A The weight coefficient is 0 or 1. is the relationship loss function between the output layers of deep learning model D and deep learning model C The weight coefficient of is 0 or 1;
[0382] The accuracy of the deep learning model A trained with the overall loss function is recorded as , 32, calculate the maximum accuracy of the deep learning model A trained with the overall loss function , , select the maximum value The corresponding deep learning model A is the final optimal model, which has the highest lightweight level and can be easily deployed in terminal devices such as edge devices, and can realize the rapid and accurate identification of hazardous chemical vehicles;
[0383] Specifically, in the training of deep learning models, IoU is an important indicator to measure the accuracy of the model's positioning of objects in the image. It calculates the coverage area ratio between the bounding box predicted by the model and the actual bounding box. The coverage area ratio ranges from 0 (no coverage) to 1 (complete coverage). IoU is crucial for the performance adjustment of the model because it can screen out qualified predictions by setting a threshold value, and can be included in the loss function to guide the model to improve the accuracy of target detection during the learning process. In the early stage of model learning, due to the lack of sufficient training, the model often shows a low IoU value, which means that the match between the predicted box and the actual box is not high, and the optimization rate of the model is slow. When the model is trained to the later stage, although the IoU value is relatively high, the model still needs to be carefully adjusted to more accurately approximate the real bounding box. Therefore, in order to improve the model training speed and model performance, the model is optimized by the image intersection-over-union optimization method.
[0384] Furthermore, the step S5 specifically includes the following steps:
[0385] S51. According to the output driving state of the hazardous chemical vehicle, locate the hazardous chemical vehicle, establish a two-dimensional coordinate system, calculate the speed of the hazardous chemical vehicle in the x-axis direction and the y-axis direction, and construct the vehicle initial state matrix;
[0386] S52. Construct the vehicle state transfer matrix and obtain the predicted The driving status of the hazardous chemicals vehicle at the moment is updated by introducing parameters to obtain the updated The driving status of hazardous chemicals vehicles at all times;
[0387] S53. Updated by analyzing The driving status of hazardous chemicals vehicles at the moment is updated according to the The distance between the hazardous chemical vehicle’s location at the moment and the marked location (hospital, school, and crowded area) and the set distance safety threshold are used to obtain the warning result of the hazardous chemical vehicle;
[0388] In S51, a two-dimensional coordinate system is constructed with the point where the drone is vertically dropped on the ground as the coordinate origin, the due east direction as the x-axis direction, and the due north direction as the y-axis direction. The location of the hazardous chemicals vehicle at this moment is , The position at time is ,based on Moment and The position relationship of hazardous chemicals vehicles at all times and the speed of hazardous chemicals vehicles ;
[0389] Speed of hazardous chemicals vehicles It is expressed as:
[0390] ;
[0391] The angle between the driving direction of the hazardous chemicals vehicle and the x-axis direction is , then the speed of the hazardous chemicals vehicle in the x-axis direction is , , the speed of the hazardous chemicals vehicle in the y-axis direction is , , the position of the hazardous chemicals vehicle identified by the drone for the first time is calculated as The speeds of the hazardous chemicals vehicle in the x-axis and y-axis directions are and On this basis, construct the vehicle initial state matrix ;
[0392] In S52, the vehicle state transfer matrix describes the state evolution law of the vehicle from one time to the next time. The vehicle state transfer matrix is expressed as , ,in, Indicates the time difference between the previous time and the next time, which is the time difference between the calculated prediction and the next prediction. The driving state of the hazardous chemicals vehicle at the moment introduces the process noise covariance Q, the observation matrix H, the observation noise covariance matrix R and the initial covariance matrix , get the updated The driving status of hazardous chemicals vehicles at all times ;
[0393] Predicted The driving status of hazardous chemicals vehicles at the moment is expressed as:
[0394] ;
[0395] in, for The horizontal coordinate of the position of the hazardous chemicals vehicle at the moment, for The vertical coordinate of the hazardous chemicals vehicle’s position at the moment, for The speed of the hazardous chemicals vehicle in the x-axis direction at the moment, is the speed of the hazardous chemicals vehicle in the y-axis direction;
[0396] Considering the process noise and initial state uncertainty of the predicted vehicle state, the uncertainty of the prediction is quantified and the prediction Error covariance prediction of the driving status of hazardous chemicals vehicles at the time ;
[0397] Error Covariance Forecast It is expressed as:
[0398] ;
[0399] Forecasting the error covariance The gain value ZY is introduced to determine the weight value given to the model prediction and the new measurement data when predicting the vehicle state, so as to ensure the accuracy of the prediction result;
[0400] The gain value ZY is expressed as:
[0401] ;
[0402] in, Transpose the matrix;
[0403] Updated The driving status of hazardous chemicals vehicles at all times It is expressed as:
[0404] ;
[0405] in, is the horizontal coordinate of the updated position of the hazardous chemicals vehicle, is the vertical coordinate of the updated position of the hazardous chemicals vehicle, is the speed of the hazardous chemicals vehicle in the x-axis direction, is the speed of the hazardous chemicals vehicle in the y-axis direction;
[0406] In S54, the coordinates of the marked location are obtained. , calculate the updated The distance between the hazardous chemicals vehicle's position and the marked location at any given moment ;
[0407] Updated The distance between the hazardous chemicals vehicle's position and the marked location at any given moment It is expressed as:
[0408] ;
[0409] in, is the horizontal coordinate of the marked location, is the vertical coordinate of the marked location;
[0410] Set distance safety threshold ,when When The distance between the position of the hazardous chemicals vehicle and the marked location at all times meets safety requirements. When The distance between the position of the hazardous chemical vehicle and the marked location at any moment does not meet the safety requirements, and an early warning of the hazardous chemical vehicle is required;
[0411] Specifically, for the convenience of description, we take the hospital as an example. When the distance is too close, the driver of the hazardous chemical vehicle and the hospital staff need to be informed in advance. Once a hazardous chemical leak occurs, it needs to be handled immediately. According to the data obtained from public channels, the coordinates of the hospital center are obtained and calculated. The distance between the hazardous chemical vehicles and the hospital center is compared with the distance safety threshold at all times. Hazardous chemical vehicles that meet the safety requirements are continuously identified and monitored. Hazardous chemical vehicles that do not meet the safety requirements need to be warned and closely monitored. When a hazardous chemical vehicle leaks, the hospital emergency plan is immediately activated to control the chemical leak, ensure the safety of personnel and report the information;
[0412] When predicting vehicle status, the prediction accuracy will be affected by environmental changes, model factors, etc. In order to improve the prediction accuracy, the process noise covariance Q is introduced; the observation matrix H is introduced to map the state space model to the observation space, and effective information can be extracted from the state space for calculation; the observation noise covariance matrix R is introduced to describe the noise and error in the measurement, reflecting the uncertainty and credibility of the observation data, and further improving the accuracy of the model; the initial covariance matrix is introduced , describes the uncertainty or confidence in the initial state estimate.
[0413] Furthermore, in S33, the layers in the network structure of the deep learning model A are connected in the following order:
[0414] Input layer: image size 227×227×3;
[0415] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0416] Activation layer 1: LeakyReLU;
[0417] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0418] Activation layer 2: LeakyReLU;
[0419] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0420] Activation layer 3: LeakyReLU;
[0421] Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0422] Activation layer 4: LeakyReLU;
[0423] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0424] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0425] Pooling layer 2: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0426] Pooling layer 3: Type: global average pooling, pooling size: 13×13, Stride: 1;
[0427] Pooling concatenation layer: connect the outputs of the three pooling layers;
[0428] PANet layer: aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0429] Convolutional layer 5: kernel size 3×3, number of kernels 768, stride: 2, batch normalization;
[0430] Activation layer 5: LeakyReLU;
[0431] Convolutional layer 6: kernel size 3×3, number of kernels 768, stride: 2, batch normalization;
[0432] Activation layer 6: LeakyReLU;
[0433] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0434] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0435] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0436] Activation layer 7: LeakyReLU;
[0437] Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0438] Activation layer 8: LeakyReLU;
[0439] Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0440] Activation layer 9: LeakyReLU;
[0441] Output layer: Type: Softmax, Number of neurons: 4.
[0442] Furthermore, in S33, the layers in the network structure of the deep learning model B are connected in the following order:
[0443] Input layer: image size 227×227×3;
[0444] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0445] Activation layer 1: LeakyReLU;
[0446] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0447] Activation layer 2: LeakyReLU;
[0448] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0449] Activation layer 3: LeakyReLU;
[0450] Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0451] Activation layer 4: LeakyReLU;
[0452] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0453] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0454] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0455] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0456] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0457] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0458] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0459] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0460] Convolution layer 5: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0461] Activation layer 5: LeakyReLU;
[0462] Convolutional layer 6: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0463] Activation layer 6: LeakyReLU;
[0464] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0465] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0466] Convolutional layer 7: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0467] Activation layer 7: LeakyReLU;
[0468] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0469] Activation layer 7: LeakyReLU;
[0470] Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0471] Activation layer 8: LeakyReLU;
[0472] Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0473] Activation layer 9: LeakyReLU;
[0474] Output layer: Type: Softmax, Number of neurons: 4.
[0475] Furthermore, in S33, the layers in the network structure of the deep learning model C are connected in the following order:
[0476] Input layer: image size 227×227×3;
[0477] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0478] Activation layer 1: LeakyReLU;
[0479] Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0480] Activation layer 2: LeakyReLU;
[0481] Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization;
[0482] Activation layer 3: LeakyReLU;
[0483] Convolutional layer 4: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0484] Activation layer 4: LeakyReLU;
[0485] Convolutional layer 5: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0486] Activation layer 5: LeakyReLU;
[0487] Convolutional layer 6: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0488] Activation layer 6: LeakyReLU;
[0489] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0490] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0491] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0492] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0493] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0494] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0495] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0496] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0497] Convolutional layer 7: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0498] Activation layer 7: LeakyReLU;
[0499] Convolutional layer 8: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0500] Activation layer 8: LeakyReLU;
[0501] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0502] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0503] Convolutional layer 9: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0504] Activation layer 9: LeakyReLU;
[0505] Convolution layer 10: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0506] Activation layer 10: LeakyReLU;
[0507] Convolutional layer 11: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0508] Activation layer 11: LeakyReLU;
[0509] Convolutional layer 12: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0510] Activation layer 12: LeakyReLU;
[0511] Output layer: Type: Softmax, Number of neurons: 4.
[0512] Furthermore, in S33, the layers in the network structure of the deep learning model D are connected in the following order:
[0513] Input layer: image size 227×227×3;
[0514] Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization;
[0515] Activation layer 1: LeakyReLU;
[0516] Convolutional layer 2: convolution kernel size 3×3, number of convolution kernels 32, stride: 1, batch normalization;
[0517] Activation layer 2: LeakyReLU;
[0518] Convolution layer 3: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0519] Activation layer 3: LeakyReLU;
[0520] Convolutional layer 4: convolution kernel size 3×3, number of convolution kernels 64, stride: 1, batch normalization;
[0521] Activation layer 4: LeakyReLU;
[0522] Convolutional layer 5: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0523] Activation layer 5: LeakyReLU;
[0524] Convolutional layer 6: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0525] Activation layer 6: LeakyReLU;
[0526] Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0527] Activation layer 7: LeakyReLU;
[0528] Convolutional layer 8: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0529] Activation layer 8: LeakyReLU;
[0530] SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model;
[0531] Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1;
[0532] Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1;
[0533] Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1;
[0534] Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1;
[0535] Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1;
[0536] Pooling concatenation layer: connect the outputs of the five pooling layers;
[0537] PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations;
[0538] Convolutional layer 9: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0539] Activation layer 9: LeakyReLU;
[0540] Convolution layer 10: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization;
[0541] Activation layer 10: LeakyReLU;
[0542] Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer;
[0543] Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer;
[0544] Convolutional layer 11: kernel size 3×3, number of kernels 512, stride: 1, batch normalization;
[0545] Activation layer 11: LeakyReLU;
[0546] Convolutional layer 12: kernel size 3×3, number of kernels 256, stride: 1, batch normalization;
[0547] Activation layer 12: LeakyReLU;
[0548] Convolutional layer 13: kernel size 3×3, number of kernels 128, stride: 1, batch normalization;
[0549] Activation layer 13: LeakyReLU;
[0550] Convolutional layer 14: kernel size 3×3, number of kernels 64, stride: 1, batch normalization;
[0551] Activation layer 14: LeakyReLU;
[0552] Output layer: Type: Softmax, Number of neurons: 4.
[0553] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. A method for efficient identification and safety warning of hazardous chemical vehicles based on drones, characterized in that: The following steps are involved: S1. Collect images of vehicles traveling on the road to generate an image matrix, and enhance the image quality to obtain a new image matrix; S2. equally divide the image in the new image matrix and update the image pixels to obtain an image after pixel update; S3. construct a data set based on the image after pixel update, input the data set into the established basic model, auxiliary model and enhanced model for training, fuse the loss functions of the four models to obtain the fused loss function, train the four models, and obtain four trained models; S4. According to the intersection-over-union optimization method, the four trained models are trained, and the model with the smallest overall loss function after training is taken as the optimal model. The accuracy of the optimal model is screened to obtain the final optimal model, and the driving status of the hazardous chemical vehicle is output; Specifically: the driving status of hazardous chemicals vehicles includes the location and speed of hazardous chemicals vehicles; S5. According to the output driving state of the hazardous chemical vehicle, predict the driving state of the hazardous chemical vehicle, update it by introducing parameters, obtain the updated driving state of the hazardous chemical vehicle, and obtain the warning result of the hazardous chemical vehicle according to the distance between the updated position of the hazardous chemical vehicle and the marked location and the set distance safety threshold; The S5 specifically includes the following steps: S51. According to the output driving state of the hazardous chemical vehicle, locate the hazardous chemical vehicle, establish a two-dimensional coordinate system, calculate the speed of the hazardous chemical vehicle in the x-axis direction and the y-axis direction, and construct the vehicle initial state matrix; S52. Construct a vehicle state transfer matrix, obtain the predicted driving state of the hazardous chemicals vehicle at time t1, update it by introducing parameters, and obtain the updated driving state of the hazardous chemicals vehicle at time t1; S53. By analyzing the driving status of the hazardous chemical vehicle at the updated time t1, the warning result of the hazardous chemical vehicle is obtained according to the distance between the position of the hazardous chemical vehicle at the updated time t1 and the marked location and the set distance safety threshold; In S51, the point where the drone is vertically dropped on the ground is taken as the coordinate origin, the east direction is taken as the x-axis direction, and the north direction is taken as the y-axis direction to construct a two-dimensional coordinate system. The position of the hazardous chemicals vehicle at time m1 is POT m1 =[cx m1 ,cy m1 ], the position of m2 at the moment is POT m2 =[cx m2 ,cy m2 ], based on the position relationship between the hazardous chemicals vehicle at time m1 and time m2, the speed cv of the hazardous chemicals vehicle is obtained; The speed cv of hazardous chemicals vehicles is expressed as: The angle between the direction of travel of the hazardous chemicals vehicle and the x-axis is θ, so the speed of the hazardous chemicals vehicle in the x-axis direction is cv x , cv x =cv·cosθ, the speed of the hazardous chemicals vehicle in the y-axis direction is cv y , cv y =cv·sinθ, the position of the hazardous chemicals vehicle first identified by the drone is calculated to be POT0=[cx0,cy0], and the speeds of the hazardous chemicals vehicle in the x-axis and y-axis directions are cv x0 and cv y0 On this basis, construct the vehicle initial state matrix cs0 = [cx0 cy0 cv x0 cv y0 ]; In S52, the vehicle state transfer matrix is represented by Z, Among them, Δt represents the time difference between the previous time and the next time. The process noise covariance Q, observation matrix H, observation noise covariance matrix R and initial covariance matrix CP0 are introduced into the calculated predicted driving state of the hazardous chemicals vehicle at time t1 to obtain the updated driving state of the hazardous chemicals vehicle at time t1. The predicted driving state of the hazardous chemicals vehicle at time t1 is expressed as: cs t1 =Z·cs0=[cx t1 cy t1 cv xt1 cv yt1 ] Among them, cx t1 is the horizontal coordinate of the position of the hazardous chemicals vehicle at time t1, cy t1 is the ordinate of the position of the hazardous chemicals vehicle at time t1, cv xt1 is the speed of the hazardous chemicals vehicle in the x-axis direction at time t1, cv yt1 is the speed of the hazardous chemicals vehicle in the y-axis direction; The error covariance prediction EP is performed on the driving state of the hazardous chemicals vehicle at the predicted time t1 pred ; Error Covariance Prediction EP pred It is expressed as: EP pred =Z·CP0·Z T +Q Error covariance prediction EP pred Introduce gain value ZY; The gain value ZY is expressed as: ZY=EP pred ·H T ·(H·EP pred ·H T +R) -1 Where T is the matrix transpose; Updated driving status of hazardous chemicals vehicles at time t1 It is expressed as: in, is the horizontal coordinate of the updated position of the hazardous chemicals vehicle, is the vertical coordinate of the updated position of the hazardous chemicals vehicle, is the speed of the hazardous chemicals vehicle in the x-axis direction, is the speed of the hazardous chemicals vehicle in the y-axis direction; In the above S54, the coordinates POT of the marked location are obtained. zs =[cx zs ,cy zs ], calculate the distance Dis between the position of the hazardous chemicals vehicle and the marked location at time t1 after the update t1 ; The updated distance Dis between the position of the hazardous chemicals vehicle and the marked location at time t1 t1 It is expressed as: Among them, cx zs is the horizontal coordinate of the marked location, cy zs is the vertical coordinate of the marked location; Set the distance safety threshold Dis tr , when Dis t1 >Dis tr When t1, it indicates the distance between the position of the hazardous chemicals vehicle and the marked location, which meets the safety requirements. t1 ≤Dis tr It indicates that the distance between the position of the hazardous chemicals vehicle at time t1 and the marked location does not meet the safety requirements, and an early warning of the hazardous chemicals vehicle is needed, and the early warning result of the hazardous chemicals vehicle is obtained.
2. According to claim 1, a method for efficient identification and safety warning of hazardous chemical vehicles based on drones is characterized in that: The S1 specifically includes the following steps: S11. Using the high-definition camera on the drone, collect the image ph of the vehicle traveling on the road, and the corresponding image matrix is PH; S12. Construct a 5th-order denoising kernel function N, and normalize all elements in the kernel function to obtain the normalized denoising kernel function N G ; S13. According to the normalized denoising kernel function N G , perform denoising kernel function processing on the image to obtain a new image matrix P to achieve image quality enhancement; In S12, the fifth-order denoising kernel function N is expressed as: N=[N xy ] Where x = 1, 2, 3, 4 or 5, x is the row number of the matrix, y = 1, 2, 3, 4 or 5, y is the column number of the matrix, σ is the standard deviation of all elements in the kernel function, and e is the base of the natural logarithm; Normalized denoising kernel function N G It is expressed as: In S13, the new image matrix P is expressed as: P=PH×N G 。 3. The method for efficient identification and safety warning of hazardous chemical vehicles based on drones according to claim 2 is characterized in that: The S2 comprises the following steps: S21. According to the new image matrix P, the pixel grayscale value is divided into 16 grayscale levels, and the image in the new image matrix P is divided into n equal parts to obtain the divided image; S22. Count the pixel frequency FR corresponding to each gray level in the equally divided image nu , calculate the grayscale frequency cumulative value TR corresponding to each grayscale level in the equally divided image nu ; S23. Based on the gray frequency cumulative value TR nu , construct a pixel value update method and calculate the pixel update value corresponding to the gray level Get the image after pixel update; In S21, the pixel gray value is 0-255, and the gray level is Q nu , nu=1,2,3,…,16, nu is the grayscale number, the image after equal division is Pnum, num=1,2,…,n; In S22, each gray level Q in the equally divided image Pnum nu The corresponding grayscale frequency cumulative value TR nu It is expressed as: Where no is the gray level number less than or equal to nu, Q no Indicates the gray level with gray level number no; In S23, the pixel update value corresponding to the gray level It is expressed as: in, is the minimum non-zero value among all pixel frequency accumulation values, P pix is the total number of pixels corresponding to the equally divided image Pnum, is the maximum value of the gray level.
4. The method for efficient identification and safety warning of hazardous chemical vehicles based on drones according to claim 3 is characterized in that: The S3 specifically includes the following steps: S31. Based on the pixel updated image, select all images containing hazardous chemicals vehicles, passenger cars, commercial vehicles and buses as input images; S32. Through manual annotation, four types of vehicles, namely, hazardous chemical vehicles, passenger cars, commercial vehicles, and buses, are selected from the input image, and a data set is constructed. The data set is divided into a training set and a test set in a ratio of 8:2; S33. According to the data set, a basic model, an auxiliary model and an enhanced model are constructed, and the loss functions of the four models are calculated and integrated to obtain a fused loss function; In S32, hazardous chemicals vehicles, passenger cars, commercial vehicles and buses are marked as Dangerous, Passenger, Commercial and Bus respectively; In the S33, a network structure of a basic model, i.e., a deep learning model A, is constructed, and the deep learning model A consists of 1 input layer, 9 convolutional layers, 9 activation layers, 3 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer; The layers in the network structure of deep learning model A are connected in the following order: Input layer: image size 227×227×3; Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization; Activation layer 1: LeakyReLU; Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 2: LeakyReLU; Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization; Activation layer 3: LeakyReLU; Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 4: LeakyReLU; SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model; Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1; Pooling layer 2: Type: global average pooling, pooling size: 9×9, Stride: 1; Pooling layer 3: Type: global average pooling, pooling size: 13×13, Stride: 1; Pooling concatenation layer: connect the outputs of the three pooling layers; PANet layer: aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations; Convolutional layer 5: kernel size 3×3, number of kernels 768, stride: 2, batch normalization; Activation layer 5: LeakyReLU; Convolutional layer 6: kernel size 3×3, number of kernels 768, stride: 2, batch normalization; Activation layer 6: LeakyReLU; Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer; Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer; Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 7: LeakyReLU; Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 8: LeakyReLU; Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 9: LeakyReLU; Output layer: Type: Softmax, Number of neurons: 4; The data set is input into the deep learning model A, and the weights and biases of the neural network units of the deep learning model A are calculated through the error back propagation algorithm to complete the training of the deep learning model A and obtain the trained deep learning model A and its loss function La; The output value of the output unit node corresponding to the deep learning model A is a i , respectively, the output value a1 of the first output unit node, the output value a2 of the second output unit node, the output value a3 of the third output unit node, and the output value a4 of the fourth output unit node. According to the exponential function exp, the output values of the four output unit nodes corresponding to the deep learning model A are initially converted into the probability value f of the first preliminary output value. ai , and then further optimize and transform it to obtain the first optimized output value and the enhanced probability value g of the first optimized output value ai ; The enhanced probability value g of the first optimized output value is adopted ai And the data set, combined with the error chain derivative rule, continue to train the deep learning model A. After the training is completed, the output value j of the first vehicle type is obtained ai The actual vehicle type label h corresponding to the node of the output layer of the deep learning model A ai , the output value j of the first vehicle type ai are the output values j of the first hazardous chemicals vehicle respectively a1 , the output value j of the first passenger car a2 , the output value of the first commercial vehicle j a3 and the first bus output value j a4 ; The first auxiliary model, deep learning model B, is constructed. Deep learning model B consists of 1 input layer, 9 convolutional layers, 9 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer. The layers in the network structure of deep learning model B are connected in the following order: Input layer: image size 227×227×3; Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization; Activation layer 1: LeakyReLU; Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 2: LeakyReLU; Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization; Activation layer 3: LeakyReLU; Convolutional layer 4: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 4: LeakyReLU; SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model; Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1; Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1; Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1; Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1; Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1; Pooling concatenation layer: connect the outputs of the five pooling layers; PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations; Convolution layer 5: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 5: LeakyReLU; Convolutional layer 6: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 6: LeakyReLU; Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer; Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer; Convolutional layer 7: kernel size 3×3, number of kernels 512, stride: 1, batch normalization; Activation layer 7: LeakyReLU; Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 7: LeakyReLU; Convolutional layer 8: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 8: LeakyReLU; Convolutional layer 9: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 9: LeakyReLU; Output layer: Type: Softmax, Number of neurons: 4; The data set is input into the deep learning model B, and the weights and biases of the neural network units of the deep learning model B are calculated through the error back propagation algorithm, the training of the deep learning model B is completed, and the trained deep learning model B and its loss function Lb are obtained; The output value of the output unit node corresponding to the deep learning model B is b i , respectively, the output value b1 of the fifth output unit node, the output value b2 of the sixth output unit node, the output value b3 of the seventh output unit node, and the output value b4 of the eighth output unit node. According to the exponential function exp, the output values of the four output unit nodes corresponding to the deep learning model B are initially converted into the second preliminary output value and the probability value f of the second preliminary output value. bi , and then further optimize and transform it to obtain the second optimized output value and the enhanced probability value g of the second optimized output value bi ; The enhanced probability value g of the second optimized output value is adopted bi And the data set, combined with the error chain derivative rule, continue to train the deep learning model B. After the training is completed, the output value j of the second vehicle type is obtained bi The actual vehicle type label h corresponding to the node of the output layer of the deep learning model B bi , the output value j of the second vehicle type bi are the output values j of the second hazardous chemicals vehicle respectively b1 , the output value j of the second passenger car b2 , the output value of the second commercial vehicle j b3 and the second bus output value j b4 ; The second auxiliary model, namely the deep learning model C, is constructed. The deep learning model C consists of 1 input layer, 12 convolutional layers, 12 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer, and 1 output layer. The layers in the network structure of the deep learning model C are connected in the following order: Input layer: image size 227×227×3; Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization; Activation layer 1: LeakyReLU; Convolutional layer 2: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 2: LeakyReLU; Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 128, stride: 1, batch normalization; Activation layer 3: LeakyReLU; Convolutional layer 4: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 4: LeakyReLU; Convolutional layer 5: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 5: LeakyReLU; Convolutional layer 6: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 6: LeakyReLU; SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model; Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1; Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1; Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1; Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1; Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1; Pooling concatenation layer: connect the outputs of the five pooling layers; PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations; Convolutional layer 7: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 7: LeakyReLU; Convolutional layer 8: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 8: LeakyReLU; Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer; Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer; Convolutional layer 9: kernel size 3×3, number of kernels 512, stride: 1, batch normalization; Activation layer 9: LeakyReLU; Convolution layer 10: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 10: LeakyReLU; Convolutional layer 11: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 11: LeakyReLU; Convolutional layer 12: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 12: LeakyReLU; Output layer: Type: Softmax, Number of neurons: 4; The data set is input into the deep learning model C, and the weights and biases of the neural network units of the deep learning model C are calculated through the error back propagation algorithm to complete the training of the deep learning model C and obtain the trained deep learning model C and its loss function Lc; The output value of the output unit node corresponding to the deep learning model C is c i , are the output value c1 of the ninth output unit node, the output value c2 of the tenth output unit node, the output value c3 of the eleventh output unit node, and the output value c4 of the twelfth output unit node, respectively. According to the exponential function exp, the output values of the four output unit nodes corresponding to the deep learning model C are initially converted into the third preliminary output value and the probability value f of the third preliminary output value. ci , and then further optimize and transform it to obtain the third optimized output value and the enhanced probability value g of the third optimized output value ci ; The enhanced probability value g of the third optimized output value is adopted ci And the data set, combined with the error chain derivative rule, continue to train the deep learning model C. After the training is completed, the output value j of the third vehicle type is obtained ci The actual vehicle type label h corresponding to the node of the output layer of the deep learning model B bi , the third vehicle type output value j ci are the output values j of the third hazardous chemicals vehicle respectively c1 , the output value j of the third passenger car c2 、The output value of the third commercial vehicle j c3 and the third bus output value j c4 ; Construct a reinforcement model, namely the deep learning model D, which consists of 1 input layer, 14 convolutional layers, 14 activation layers, 5 pooling layers, 1 merging layer, 1 upsampling layer, 1 PANet layer, 1 pooling splicing layer, 1 SPP layer and 1 output layer; The layers in the network structure of the deep learning model D are connected in the following order: Input layer: image size 227×227×3; Convolutional layer 1: kernel size 3×3, number of kernels 32, stride: 1, batch normalization; Activation layer 1: LeakyReLU; Convolutional layer 2: convolution kernel size 3×3, number of convolution kernels 32, stride: 1, batch normalization; Activation layer 2: LeakyReLU; Convolution layer 3: convolution kernel size 3×3, number of convolution kernels 64, stride: 1, batch normalization; Activation layer 3: LeakyReLU; Convolutional layer 4: convolution kernel size 3×3, number of convolution kernels 64, stride: 1, batch normalization; Activation layer 4: LeakyReLU; Convolutional layer 5: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 5: LeakyReLU; Convolutional layer 6: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 6: LeakyReLU; Convolutional layer 7: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 7: LeakyReLU; Convolutional layer 8: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 8: LeakyReLU; SPP layer: extracts features of different scales and fuses them to increase the receptive field of the model; Pooling layer 1: Type: global average pooling, pooling size: 5×5, stride: 1; Pooling layer 2: Type: global average pooling, pooling size: 7×7, Stride: 1; Pooling layer 3: Type: global average pooling, pooling size: 9×9, Stride: 1; Pooling layer 4: Type: global average pooling, pooling size: 11×11, Stride: 1; Pooling layer 5: Type: global average pooling, pooling size: 13×13, stride: 1; Pooling concatenation layer: connect the outputs of the five pooling layers; PANet: Aggregates features at different levels and implements feature pyramids through upsampling and downsampling operations; Convolutional layer 9: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 9: LeakyReLU; Convolution layer 10: kernel size 3×3, number of kernels 1280, stride: 2, batch normalization; Activation layer 10: LeakyReLU; Upsampling layer: uses the nearest neighbor interpolation method to upsample to the same size as the pooling splicing layer; Merging layer: The output feature map of the downsampling layer is merged with the output feature map of the upsampling layer; Convolutional layer 11: kernel size 3×3, number of kernels 512, stride: 1, batch normalization; Activation layer 11: LeakyReLU; Convolutional layer 12: kernel size 3×3, number of kernels 256, stride: 1, batch normalization; Activation layer 12: LeakyReLU; Convolutional layer 13: kernel size 3×3, number of kernels 128, stride: 1, batch normalization; Activation layer 13: LeakyReLU; Convolutional layer 14: kernel size 3×3, number of kernels 64, stride: 1, batch normalization; Activation layer 14: LeakyReLU; Output layer: Type: Softmax, Number of neurons: 4; The data set is input into the deep learning model D, and the weights and biases of the neural network units of the deep learning model D are calculated through the error back propagation algorithm to complete the training of the deep learning model D and obtain the trained deep learning model D and its loss function Ld; The output value of the output unit node corresponding to the deep learning model D is d i , respectively, the output value d1 of the thirteenth output unit node, the output value d2 of the fourteenth output unit node, the output value d3 of the fifteenth output unit node, and the output value d4 of the sixteenth output unit node. According to the exponential function exp, the output values of the four output unit nodes corresponding to the deep learning model D are initially converted into the fourth preliminary output value and the probability value f of the fourth preliminary output value. di , and then further optimize and transform it to obtain the fourth optimized output value and the enhanced probability value g of the fourth optimized output value di ; The enhanced probability value g of the fourth optimized output value is adopted di And the data set, combined with the error chain derivative rule, continue to train the deep learning model D. After the training is completed, the output value j of the fourth vehicle type is obtained di The actual vehicle type label h corresponding to the node of the output layer of the deep learning model D di , the fourth vehicle type output value j di are the output values j of the fourth hazardous chemicals vehicle respectively d1 , the output value j of the fourth passenger car d2 , the fourth commercial vehicle output value j d3 and the fourth bus output value j d4 ; According to the second vehicle type, the output value is j bi and the enhanced probability value g of the first optimized output value ai , construct the loss function L between deep learning model B and deep learning model A BA , get the corresponding weight coefficient; The probability value f based on the first preliminary output value ai The actual vehicle type label h corresponding to the node of the output layer of the deep learning model A ai , construct the probability value f considering the first preliminary output value ai The loss function L of the deep learning model A is AA , get the corresponding weight coefficient; Based on the loss function L between deep learning model B and deep learning model A BA and considering the probability value f of the first preliminary output value ai The loss function L of the deep learning model A is AA , establish the relationship loss function L between the output layer of deep learning model B and deep learning model A BAA ; According to the above operations, the relationship loss function L between the output layers of the deep learning model C and the deep learning model B is established. CBB , the relationship loss function L between the output layer of the deep learning model C and the deep learning model A CAA , the relationship loss function L between the output layer of the deep learning model D and the deep learning model A DAA The relationship loss function L between the output layers of the deep learning model D and the deep learning model C DCC .
5. The method for efficient identification and safety warning of hazardous chemical vehicles based on drones according to claim 4 is characterized in that: The S4 specifically includes the following steps: S41. For each target prediction bounding box and the corresponding true bounding box of the four trained models, calculate the intersection area AR between the two j ; S42. For each target predicted bounding box and the corresponding true bounding box of the four trained models, calculate the union area AR of the two b ; S43. Calculate the intersection area AR j and the area of the union AR b The corresponding intersection-over-union ratio IoU introduces the adjustment coefficient g t , construct the loss function L of the target position w , get the optimized intersection-over-union ratio IoU; S44. According to the optimized intersection-over-union ratio IoU, the optimized intersection-over-union ratio calculation method is used for model training. When the overall loss function L is defined total When it is minimum, the corresponding model parameters are optimal, and the overall loss function L total The smallest model is taken as the optimal model, and the optimal model with the highest accuracy is selected to obtain the final optimal model, which outputs the driving status of hazardous chemicals vehicles; In S43, the intersection over union (IoU) is expressed as: The loss function L of the target position w It is expressed as: Set the Intersection over Union (IoU) threshold CR , according to the intersection over union ratio IoU and the intersection over union ratio threshold IoU CR The relationship between the adjustment factor g t In the range of, when IoU>IoU CR When , the corresponding target position loss function L w The adjustment factor g t <1, when IoU = IoU CR When the corresponding target position loss function L w The adjustment factor g t =1, when IoU<IoU CR When the corresponding loss function adjustment coefficient g t >1; In S44, the overall loss function L corresponding to the deep learning model A, the deep learning model B, the deep learning model C and the deep learning model D is defined. total , 2 5 =32, and we get 32 overall loss functions L total In the form of, four models are trained, and 32 deep learning models A trained with the overall loss function are obtained as the optimal model; The overall loss function L total It is expressed as: L total =β1L DCC +β2L CBB +β3L BAA +β4L DAA +β5L CAA Among them, β1 is the relationship loss function L between the output layers of the deep learning model D and the deep learning model C DCC The weight coefficient is 0 or 1, and β2 is the relationship loss function L between the output layers of the deep learning model C and the deep learning model B. CBB The weight coefficient is 0 or 1, and β3 is the relationship loss function L between the output layer of deep learning model B and deep learning model A. BAA The weight coefficient is 0 or 1, and β4 is the relationship loss function L between the output layer of the deep learning model D and the deep learning model A. DAA The weight coefficient is 0 or 1, and β5 is the relationship loss function L between the output layers of the deep learning model D and the deep learning model C. DCC The weight coefficient of is 0 or 1; The accuracy of the deep learning model A trained with the overall loss function is recorded as ACa i , i = 1, 2, 3, ..., 32, calculate the maximum value ACa of the accuracy corresponding to the deep learning model A trained with the overall loss function max , ACa max =max[ACa i ], select the maximum value ACa max The corresponding deep learning model A is the final optimal model.