Land oil spill detection technology based on unmanned aerial vehicle multispectral image small sample
By equipped with a multi-spectral camera and improved ResUNet algorithm, the flexibility and accuracy of land oil leakage detection are solved, and fast and accurate oil spill detection and segmentation are achieved, which is suitable for equipment with complex environments and limited resources.
Patent Information
- Application Number
- CN202411487173.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art lacks efficient, flexible and fast detection methods in land oil leakage detection, especially in small samples, and it is difficult to achieve accurate oil spill detection and segmentation.
The drone is equipped with a multi-spectral camera to acquire images, combined with the improved ResUNet algorithm for image processing and object detection, and by enhancing brightness, contrast and color, the U-Net model is improved and ResNet is added, and the jump connection and ReLU activation function is used, combined with the RMSprop optimizer and the cross entropy loss function are trained to calculate the oil pollution area.
It realizes high-precision oil spill detection in complex environments under small samples, has rapid detection capabilities, reduces calculation complexity, is suitable for equipment with limited resources, and has important environmental protection significance.
Smart Images

Figure CN120259406A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of image processing and artificial intelligence, and more specifically, to a small sample terrestrial crude oil spill detection technology. Background Art
[0002] Oil is one of the indispensable industrial products in real life. Its leakage is harmful and has far-reaching impacts on the economy, environment and public health. Previously, land oil spills were inspected manually, which greatly increased labor costs. Therefore, it is very important to detect oil leaks in the mining process in a timely and accurate manner. In this invention, we use a drone equipped with a multispectral camera combined with an artificial intelligence algorithm to deal with the problem of surface oil spills.
[0003] The environmental pollution caused by oil development was studied earlier abroad than in China. The main technical research includes: key technology systems for restoration and reconstruction of degraded ecosystems; optimal configuration of ecosystem structure and function and its regulation technology; species and biodiversity restoration and maintenance technology, etc. In the study of oil pollution, most foreign research focuses on oil leakage: for example, Bake: JM. believes that crude oil spills and falls on the ground and penetrates into the soil, blocking the soil pores and causing large-scale plant death; in terms of industrial wastewater treatment, the United States adopts a centralized treatment model and Japan adopts a decentralized treatment model; but neither has conducted digital technology research in the supervision of oil field ecological environment.
[0004] At present, the methods of oil spill detection are mainly applied in the ocean, and there is still a blank on land. The detection of marine oil spills mainly uses synthetic aperture radar, and uses synthetic aperture radar technology combined with the powerful feature learning ability of convolutional neural networks to study marine oil spills. The laser induced fluorescence method can be used for land oil spill detection, but it is greatly affected by the environment. Another method uses an infrared spectrum camera, but the data collection time is too long, which is not conducive to timeliness. As high-resolution optical remote sensing images are becoming more and more popular, this framework is imminent for the remote sensing community. This framework can promote a deeper understanding and utilization of machine learning technology and promote advanced analysis and application of remote sensing data. The use of drones equipped with multispectral cameras to collect high-resolution data is less affected by weather conditions and has high flexibility. It is an ideal choice for rapid and accurate detection of small local oil spills. Summary of the invention
[0005] The purpose of the present invention is to provide a method for collecting surface oil spill data using a multispectral camera mounted on an unmanned aerial vehicle, performing image processing, and performing target detection and image segmentation using an improved ResUNet algorithm, thereby meeting the accuracy requirements for surface oil spill detection and segmentation in small samples and complex situations.
[0006] The technical solution of the present invention is achieved in this way:
[0007] A small - sample land - based petroleum crude oil spill detection technology includes the following steps:
[0008] Step 1: Synthesize multiple channels for the multi - spectral image of the petroleum oil spill captured by the drone, perform radiometric calibration based on the gray - board information captured at that time, and obtain a high - definition RGB image from the resulting grayscale image according to different channels.
[0008] Step 2: Enhance the brightness contrast and:
[0009] I new (x, y)=I old (x, y)+ΔB
[0010] Image contrast adjustment is generally achieved by scaling each pixel value, and the formula is as follows:
[0011] I new (x, y)=α·(I old (x, y)-128)+128
[0012] I new (x,y) represents the pixel value of the adjusted image at the coordinate (x,y). I old (x,y) represents the pixel value of the original image at the coordinate (x,y). ΔB is the brightness increment, which is a constant. α is the contrast gain. When the contrast increases, this constant is usually greater than 1. When the contrast decreases, this constant is between 0 and 1. 128 is the mid - point of the pixel value range (assuming the pixel value range is from 0 to 255).
[0013] Enhance colors: Adjusting the color saturation and hue can make the colors of the image more vivid and natural. Color enhancement involves adjusting saturation, brightness, and contrast. The HSV (hue, saturation, value) color space is suitable for these operations. First, convert the image from RGB to HSV, increase the saturation, and then convert it back to RGB.
[0014] RGB - to - HSV formula:
[0015]
[0016]
[0017]
[0018] Enhance saturation:
[0019] S new =S·α
[0020] α is the saturation gain coefficient
[0021] HSV to RGB Equation:
[0022]
[0023]
[0024] B = V·(1 - S)
[0025] R, G, B: Red, Green, and Blue components. H: Hue (shade or type of color), calculated in degrees. S: Saturation (intensity or purity of color). V: Value (brightness or intensity of color). α: Saturation adjustment factor.
[0026] Step 3. Improve the U-Net model and incorporate ResNet (as Figure 1 ), including the following steps:
[0027] 1. Increase the number of channels in the model, which can capture more complex features and improve the network's ability to understand complex image scenes. Especially when dealing with high-resolution images, it can extract richer context information.
[0028] 2. By increasing the network depth, the model can gradually extract more advanced semantic features and enhance the perception ability of subtle features. This may lead to better segmentation accuracy when dealing with complex image scenes.
[0029] 3. Improvement of Skip Connections: It can further reduce the loss of high-resolution features in the model and enhance the efficiency of information fusion. This is especially useful when dealing with boundary details or fine structures. The skip connections in U-Net splice the features in the encoder directly to the corresponding layers in the decoder. Assume the feature in the encoder is F enc (with size H×W×C), and the feature in the decoder is F dec (with size H×W×C′). The splicing operation can be expressed as:
[0030] F concat = concat(F enc , F dec )
[0031] The size of the spliced feature map is H×W×(C′ + C).
[0032] 4. Introduce ResNet to solve the vanishing gradient problem in the training of deep networks, enabling the network to continue deepening as the number of layers increases while maintaining good performance.
[0033] 5. After each convolutional layer, use the ReLU (Rectified Linear Unit) activation function to introduce non-linearity:
[0034] y = max(0, x)
[0035] ReLU effectively eliminates negative numbers, retains non - negative eigenvalues, and prevents the vanishing gradient problem.
[0036] The model is trained using the RMSprop optimizer. This optimizer is chosen because it can adjust the learning rate for each parameter, helping to accelerate convergence and improve the accuracy of the model, especially in small - sample settings.
[0037] The Cross - Entropy Loss function is used. By quantifying the difference between the probability distribution predicted by the model and the true labels, it can effectively guide the model's learning. When combined with the softmax function, it can provide stable gradient updates, avoiding the problems of vanishing or exploding gradients. In addition, cross - entropy loss is applicable to multi - class classification problems, imposing a large penalty on misclassifications, especially when the model has high confidence but makes a wrong prediction, thus accelerating the model's convergence speed. Its convex function property also guarantees the existence of a global optimal solution in binary classification tasks, making the model training process more robust.
[0038] Step Four: Calculate the area of the oil stain, the steps are as follows:
[0039] 1. Segment the detection target ( Figure 2 ) and extract the target contour Figure 2
[0040] 2. Measure the reference benchmark: Select a reference object (calibration gray board) with known size within the shooting area for scale conversion.
[0041] 3. Calculate the pixel area of the target region. Convert the pixel area to the actual area using a known scale. The formula is:
[0042] S is the actual area; s is the pixel area; L is the actual length, the true size of the reference object; l is the pixel length, the pixel length of this object in the corresponding image.
[0043] The above - mentioned technical solution of the present invention has the following advantages:
[0044] The framework of this application has the characteristics of small samples, that is, it has good generalization ability even with a small number of training sets during training. It is lightweight, that is, it has a low computational complexity and can be more conveniently deployed on devices with limited resources. It has a fast inference speed and can detect oil spill areas faster, which is of great significance for protecting the environment and public health. Description of the Drawings
[0045] Figure 1 is the improved algorithm model
[0046] Figure 2 is the original data
[0047] Figure 3 is the target segmentation area
[0048] Figure 4 is the flow chart of the present invention.
Claims
1. A small-sample land oil spill detection method based on drone multispectral images, characterized in that, The steps include: Use drones equipped with multispectral cameras to collect surface oil spill images containing multiple spectral channels; Preprocess the collected multispectral images, including radiometric calibration, image enhancement and other steps, to improve the contrast and clarity of the images; Training and test sets generated from surface oil spill images; Train the model based on the training set to obtain a network training model; Test the model based on the test set, adjust the model parameters based on the test results, and obtain the final network training model; Based on the improved training model, the oil spill images are identified and segmented; Based on RTK, the oil spill area is accurately located, and the area of the oil spill is calculated based on the segmented image; Use a drone equipped with a multispectral camera to collect surface oil spill images containing multiple spectral channels, including: Choose different weather and time periods to shoot with a drone equipped with a multispectral camera; Perform some simple processing on the oil spill area to increase the diversity of photographed samples; The drone collects high-resolution multispectral images in real time during the flight to record the specific conditions of the oil spill area. These images are transmitted in real time by the drone or downloaded after the mission is completed for further processing. The training and test sets generated by surface oil spill images include: Perform simple processing on basic image samples, including but not limited to flipping, translating, and adding noise; The basic images are distributed to the training set and the test set in a 7:3 ratio. The collected multispectral images are preprocessed, including radiation calibration, image enhancement and other steps, to improve the contrast and clarity of the images. The specific steps include: The image data (including the training set and the test set mentioned above) is radiometrically calibrated according to the standard gray plate taken when the data was collected and the gray plate information. The sample images obtained by radiometric calibration can be enhanced in brightness, contrast and color to more clearly highlight the difference between the oil and the background environment. By enhancing the details in the image, such as the edge of the oil pollution, it can make it easier for subsequent algorithms to identify the oil spill area. Based on the improved training model, the oil spill images are identified and segmented. The specific steps are as follows: Extract image features, encode image features based on the encoder, continuously reduce spatial resolution through convolution and pooling, and extract deep features. In the decoder part, the spatial resolution of the image is gradually restored to its original size through upsampling (using deconvolution or upsampling operations). Through the "deconvolution 2x2" operation, the resolution of the image is gradually restored. Each decoder layer combines information from the jump connection for detail recovery. Based on the overall features and detail features, the RMSprop optimization algorithm is used for training to obtain the training model. Based on RTK, the oil spill area is accurately located, and the area of the oil spill area is calculated based on the segmented image. The specific steps are as follows: Correcting the acquired images, including geometric correction and radiation correction; Select a reference object of known size (such as a calibration point or an object of known area) within the captured area for scaling. For the extracted image samples of the oil spill area, calculate the pixel area of the target area according to its contour, and calculate the actual area through the pixel area.
2. A method for oil spill detection based on drone multispectral as claimed in claim 1, characterized in that as many data as possible are generated from limited oil spill data.
3. A method for oil spill detection based on drone multispectral as claimed in claim 1, characterized in that the multispectral camera carried by the drone has six spectral channels, including wavelengths of 450nm, 555nm, 660nm, 720nm, 750nm and 840nm, and is used to capture spectral information in the range from visible light to near infrared.
4. A method for oil spill detection based on drone multispectral as claimed in claim 1, characterized in that based on the multispectral images collected by the drone, a gray board is used for radiometric calibration to reduce the influence of environmental illumination conditions on image processing and ensure that the detection results of the model have high robustness.
5. A method for oil spill detection based on drone multispectral as claimed in claim 1, characterized in that the brightness, contrast and saturation are adjusted by converting RGB to HSV and then back to RGB.
6. An oil spill detection algorithm based on drone multispectral as claimed in claim 1, characterized in that small samples have good detection ability, and the ratio of the training set to the test set is 5:
2.
7. An oil spill detection algorithm based on drone multispectral according to claim 1, characterized in that, The improved model enhances the model's processing ability for high-resolution images and improves the detection accuracy of the oil spill area in complex environments by introducing the ResNet residual network and skip connections. The skip improvement introduces: F concat = concat(F enc , F dec ).
8. The oil spill detection algorithm based on drone multispectral according to claim 1, characterized in that The RMSprop optimization algorithm dynamically adjusts the learning rate according to the mean square of the gradient, thereby improving the convergence speed on small sample datasets and the stability of the model. The optimization objective is: g t ←ρg t-1 +(1 - ρ)S t ⊙S t 9. The oil spill detection algorithm based on drone multispectral according to claim 1, characterized in that This method can be used for oil spill detection under complex terrain and climatic conditions, and has the advantages of fast deployment and low computational complexity, and is suitable for application scenarios with limited resources.
10. A method for oil spill detection based on drone multispectral as claimed in claim 1, characterized in that the acquired images are corrected, including geometric correction and radiometric correction. A reference object (calibration gray board) with a known size is selected within the shooting area for scale conversion. Calculate the pixel area of the target area. Convert the pixel area to the actual area using the known scale. The formula is: Actual area = Pixel area × (Actual length / Pixel length) 2 .
Citation Information
Cited By
Surface water oil stain ultraviolet polarization imaging detection system and method
CN120522099A