Unmanned aerial vehicle safety supervision image processing method, system, equipment and medium
Through the image processing method of drone safety supervision and inspection, image deconstruction, residual, detail enhancement, denoising and fusion modules are used to solve the problem of image quality degradation in construction sites under visual adverse factors, realize image enhancement and optimization, and improve supervision accuracy and safety guarantee.
Patent Information
- Application Number
- CN202510273506.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-27
AI Technical Summary
During the safety supervision and inspection of construction sites, when using drones to take images, the image quality has seriously declined in the face of visual adverse factors such as dust, light, and rain. It is impossible to accurately judge whether workers violate the rules or whether safety measures are in place, which affects the accuracy of supervision and increases safety hazards.
A drone safety supervision image processing method is proposed. Detailed images are extracted through the image deconstruction module and adaptive threshold processing is performed. Detailed feature maps are generated in combination with the residual module, and the detail enhancement module is used for enhancement processing. The image denoising module performs denoising processing, and the feature map is fused through the image fusion module to generate enhanced optimization images.
The image quality is significantly improved, the operation details of construction workers and the actual situation of construction site safety measures is clearly presented, the accuracy and efficiency of safety supervision are improved, potential safety hazards are discovered in a timely manner, and the safety production of construction sites is ensured.
Smart Images

Figure CN120219989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image enhancement, and particularly to a method, system, device and medium for processing images of drone safety supervision and inspection. Background Art
[0002] Traditional safety supervision and inspection work at construction sites mainly relies on manual on-site inspections, which are not only inefficient but also difficult to cover comprehensively. By using drones for shooting inspections and combining image processing and analysis technologies, it is possible to achieve safety supervision and inspection of a large area of the construction site, which improves the scope and efficiency of supervision to a certain extent, but there are still many deficiencies.
[0003] With the continuous expansion of the construction scale, the complexity and safety risks of the construction site are also continuously increasing. Although drones and simple image processing technologies can efficiently and widely obtain image information of the construction site, in the face of visual adverse factors such as dust, light, and rain, the image quality seriously deteriorates, and it is impossible to accurately judge whether workers violate regulations and whether safety measures are in place in the acquired images. This not only affects the accuracy of supervision but also may lead to the failure to detect potential safety hazards in a timely manner, increasing the probability of accidents. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, system, device and medium for processing images of drone safety supervision and inspection to achieve enhancement and optimization of drone safety supervision and inspection images.
[0005] To achieve the above purpose, the technical solution provided by the present invention is as follows:
[0006] The first aspect of the present application provides a method for processing images of drone safety supervision and inspection, including the following steps:
[0007] Obtain safety supervision and inspection images by shooting with a drone, form a drone safety supervision and inspection image dataset, and divide the drone safety supervision and inspection image dataset into a training set and a test set;
[0008] Construct a drone safety supervision and inspection image processing model, and use the drone safety supervision and inspection image dataset for model training and evaluation;
[0009] Input the safety supervision and inspection images collected by the drone in real time into the trained and evaluated drone safety supervision and inspection image processing model, and output enhanced and optimized drone safety supervision and inspection images;
[0010] Among them, the drone safety supervision and inspection image processing model includes:
[0011] Extract the detail image from the safety supervision and inspection image through the image deconstruction module, and perform adaptive threshold processing on the detail image; generate a detail feature map from the detail image after adaptive threshold processing through the residual module;
[0012] Separately, enhance the safety supervision and inspection image through the detail enhancement module; denoise the enhanced image with the image denoising module to obtain a denoised feature map;
[0013] Use the image fusion module to perform feature fusion on the detail feature map and the denoised feature map to generate a fused feature map.
[0014] To optimize the above technical solution, the specific measures taken also include:
[0015] Divide the UAV safety supervision and inspection image dataset into a high-quality image dataset and a low-quality image dataset. The high-quality image dataset is used as a training set to train the UAV safety supervision and inspection image processing model, and the low-quality image dataset is used as a test set to test and evaluate the performance of the UAV safety supervision and inspection image processing model.
[0016] The above-mentioned extraction of the detail image from the safety supervision and inspection image through the image deconstruction module and the adaptive threshold processing of the detail image include:
[0017] (1) Input the safety supervision and inspection image into the image deconstruction module where H in represents the height of the image, W in represents the width of the image, and C in represents the number of channels of the image;
[0018] Gaussian pyramid operation: Apply the Gaussian filter G in to the safety supervision and inspection image I σ for smoothing, and then construct a low-resolution image I lo w through the downsampling operation of taking every other pixel:
[0019] I low = Downsample(G σ * I in )
[0020] where * represents the convolution operation, and Downsample(*) represents the downsampling;
[0021] Then, use linear interpolation to upsample the low-resolution image I low to the original resolution to obtain the base image I base = Upsample(I low ), where Upsample(*) represents the linear interpolation upsampling operation;
[0022] Subtract the base image from the original safety supervision and inspection image pixel by pixel to extract the detail image I detail = I in - I base;
[0023] (2) Process the detail image I detail Through adaptive thresholding, where the threshold T(x, y) is dynamically adjusted according to the local pixel intensity distribution of the image. Define the enhancement function of adaptive thresholding as:
[0024]
[0025] Where T(x, y) is the dynamic threshold calculated based on the local window k×k, T(x,y) = μ(x,y) + α·σ(x,y), μ(x,y) and σ(x,y) are the mean and standard deviation of the local window respectively, and α is the control parameter.
[0026] The detail feature map is generated from the detail image after adaptive thresholding through a residual module, specifically:
[0027] Generate the feature map F1 from the detail image F0 after adaptive thresholding through a 3×3 convolution operation, batch normalization, and LeakyReLU activation function:
[0028] F1 = LeakyReLU(BN(Conv 3×3 (F0)))
[0029] Where Conv 3×3 (·) represents a 3×3 convolution operation, BN(·) represents a batch normalization operation, and LeakyReLU(·) represents an activation function operation;
[0030] Then concatenate the detail image F0 after adaptive thresholding and the feature map F1 in the channel dimension to generate the fused feature map F2 = Concat(F0, F1). Subsequently, the fused feature map F2 undergoes a 3×3 convolution operation and batch normalization to generate the final detail feature map F = BN(Conv 3×3 (F2)).
[0031] The safety inspection image is enhanced through a detail enhancement module, specifically:
[0032] Input the safety inspection image into the detail enhancement module Where H in represents the height of the image, W in represents the width of the image, C in represents the number of channels of the image. Convolve it with a 7×7 convolution kernel W1 to generate the preliminary global feature map E1:
[0033] E1 = Conv 7×7 (X in , W1) + b1
[0034] Among them, Conv 7×7 (·) represents a 7×7 convolution operation, W1 represents the convolution kernel, and b1 represents the bias term;
[0035] The preliminary global feature map E1 is passed through a residual module to obtain the feature map E2, and the feature map E2 is passed through a 1×1 convolutional layer to expand the number of channels to obtain the feature map D2:
[0036] D2 = Conv 1×1 (E2, W3) + b3
[0037] Among them, Conv 1×1 (·) represents a 1×1 convolution operation, W3 represents the convolution kernel, and b3 represents the bias term;
[0038] In addition, the feature map E2 passes through a residual module and a 1×1 convolutional layer for the second time to obtain the feature map E3 and the feature map D3 respectively, and then passes through a residual module and a 1×1 convolutional layer for the third time to obtain the feature map E4 and the feature map D4 respectively;
[0039] Finally, the feature maps D2, D3, and D4 are added pixel by pixel to obtain the enhanced feature map E = (D2 + D3 + D4).
[0040] The image denoising module is used to denoise the enhanced image to obtain a denoised feature map, specifically:
[0041] The enhanced feature map E0 after enhancement processing is passed through a residual module and a 3×3 convolution to generate the feature map G1 = (Conv 3×3 (ResModule(E0)), where Conv 3×3 (·) represents a 3×3 convolution operation, and ResModule(·) represents passing through a residual module;
[0042] Then, the feature map G1 and the enhanced feature map E0 are combined to form a residual feature map G2 = Concat(G1, E0), where Concat(·) represents the feature concatenation operation;
[0043] Then, the residual feature map G2 is passed through a 3×3 convolution and a tanh activation function to generate the enhanced feature map G3 = tanh(Conv 3×3 (G2)), where tanh represents the hyperbolic tangent activation function;
[0044] Finally, the enhanced feature map G3 and the extracted residual feature map G2 are subjected to an element-wise multiplication operation to generate the final denoised feature map G = G3 ⊙ G2, where ⊙ represents the element-wise multiplication operation.
[0045] The above-mentioned feature fusion of the detail feature map and the denoised feature map by the image fusion module to generate a fused feature map is specifically as follows:
[0046] First, the detail feature map F and the denoised feature map G are concatenated in the channel dimension to generate a fused feature map H0 = Concat(F, G). The fused feature map H undergoes two average pooling operations and two upsampling operations to restore the original resolution, generating a feature map H3:
[0047] H3 = Upsample(Upsample(AvgPool(AvgPool(H0))))
[0048] Where AvgPool(·) represents the average pooling operation, and Upsample(·) represents the upsampling operation;
[0049] In addition, the detail feature map F and the denoised feature map G are respectively subjected to deep feature extraction through a residual block to generate a feature map H4 = ResModule(F) and a feature map H5 = ResModeule(G);
[0050] The feature maps H3, H4, and H5 are added element by element to generate a feature map H6 = H3 + H4 + H5. Finally, the feature map H6 generates the final fused feature map H through two consecutive 3×3 convolution operations:
[0051] H = Conv 3×3 (Conv 3×3 (H6)).
[0052] The second aspect of this application provides an anti-drone supervision and inspection image processing system, including:
[0053] An anti-drone supervision and inspection image acquisition module, used to acquire anti-drone supervision and inspection images through a drone to form an anti-drone supervision and inspection image dataset;
[0054] An anti-drone supervision and inspection image processing model construction module, used to construct an anti-drone supervision and inspection image processing model, and use the anti-drone supervision and inspection image dataset for model training and evaluation;
[0055] An image optimization processing module, used to input the anti-drone supervision and inspection images collected in real time by the drone into the trained and evaluated anti-drone supervision and inspection image processing model, and output enhanced and optimized anti-drone supervision and inspection images;
[0056] Among them, the anti-drone supervision and inspection image processing model includes:
[0057] An image deconstruction module, used to extract a detail image from the anti-drone supervision and inspection image through the image deconstruction module, and perform adaptive threshold processing on the detail image;
[0058] A residual module, which is used to generate a detailed feature map from the detailed image after adaptive threshold processing through the residual module;
[0059] A detail enhancement module, which is used to perform enhancement processing on the security inspection image through the detail enhancement module;
[0060] An image denoising module, which is used to perform denoising processing on the enhanced image to obtain a denoised feature map;
[0061] An image fusion module, which is used to perform feature fusion on the detailed feature map and the denoised feature map to generate a fused feature map.
[0062] The third aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for processing unmanned aerial vehicle security inspection images is implemented.
[0063] The fourth aspect of the present application provides a computer-readable storage medium storing a computer program, and the computer program causes a computer to execute the above-mentioned method for processing unmanned aerial vehicle security inspection images.
[0064] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0065] In the enhancement processing of the security inspection image, the present invention proposes an image deconstruction module to deconstruct the input image into a basic image and a detailed image, providing a basis for noise removal and detail enhancement; proposes a detail enhancement module to extract more detail information and semantic information in the image through deeper convolutional operations, and more effectively transmit information between layers at a long distance through the skip connection of the residual module. While improving the image resolution, it can better retain and enhance the details and textures of the image; proposes an image denoising module, which can more efficiently learn the difference between the input image and the noise through the residual module and image splicing, helping to improve the denoising effect. At the same time, the spliced features can avoid over-smoothing of the effective area during the denoising process, and at the same time use non-linear transformation to make the model more adaptable to complex and diverse noise types and distributions; proposes an image fusion module to fuse the basic image containing the overall structure and low-frequency information of the image and the detailed image rich in high-frequency detail information, so that the final image not only eliminates noise, has a clear overall contour, but also has rich detail textures, presenting a higher resolution visually, thereby realizing the enhancement and optimization of the unmanned aerial vehicle security inspection image.
[0066] By adopting the enhanced optimization method of the present invention, noise can be largely removed and image quality can be optimized, clearly presenting the operation details of construction workers and the actual situation of construction site safety measures. This can not only significantly improve the accuracy and efficiency of safety supervision and inspection, timely discover potential safety hazards, but also provide strong guarantee for the safe production of the construction site, prevent accidents, ensure the safety of workers' lives and maintain the normal construction order of the construction site. Brief Description of the Drawings
[0067] Figure 1 It is a flowchart of an implementation process of the drone safety supervision and inspection image enhancement and optimization method of the present invention.
[0068] Figure 2 It is a structural diagram of the image deconstruction module.
[0069] Figure 3 It is a structural diagram of the residual module.
[0070] Figure 4 It is a structural diagram of the detail enhancement module.
[0071] Figure 5 It is a structural diagram of the image denoising module.
[0072] Figure 6 It is a structural diagram of the image fusion module.
[0073] Figure 7 It is a high-quality drone safety supervision and inspection comparison chart obtained by the enhancement and optimization of the present invention. Detailed Implementation Modes
[0074] The above content of the present invention will be further described in detail below in the form of specific implementation modes. However, it should not be understood that the scope of the above subject matter of the present invention is limited to the following embodiments. All technologies implemented based on the above content of the present invention belong to the scope of the present invention.
[0075] In one embodiment of the present invention, a method for processing drone safety supervision and inspection images is proposed, including the following steps:
[0076] Obtain safety supervision and inspection images by drone shooting to form a drone safety supervision and inspection image dataset, and divide the drone safety supervision and inspection image dataset into a training set and a test set;
[0077] Build a drone safety supervision and inspection image processing model, and use the drone safety supervision and inspection image dataset for model training and evaluation;
[0078] Input the safety supervision and inspection images collected by the drone in real time into the trained and evaluated drone safety supervision and inspection image processing model, and output enhanced and optimized drone safety supervision and inspection images;
[0079] Among them, the UAV safety supervision and inspection image processing model includes:
[0080] Extract the detailed image from the safety supervision and inspection image through the image deconstruction module, and perform adaptive threshold processing on the detailed image; generate a detailed feature map from the detailed image after adaptive threshold processing through the residual module;
[0081] In addition, enhance the safety supervision and inspection image through the detail enhancement module; denoise the image after enhancement processing with the image denoising module to obtain a denoised feature map;
[0082] Perform feature fusion on the detailed feature map and the denoised feature map with the image fusion module to generate a fused feature map.
[0083] An implementation process of the UAV safety supervision and inspection image enhancement and optimization method of the present invention is as Figure 1 shown.
[0084] In some embodiments, the UAV safety supervision and inspection image dataset is divided into a high-quality image dataset and a low-quality image dataset. The high-quality image dataset is used as a training set to train the UAV safety supervision and inspection image processing model, and the low-quality image dataset is used as a test set to test and evaluate the performance of the UAV safety supervision and inspection image processing model.
[0085] Extract the detailed image from the safety supervision and inspection image through the image deconstruction module, and perform adaptive threshold processing on the detailed image, as Figure 2 shown, including:
[0086] (1) Input the safety supervision and inspection image into the image deconstruction module where H in represents the height of the image, W in represents the width of the image, and C in represents the number of channels of the image; apply the Gaussian filter G in to the safety supervision and inspection image I σ for smoothing processing, and then construct a low-resolution image I low by taking the downsampling operation of every other pixel:
[0087] I low = Downsample(G σ * I in ) where * represents the convolution operation, and Downsample represents the downsampling;
[0088] Then, use bilinear interpolation to upsample the low-resolution image I low to the original resolution to obtain the base image I base = Upsample(I low ), where Upsample(*) represents the bilinear interpolation upsampling operation;
[0089] Subtract the base image from the original safety supervision inspection image pixel by pixel to extract the detail image I detail = I in - I base ;
[0090] (2) Apply adaptive thresholding to the detail image I detail where the threshold T(x, y) is dynamically adjusted according to the local pixel intensity distribution of the image. Define the enhancement function for adaptive thresholding as:
[0091]
[0092] where T(x, y) is the dynamic threshold calculated based on the local window k×k, T(x, y) = μ(x, y) + α·σ(x, y), μ(x, y) and σ(x, y) are the mean and standard deviation of the local window respectively, and α is the control parameter.
[0093] Generate a detail feature map from the detail image after adaptive thresholding through a residual module, as Figure 3 shown, specifically:
[0094] Generate a feature map F1 from the detail image F0 after adaptive thresholding through a 3×3 convolution operation, batch normalization, and the LeakyReLU activation function:
[0095] F1 = LeakyReLU(BN(Conv 3×3 (F0)))
[0096] where Conv 3×3 (·) represents a 3×3 convolution operation, BN(·) represents a batch normalization operation, and LeakyReLU(·) represents an activation function operation;
[0097] Then concatenate the detail image F0 after adaptive thresholding and the feature map F1 in the channel dimension to generate a fused feature map F2 = Concat(F0, F1). Subsequently, the fused feature map F2 undergoes a 3×3 convolution operation and batch normalization to generate the final detail feature map F = BN(Conv 3×3 (F2)).
[0098] Enhance the safety supervision inspection image through a detail enhancement module, as Figure 4 shown, specifically:
[0099] Input the safety supervision inspection image into the detail enhancement module where H in represents the height of the image, W in represents the width of the image, C inDenotes the number of channels of the image, which is convolved through a 7×7 convolutional kernel W1 to generate a preliminary global feature map E1:
[0100] E1 = Conv 7×7 (X in , W1) + b1 where Conv 7×7 (·) represents the 7×7 convolution operation, W1 represents the convolutional kernel, and b1 represents the bias term;
[0101] The preliminary global feature map E1 is passed through a residual module to obtain the feature map E2, and the feature map E2 is passed through a 1×1 convolutional layer to expand the number of channels to obtain the feature map D2:
[0102] D2 = Conv 1×1 (E2, W3) + b3
[0103] where Conv 1×1 (·) represents the 1×1 convolution operation, W3 represents the convolutional kernel, and b3 represents the bias term;
[0104] In addition, the feature map E2 passes through a residual module and a 1×1 convolutional layer for the second time to obtain the feature map E3 and the feature map D3 respectively, and then passes through a residual module and a 1×1 convolutional layer for the third time to obtain the feature map E4 and the feature map D4 respectively;
[0105] Finally, the feature maps D2, D3, and D4 are added pixel by pixel to obtain the enhanced feature map E = (D2 + D3 + D4).
[0106] The image denoising module is used to denoise the enhanced image to obtain a denoised feature map, as Figure 5 shown, specifically:
[0107] The enhanced feature map E0 after enhancement processing is passed through a residual module and a 3×3 convolution to generate the feature map G1 = (Conv 3×3 (ResModule(E0)), where Conv 3×3 (·) represents the 3×3 convolution operation, and ResModule(·) represents passing through a residual module;
[0108] Then, the feature map G1 and the enhanced feature map E0 are combined to form a residual feature map G2 = Concat(G1, E0), where Concat(·) represents the feature concatenation operation;
[0109] Then, the residual feature map G2 is passed through a 3×3 convolution and a tanh activation function to generate the enhanced feature map G3 = tanh(Conv 3×3 (G2)), where tanh represents the hyperbolic tangent activation function;
[0110] Finally, perform an element-wise multiplication operation on the enhanced feature map G3 and the extracted residual feature map G2 to generate the final denoised feature map G = G3 ⊙ G2, where ⊙ represents the element-wise multiplication operation.
[0111] Use the image fusion module to perform feature fusion on the detail feature map and the denoised feature map to generate a fused feature map, as Figure 6 shown below. Specifically:
[0112] First, concatenate the detail feature map F and the denoised feature map G along the channel dimension to generate a fused feature map H0 = Concat(F, G). The fused feature map H0 undergoes two average pooling operations and two upsampling operations to restore the original resolution, generating a feature map H3:
[0113] H3 = Upsample(Upsample(AvgPool(AvgPool(H0))))
[0114] where AvgPool(·) represents the average pooling operation and Upsample(·) represents the upsampling operation;
[0115] In addition, the detail feature map F and the denoised feature map G are respectively subjected to deep feature extraction through a residual block to generate a feature map H4 = ResModule(F) and a feature map H5 = ResModule(G);
[0116] Add the feature maps H3, H4, and H5 element-wise to generate a feature map H6 = H3 + H4 + H5. Finally, the feature map H6 undergoes two consecutive 3×3 convolution operations to generate the final fused feature map H:
[0117] H = Conv 3×3 (Conv 3×3 (H6)).
[0118] In a specific application embodiment, the platform system used for training the model is the Centos system, the language is Python 3.9.10, the PyTorch deep learning framework is used for training, the hardware platform is NVIDIA RTX 3090 (with 24G of video memory), the images are divided into high-quality images and low-quality images, and the low-quality images include images with quality degradation caused by three factors: dust, light, and rainfall; the high-quality images and low-quality images together constitute a UAV safety inspection image dataset, with a total of 2700 images, which are divided into a training set and a test set according to a ratio of 4:1; the number of channels is 3, and the height and width of the images are 512 and 512; during the training process, Adam is used as the optimizer, the initial learning rate is 0.001, and every 80 training rounds, the learning rate decays to 0.1 of the original value, and a total of 400 training rounds are performed.
[0119] Drone safety supervision and inspection image processing to obtain a single drone safety supervision and inspection image that needs to be enhanced and optimized, such as Figure 7 shown Figure 7 The left figure of Figure 7 shows a low-quality drone safety supervision and inspection image. Input it into the drone safety supervision and inspection image processing model to obtain an enhanced and optimized drone safety supervision and inspection image, such as Figure 7 shown in the right figure of Figure 7 . After processing, a high-quality drone safety supervision and inspection image is obtained.
[0120] In one embodiment of the present invention, a drone safety supervision and inspection image processing system is provided, including:
[0121] A safety supervision and inspection image acquisition module for acquiring safety supervision and inspection images by means of a drone to form a drone safety supervision and inspection image dataset;
[0122] A drone safety supervision and inspection image processing model construction module for constructing a drone safety supervision and inspection image processing model and using the drone safety supervision and inspection image dataset for model training and evaluation;
[0123] An image optimization processing module for inputting the safety supervision and inspection images collected by the drone in real time into the trained and evaluated drone safety supervision and inspection image processing model and outputting enhanced and optimized drone safety supervision and inspection images;
[0124] Among them, the drone safety supervision and inspection image processing model includes:
[0125] An image deconstruction module for extracting detailed images from the safety supervision and inspection images through the image deconstruction module and performing adaptive threshold processing on the detailed images;
[0126] A residual module for generating detailed feature maps from the detailed images after adaptive threshold processing through the residual module;
[0127] A detail enhancement module for enhancing the safety supervision and inspection images through the detail enhancement module;
[0128] An image denoising module for denoising the images after enhancement processing to obtain denoised feature maps;
[0129] An image fusion module for fusing the detailed feature maps and the denoised feature maps to generate fusion feature maps.
[0130] In another embodiment of the present invention, an electronic device is proposed, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned drone safety supervision and inspection image processing method is implemented.
[0131] In another embodiment, the present invention provides a computer-readable storage medium storing a computer program that causes a computer to execute the above-described UAV safety supervision and inspection image processing method.
[0132] In the embodiments disclosed in the present application, the computer storage medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the computer storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0133] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Any person skilled in the art, without departing from the scope of the technical solution of the present invention and based on the technical essence of the present invention, any simple modification, equivalent replacement, and improvement made to the above embodiments shall still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for processing images of drone security inspection, characterized in that: The following steps are involved: The safety inspection images are obtained by drone photography to form a drone safety inspection image dataset, and the drone safety inspection image dataset is divided into a training set and a test set; Build a drone safety inspection image processing model and use drone safety inspection image datasets for model training and evaluation; Input the safety inspection images collected by the drone in real time into the trained and evaluated drone safety inspection image processing model, and output enhanced and optimized drone safety inspection images; The drone safety inspection image processing model includes: The security inspection image is extracted into a detail image through the image deconstruction module, and the detail image is subjected to adaptive threshold processing; the detail image after adaptive threshold processing is subjected to the residual module to generate a detail feature map; In addition, the security inspection image is enhanced by the detail enhancement module; the enhanced image is denoised by the image denoising module to obtain a denoised feature map; The image fusion module is used to fuse the detail feature map and the denoising feature map to generate a fused feature map.
2. The method for processing drone security inspection images according to claim 1, characterized in that: The UAV security inspection image dataset is divided into a high-quality image dataset and a low-quality image dataset. The high-quality image dataset is used as a training set to train the UAV security inspection image processing model, and the low-quality image dataset is used as a test set to test and evaluate the performance of the UAV security inspection image processing model.
3. The method for processing drone security inspection images according to claim 1, characterized in that: The method of extracting detail images from the security inspection images through the image deconstruction module and performing adaptive threshold processing on the detail images includes: (1) Input the security inspection image to the image deconstruction module Among them, H in Indicates the height of the image, W in Indicates the width of the image, C in Indicates the number of channels of the image; for security inspection image I in Apply a Gaussian filter G σ Smoothing is performed, and then a low-resolution image I is constructed by downsampling every other pixel. low : I low =Downsample(G σ *I in ) Where * indicates convolution operation, Downsample(*) indicates downsampling; Then, linear interpolation is used to transform the low-resolution image I low Upsample to the original resolution to get the base image I base =Upsample(I low ), where Upsample(*) represents a linear interpolation upsampling operation; Subtract the basic image from the original safety inspection image pixel by pixel to extract the detail image I detail =I in -I base ; (2) The detail image I detail After adaptive threshold processing, the threshold T(x, y) is dynamically adjusted according to the local pixel intensity distribution of the image, and the enhancement function of adaptive threshold processing is defined as: Wherein, T(x, y) is a dynamic threshold calculated based on a local window k×k, T(x, y) = μ(x, y) + α·σ(x, y), μ(x, y) and σ(x, y) are the mean and standard deviation of the local window, respectively, and α is a control parameter.
4. The method for processing drone security inspection images according to claim 3, characterized in that: The detail image after the adaptive threshold processing is processed through the residual module to generate the detail feature map, specifically: The detail image F0 after adaptive threshold processing is processed through a 3×3 convolution operation, batch normalization and LeakyReLU activation function to generate the feature map F1: F1=LeakyReLU(BN(Conv 3×3 (F0))) Among them, Conv 3×3 (·) represents a 3×3 convolution operation, BN(·) represents a batch normalization operation, and LeakyReLU(·) represents an activation function operation; Then the detail image F0 and the feature map F1 after adaptive threshold processing are concatenated in the channel dimension to generate a fused feature map F2 = Concat (F0, F1). Then, the fused feature map F2 undergoes a 3×3 convolution operation and batch normalization to generate the final detail feature map F = BN (Conv 3×3 (F2)).
5. The method for processing drone security inspection images according to claim 1, characterized in that: The security inspection image is enhanced by the detail enhancement module, specifically: Input security inspection image to detail enhancement module Among them, H in Indicates the height of the image, W in Indicates the width of the image, C in Represents the number of channels of the image, which is convolved through a 7×7 convolution kernel W1 to generate a preliminary global feature map E1: E1=Conv 7×7 (X in ,W1)+b1 Among them, Conv 7×7 (·) represents a 7×7 convolution operation, W1 represents the convolution kernel, and b1 represents the bias term; The preliminary global feature map E1 is passed through a residual module to obtain the feature map E2, and the feature map E2 is expanded through a 1×1 convolution layer to obtain the feature map D2: <h2 style=";text-align:left;direction:ltr">D2=Conv<h2 style=";text-align:left;direction:ltr"> 1×1 <h2 style=";text-align:left;direction:ltr"> (E2, W3)+b3 Among them, Conv 1×1 (·) represents a 1×1 convolution operation, W3 represents the convolution kernel, and b3 represents the bias term; The feature map E2 is passed through a residual module and a 1×1 convolution layer for the second time to obtain feature maps E3 and D3, and then passed through a residual module and a 1×1 convolution layer for the third time to obtain feature maps E4 and D4. Finally, the feature maps D2, D3 and D4 are added pixel by pixel to obtain the enhanced feature map E = (D2 + D3 + D4).
6. The method for processing images of drone safety inspection according to claim 5, characterized in that: The image denoising module is used to denoise the enhanced image to obtain a denoising feature map, which is specifically: The enhanced feature map E0 after enhancement is passed through a residual module and a 3×3 convolution to generate a feature map G1 = (Conv 3×3 (ResModule(E0)), where Conv 3×3 (·) indicates a 3×3 convolution operation, and ResModule(·) indicates a residual module. Then the feature map G1 and the enhanced feature map E0 form a residual feature map G2 = Concat (G1, E0), where Concat (·) represents a feature concatenation operation; Then the residual feature map G2 is passed through a 3×3 convolution and tanh activation function to generate an enhanced feature map G3 = tanh (Conv 3×3 (G2)), where tanh represents the hyperbolic tangent activation function; Finally, the enhanced feature map G3 is element-wise dot multiplication performed with the extracted residual feature map G2 to generate the final denoising feature map G=G3⊙G2, where ⊙ represents the element-wise dot multiplication operation.
7. The method for processing images of drone safety inspection according to claim 1, characterized in that: The image fusion module is used to perform feature fusion on the detail feature map and the denoising feature map to generate a fused feature map, specifically: The detail feature map F and the denoising feature map G are first concatenated in the channel dimension to generate a fused feature map H0 = Concat (F, G). The fused feature map H0 is restored to its original resolution after two average pooling operations and two upsampling operations to generate a feature map H3: H3=Upsample(Upsample(AvgPool(AvgPool(H0)))) Where AvgPool(·) represents the average pooling operation, and Upsample(·) represents the upsampling operation; In addition, the detail feature map F and the denoising feature map G are respectively subjected to deep feature extraction through a residual block to generate feature map H4 = ResModule (F) and feature map H5 = ResModule (G); The feature maps H3, H4 and H5 are added element by element to generate the feature map H6 = H3 + H4 + H5. Finally, the feature map H6 is subjected to two consecutive 3×3 convolution operations to generate the final fused feature map H: H=Conv 3×3 (Conv 3×3 (H6))。 8. An unmanned aerial vehicle security inspection image processing system, characterized in that: include: The safety inspection image acquisition module is used to acquire safety inspection images through drone photography to form a drone safety inspection image dataset; The UAV safety inspection image processing model construction module is used to build the UAV safety inspection image processing model and use the UAV safety inspection image dataset for model training and evaluation; An image optimization processing module is used to input the safety inspection images collected by the drone in real time into the trained and evaluated drone safety inspection image processing model, and output enhanced and optimized drone safety inspection images; The drone safety inspection image processing model includes: An image deconstruction module is used to extract detail images from security inspection images through the image deconstruction module, and perform adaptive threshold processing on the detail images; A residual module is used to generate a detail feature map by passing the detail image after adaptive threshold processing through the residual module; A detail enhancement module is used to enhance the security inspection image through the detail enhancement module; An image denoising module is used to denoise the enhanced image to obtain a denoised feature map; The image fusion module is used to fuse the detail feature map and the denoising feature map to generate a fused feature map.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for processing images for safety inspection of unmanned aerial vehicles as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the drone security inspection image processing method according to any one of claims 1 to 7.