Multispectral petroleum leakage detection method and device and storage medium

Through the multi-spectral oil leakage detection method, combined with spectral imaging, principal component analysis, SAM, region growth algorithm and optimized YOLO model, the problems of poor real-time performance and limited coverage of oil leakage detection in the existing technology are solved, and high precision is achieved , highly robust oil leakage detection effect.

CN119478674APending Publication Date: 2025-02-18WUHAN HUAZHONG NUMERICAL CONTROL
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411507061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing oil leakage detection methods have problems such as poor real-time performance, limited coverage, large amount of multi-spectral data and serious noise interference, making it difficult to achieve high-precision detection in complex environments.

Method used

Multispectral oil leakage detection method is adopted to obtain multispectral images through spectral imaging equipment, perform pre-processing and denoising, and use principal component analysis to reduce data dimensions. Based on the optimized SAM method and region growth algorithm, potential oil leakage characteristic areas are identified, and Multi-spectral images are input into the optimized YOLO model for object detection and classification, and finally the detection results are optimized through NMS.

Benefits of technology

It significantly improves the accuracy and real-time performance of oil leakage detection, and is suitable for oil leakage detection in complex backgrounds, with high accuracy and high robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478674A_ABST
    Figure CN119478674A_ABST
Patent Text Reader

Abstract

The invention discloses a multispectral petroleum leakage detection method. The method comprises the following steps: S1, acquiring a multispectral image of a petroleum leakage area by using spectral imaging equipment; s2, the multispectral image is preprocessed, and noise in multispectral data is removed; s3, reducing data dimensions of the multispectral data by using a principal component analysis method, and removing redundant wavebands; s4, extracting a potential petroleum leakage characteristic region from the multispectral image based on an optimized SAM method, and performing ROI recognition through a region growing algorithm; s5, inputting the multispectral image into the optimized YOLO model, and carrying out entry detection and classification; and S6, optimizing a detection result by using an NMS, removing redundant detection through non-maximum suppression, and reserving an optimal detection result. The invention further discloses multispectral petroleum leakage detection equipment and a storage medium. The multispectral petroleum leakage detection method provided by the embodiment of the invention has the characteristics of high precision and high robustness, and is suitable for petroleum leakage detection under a complex background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of oil leakage detection, and more specifically, to a multi-spectral oil leakage detection method, device and storage medium. Background Art

[0002] Oil spills can cause serious environmental pollution, especially to soil, oceans and other ecological environments. Therefore, rapid and accurate detection of oil spills is of great practical significance. Traditional oil spill detection methods mainly rely on manual, physical and chemical means, such as human eye recognition, sampling analysis, etc., but these methods often have problems such as poor real-time performance and limited coverage.

[0003] Multispectral imaging technology is widely used in the field of environmental monitoring because it can capture spectral information in different bands. However, the effect of using multispectral data alone for oil leak detection is not ideal, and there are problems such as noise interference, complex environmental conditions and large amount of multispectral data. Summary of the invention

[0004] In response to at least one defect or improvement need in the prior art, the present invention provides a multi-spectral oil leak detection method, device and storage medium, which can solve at least one of the problems existing in the above-mentioned background technology.

[0005] To achieve the above object, according to a first aspect of the present invention, a multi-spectral oil leak detection method is provided, the method comprising:

[0006] S1 uses spectral imaging equipment to scan the oil spill area in different spectral bands to obtain multispectral images of the area;

[0007] S2 preprocesses the multispectral image to remove noise in the multispectral data;

[0008] S3 uses principal component analysis to reduce the data dimension of the preprocessed multispectral data, selects the corresponding characterization bands according to the spectral characteristics under different backgrounds, and removes redundant bands;

[0009] S4 extracts potential oil spill feature areas from multispectral images based on the optimized SAM method and performs ROI identification through the region growing algorithm;

[0010] S5 inputs the multispectral image into the optimized YOLO model for target detection and classification;

[0011] S6 uses NMS to optimize detection results, removes redundant detections through non-maximum suppression, and retains the best detection results.

[0012] Furthermore, in the above multi-spectral oil leak detection method, the optimized YOLO model specifically includes:

[0013] Adjust the input layer and expand the input layer of the YOLO model to the actual number of channels of the multispectral image; initialize the weights of the newly expanded input layer; add additional convolutional layers to the YOLO model and increase the depth of the convolutional layers; perform multi-scale feature fusion through the feature pyramid network; optimize the training strategy by introducing the self-attention mechanism and optimizing the loss function.

[0014] Furthermore, in the above multi-spectral oil leak detection method, the multi-scale feature fusion through the feature pyramid network specifically includes:

[0015] A feature pyramid network is integrated into the YOLO model. The feature pyramid network includes fusing low-level high-resolution features with high-level low-resolution features through upsampling, and inputting the fused multi-scale feature map into the YOLO detection head to obtain the detection result.

[0016] Furthermore, in the above multispectral oil leak detection method, the self-attention mechanism is introduced, specifically including:

[0017] A channel attention mechanism is introduced to automatically adjust the weights of different spectral channels; a self-attention mechanism is introduced in the spatial dimension to enhance the model's attention to the leakage area.

[0018] Furthermore, in the above multi-spectral oil leak detection method, the optimized loss function specifically includes:

[0019] Use generalized intersection-over-union as the loss function for bounding box regression and optimize the weights of classification loss and regression loss.

[0020] Furthermore, in the above multi-spectral oil leak detection method, the optimization of the training strategy further includes:

[0021] A phased learning strategy is adopted to gradually reduce the learning rate and adjust the model parameters. The anchor box is designed according to the actual size of the oil spill area to ensure the matching of the anchor box with the target area. Based on data enhancement, the generalization ability of the model is improved.

[0022] Furthermore, in the above multispectral oil leak detection method, the method of reducing the data dimension by using principal component analysis method on the pre-processed multispectral data includes:

[0023] Center each band in the multispectral data so that its mean is 0;

[0024] Calculate the covariance matrix of the centralized data to obtain the correlation between different bands;

[0025] Perform eigenvalue decomposition on the covariance matrix, extract the principal components, and select several components for subsequent analysis based on the eigenvalue size;

[0026] Project the multispectral data into the preset principal component space to reduce the data dimension.

[0027] Furthermore, in the above multi-spectral oil leak detection method, the ROI identification by region growing algorithm specifically includes:

[0028] Based on the spectral angle map output by SAM, multiple pixels with significant spectral feature differences are selected as seed points;

[0029] Based on the preset spectral similarity threshold, starting from the seed point, adjacent pixels are checked in sequence, and pixels that meet the spectral similarity conditions are added to the ROI;

[0030] When no more neighboring pixels satisfy the spectral similarity condition, region growing stops.

[0031] According to the third aspect of the present invention, there is also provided a multi-spectral oil leak detection device, which includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of any one of the above-mentioned methods.

[0032] According to a fourth aspect of the present invention, there is also provided a storage medium storing a computer program executable by a multi-spectral oil leak detection device, wherein when the computer program is run on the multi-spectral oil leak detection device, the multi-spectral oil leak detection device executes the steps of any one of the above-mentioned methods.

[0033] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0034] The multispectral oil leak detection method provided in the embodiment of the present application significantly improves the accuracy and real-time performance of detection by optimizing the spectral angle mapping method and combining it with the YOLO model. It has the characteristics of high accuracy and high robustness and is suitable for oil leak detection in complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1A schematic diagram of a multi-spectral oil leak detection method provided in an embodiment of the present application;

[0037] Figure 2 A schematic diagram of the data preprocessing process provided in the embodiment of the present application;

[0038] Figure 3 A schematic diagram of the process of feature extraction and dimensionality reduction provided in the embodiment of the present application;

[0039] Figure 4 A schematic diagram of the post-processing optimization process provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0041] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0042] Figure 1 A schematic diagram of a multi-spectral oil leak detection method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, a multi-spectral oil leak detection method provided in an embodiment of the present application includes:

[0043] S1 uses spectral imaging equipment to scan the oil spill area in different spectral bands to obtain multispectral images of the area.

[0044] Specifically, the spectral characteristics of oil spills in multispectral images are manifested as specific changes in spectral reflectance. In the visible to near-infrared band, the spectral characteristics of oil have the following significant characteristics:

[0045] (1) Spectral absorption characteristics: Petroleum has strong spectral absorption in specific bands, especially in the near-infrared band (e.g. 700-1200nm).

[0046] (2) Changes in spectral reflectivity: The spectral reflectivity of the oil spill area is significantly different from the surrounding background. For example, the reflectivity of oil in the 400-600nm band is usually lower than the background.

[0047] (3) Band selection: The key bands commonly used for oil detection include: 450nm (blue light), 550nm (green light), 850nm (near infrared), 1200nm (near infrared) and 1600nm (mid infrared). These bands can effectively distinguish the spectral characteristics of oil and environmental background.

[0048] In order to accurately characterize the oil spill, we first need to select the band that best reflects the characteristics of the oil from the multispectral image. The specific steps are as follows:

[0049] (1) Spectral data acquisition: Collect multispectral images of the oil spill area in different spectral bands.

[0050] (2) Spectral feature analysis: Analyze the spectral reflectance of different bands and use spectral feature extraction technology, such as optimized spectral angle mapping, to determine the best characterization band.

[0051] (3) Band selection: Through comparative analysis, key bands reflecting the characteristics of oil leakage (such as 450nm, 550nm, 850nm, 1200nm and 1600nm) are selected for subsequent detection and analysis.

[0052] Experiments show that choosing the right waveband based on the spectral characteristics of oil under different backgrounds is one of the keys to oil leak detection.

[0053] Soil background: Visible light bands (450nm, 550nm) and near-infrared bands (800nm) were selected because these bands can effectively distinguish between oil and bare soil.

[0054] Vegetation background: Select the near infrared band (700-1300nm) and the visible red band (680nm), which can highlight the spectral differences between oil and healthy vegetation.

[0055] Rock background: Select the mid-infrared band (1700nm, 2300nm) and use the contrast between the absorption peak of oil and the rock background to identify oil leaks.

[0056] Conduct preliminary data collection on the oil spill area, use optical imaging equipment to scan the oil spill area in different spectral bands, and obtain spectral imaging data of the area. This data includes a variety of surface information, such as soil, vegetation, water bodies, and spectral data of the oil spill area.

[0057] S2 preprocesses the multispectral image to remove noise from the multispectral data.

[0058] Specifically, the multispectral image is preprocessed, such as Figure 2 As shown, mean filtering and median filtering are used to remove noise from multispectral image data, improve image quality, and ensure the accuracy of subsequent processing. At the same time, atmospheric correction is performed to eliminate spectral distortion caused by the atmosphere to ensure the consistency and reliability of spectral data.

[0059] S3 uses principal component analysis to reduce the data dimension of the preprocessed multispectral data, selects the corresponding characterization bands according to the spectral characteristics under different backgrounds, and removes redundant bands.

[0060] Specifically, in order to reduce the dimensionality of the data and extract the most informative spectral features, such as Figure 3 As shown, the principal component analysis (PCA) method is used for dimensionality reduction.

[0061] By analyzing the spectral characteristics of oil leaks, the key bands that can best characterize oil leaks are selected, redundant bands are removed, and the detection effect is improved.

[0062] S4 extracts potential oil spill feature areas from multispectral images based on the optimized SAM method and performs ROI identification through the region growing algorithm.

[0063] Specifically, in order to improve the performance of spectral angle mapping (SAM) in oil leak detection, this embodiment optimizes the SAM method as follows:

[0064] Adaptive threshold setting: According to the extracted background spectral features, the spectral angle threshold of the SAM algorithm is dynamically adjusted, and an adaptive threshold is set to improve the accuracy and sensitivity of detection. The spectral angles of different bands are calculated, and dynamic thresholds are set to adapt to the characteristics of oil leaks under different environmental conditions. For example, in vegetation areas, the spectral characteristics of oil may be less different from the background, so a stricter threshold is required; in exposed soil areas, the spectral differences are large, and the threshold can be appropriately relaxed.

[0065] Based on the spectral feature recognition, multi-band weighting can be performed by the following methods: (1) Weighting coefficient setting: According to the response intensity of different bands to oil characteristics, the weighting coefficient of each band is set. The weighting coefficient can be determined by analyzing the training data set. For example, a band that is sensitive to oil characteristics can be given a higher weight. (2) Spectral weighting calculation: Multiply the spectral value of each pixel by the corresponding weighting coefficient to obtain the weighted spectral value. The formula is:

[0066]

[0067] Among them, V weightd is the weighted spectral value, ω iis the weighting coefficient of band i, V i is the spectral value of band i, V bg,i is the spectral value of the background area, n is the total number of bands, V j is the spectral value of another band in the same area but under different backgrounds. (3) Comprehensive analysis and classification: The weighted spectral values ​​are used for subsequent classification and analysis to improve the detection accuracy of oil leaks.

[0068] Spectral angle calculation and classification: Use the adjusted spectral angle threshold to calculate each pixel and identify the oil spill area. Improve the calculation method of spectral angle in SAM and use the weighted spectral angle calculation formula to enhance the ability to distinguish oil spill characteristics. The optimized calculation formula is:

[0069]

[0070] Where S is the spectral feature vector of the leakage area, and T is the background spectral feature vector.

[0071] Use image segmentation technology to divide the image into several regions of interest (ROIs), and use the region growing algorithm to identify the regions of interest (ROIs), improve the ability to focus on the oil spill area, confirm the boundaries of the oil spill area, and ensure the accuracy of the results.

[0072] S5 inputs the multispectral image into the optimized YOLO model for object detection and classification.

[0073] Specifically, YOLO (“You Only Look Once”) is an algorithm that uses convolutional neural networks for object detection. YOLO is one of the faster object detection algorithms out there. It not only classifies an image into one category, but can also detect multiple objects in an image. The algorithm applies a single neural network to the entire image. This means that the network divides the image into regions and predicts bounding boxes and probabilities for each region. YOLO only utilizes convolutional layers, making it a fully convolutional network.

[0074] Optionally, the optimization of the YOLO model may include: selecting a YOLOv8 model and determining an initial network architecture, including feature extraction, classification, and bounding box regression modules; adding a convolutional layer to the feature extraction part of YOLOv8 to extract more detailed features, especially for small areas of oil spills; increasing the number of residual blocks to enhance the model's ability to capture complex features while avoiding the gradient vanishing problem; and using hyperspectral image data labeled with oil spills for training on the expanded model architecture to ensure that the model can adapt to actual application scenarios.

[0075] By inputting the multispectral image into the optimized YOLO model, feature maps of different scales can be predicted, ensuring that the model can accurately detect both large-scale and small-scale leaks, and can detect and classify targets.

[0076] S6 uses NMS to optimize detection results, removes redundant detections through non-maximum suppression, and retains the best detection results.

[0077] Specifically, NMS is used to optimize the detection results: Figure 4 As shown in the figure, redundant detection boxes are removed by non-maximum suppression (NMS), the NMS threshold parameters are optimized, and soft NMS is used instead of traditional NMS to reduce the false detection rate and retain the optimal detection results.

[0078] Optionally, morphological operations (such as opening and closing operations) may be applied to perform boundary smoothing and noise removal on the detected results to improve the accuracy and visual effect of the detection results.

[0079] The multispectral oil leak detection method provided in the embodiment of the present application significantly improves the accuracy and real-time performance of detection by optimizing the spectral angle mapping method and combining it with the YOLO model. It has the characteristics of high accuracy and high robustness and is suitable for oil leak detection in complex backgrounds.

[0080] Optionally, the multispectral oil leak detection method provided in the embodiment of the present application, the optimized YOLO model, the optimization of the YOLO model specifically includes:

[0081] Adjust the input layer and expand the input layer of the YOLO model to the actual number of channels of the multispectral image; initialize the weights of the newly expanded input layer; add additional convolutional layers to the YOLO model and increase the depth of the convolutional layers; perform multi-scale feature fusion through the feature pyramid network; optimize the training strategy by introducing the self-attention mechanism and optimizing the loss function.

[0082] Specifically, the optimization of the model includes:

[0083] (1) Input layer adjustment: The number of channels in the input layer is expanded from the standard 3 (RGB) to the actual number of channels of the multispectral image, such as 8 or more, to accommodate data inputs of different bands. Since the expanded input layer does not match the weights of the pre-trained model, the weights of the newly added channels need to be properly initialized to maintain the stability of the model.

[0084] (2) Convolutional layer adjustment: By adding more convolutional layers to the network, the model can capture more detailed information, especially small-scale oil spill areas; by increasing the depth of the convolutional layer (that is, the number of filters in each convolution operation), the model can extract more complex feature representations, which helps to distinguish oil spill areas from other objects in complex backgrounds.

[0085] (3) Feature fusion: FPN extracts features at different levels and fuses high-resolution low-level features with low-resolution high-level features, ensuring that the model can focus on both large and small oil spill areas. In the FPN structure, low-level high-resolution features are fused with high-level low-resolution features through upsampling to generate feature maps with richer information, which helps detect oil spill areas of different scales and shapes.

[0086] (4) Introduction of self-attention mechanism: By adding a channel attention module after the convolutional layer, the model can adaptively adjust the weights of different channels, highlight the spectral features related to oil spills, and suppress irrelevant information; the introduction of the attention mechanism in the spatial dimension enables the model to focus on the leakage area more accurately while ignoring background interference, thereby improving the detection accuracy and robustness.

[0087] Optionally, the multispectral oil leak detection method provided in the embodiment of the present application performs multi-scale feature fusion through a feature pyramid network, specifically including:

[0088] The feature pyramid network is integrated into the YOLO model. The feature pyramid network includes fusing low-level high-resolution features with high-level low-resolution features through upsampling, and inputting the fused multi-scale feature map into the YOLO detection head to obtain the detection result.

[0089] Specifically, the Feature Pyramid Network (FPN) extracts features at different levels and fuses high-resolution low-level features with low-resolution high-level features to ensure that the model can focus on both large and small oil spill areas. In the FPN structure, low-level high-resolution features are fused with high-level low-resolution features through upsampling to generate feature maps with richer information, which helps detect oil spill areas of different scales and shapes.

[0090] Optionally, add a feature pyramid network, including:

[0091] FPN integration: Add a feature pyramid network (FPN) between the multi-scale feature maps of the YOLO model. FPN uses top-down feature fusion to make feature maps of different scales complement each other and improve the detection ability of objects of different sizes.

[0092] Multi-scale object detection: In the YOLO model with integrated FPN, feature maps of different scales are predicted to ensure that the model can accurately detect both large-scale and small-scale leakage.

[0093] Training and Validation: Comprehensive training and validation are performed on the model with FPN added, especially testing it in oil spill scenarios with multi-scale objects.

[0094] FPN is integrated into the YOLOv8 model to improve the detection capability of oil spill areas of different scales through multi-scale feature fusion. Low-level high-resolution features are fused with high-level low-resolution features through upsampling, and the fused multi-scale feature map is input into the detection head of YOLOv8 to obtain more accurate detection results.

[0095] Optionally, the multispectral oil leak detection method provided in the embodiment of the present application introduces a self-attention mechanism, specifically including:

[0096] A channel attention mechanism is introduced to automatically adjust the weights of different spectral channels; a self-attention mechanism is introduced in the spatial dimension to enhance the model's attention to the leakage area.

[0097] Specifically, a channel attention mechanism is introduced to automatically adjust the weights of different spectral channels to highlight features related to oil spills. A self-attention mechanism is introduced in the spatial dimension to enhance the model's attention to the spill area and reduce background interference.

[0098] Optionally, the multi-spectral oil leak detection method provided in the embodiment of the present application optimizes the loss function, specifically including:

[0099] Use generalized intersection-over-union as the loss function for bounding box regression and optimize the weights of classification loss and regression loss.

[0100] Specifically, during the training process, the classification loss weights and bounding box regression loss are optimized, and the generalized intersection-over-union (GIoU) ​​loss function is adopted to enhance the model's ability to fit the target boundary and improve the accuracy of bounding box prediction.

[0101] The weights of classification loss and regression loss are optimized to balance the accuracy of detection and bounding box regression.

[0102] Optionally, the multi-spectral oil leak detection method provided in the embodiment of the present application, the optimization of the training strategy, further includes:

[0103] A phased learning strategy is adopted to gradually reduce the learning rate and adjust the model parameters. The anchor box is designed according to the actual size of the oil spill area to ensure the matching of the anchor box with the target area. Based on data enhancement, the generalization ability of the model is improved.

[0104] Specifically, a phased learning rate strategy is adopted. A larger learning rate is used in the early stage to accelerate convergence, and the learning rate is gradually reduced in the later stage to fine-tune the model parameters. The anchor box is designed according to the actual size of the oil spill area to ensure that the anchor box matches the target area. A variety of data enhancement techniques are used, such as random cropping, flipping, color jittering, etc., to improve the generalization ability of the model.

[0105] Optionally, the multispectral oil leak detection method provided in the embodiment of the present application uses principal component analysis to reduce the data dimension of the pre-processed multispectral data, including:

[0106] Center each band in the multispectral data so that its mean is 0;

[0107] Calculate the covariance matrix of the centralized data to obtain the correlation between different bands;

[0108] Perform eigenvalue decomposition on the covariance matrix, extract the principal components, and select several components for subsequent analysis based on the eigenvalue size;

[0109] Project the multispectral data into the preset principal component space to reduce the data dimension.

[0110] Specifically, several main components can be selected for subsequent analysis based on the size of the eigenvalues, and the specific number of components to be selected needs to be determined based on actual conditions.

[0111] Optionally, the multispectral oil leak detection method provided in the embodiment of the present application performs ROI identification through a region growing algorithm, specifically including:

[0112] Based on the spectral angle map output by SAM, multiple pixels with significant spectral feature differences are selected as seed points;

[0113] Based on the preset spectral similarity threshold, starting from the seed point, adjacent pixels are checked in sequence, and pixels that meet the spectral similarity conditions are added to the ROI;

[0114] When no more neighboring pixels satisfy the spectral similarity condition, region growing stops.

[0115] Specifically, the region growing algorithm is used to identify the region of interest after PCA dimension reduction and spectral feature extraction. According to the spectral angle map output by SAM, pixels with significant spectral feature differences are selected as seed points, which are usually located in the possible oil leakage area. The optimized SAM algorithm is used for preliminary detection to identify the potential oil leakage area. These areas are marked as initial ROIs. The initial ROI is used as a seed point and the region growing algorithm is applied to expand these areas. The region growing algorithm gradually expands the region according to similar spectral feature vectors to capture more oil leakage pixels. Optionally, a spectral similarity threshold is set to allow neighboring pixels with similar spectral characteristics to the seed point to join the region growing and gradually expand the ROI; starting from the seed point, the adjacent pixels are checked in turn, and all pixels that meet the spectral similarity conditions are added to the ROI; when there are no more adjacent pixels that meet the growth conditions, the region growing ends. Further SAM calculations are performed on the expanded ROI to reconfirm the boundaries of the oil leakage area and ensure the accuracy of the results.

[0116] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0117] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0119] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.

[0123] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0124] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0125] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-spectral oil leak detection method, characterized in that: include: S1 uses spectral imaging equipment to scan the oil spill area in different spectral bands to obtain multispectral images of the area; S2 preprocesses the multispectral image to remove noise in the multispectral data; S3 uses principal component analysis to reduce the data dimension of the preprocessed multispectral data, selects the corresponding characterization bands according to the spectral characteristics under different backgrounds, and removes redundant bands; S4 extracts potential oil spill feature areas from multispectral images based on the optimized SAM method and performs ROI identification through the region growing algorithm; S5 inputs the multispectral image into the optimized YOLO model for target detection and classification; S6 uses NMS to optimize detection results, removes redundant detections through non-maximum suppression, and retains the best detection results.

2. The multi-spectral oil leak detection method according to claim 1, characterized in that: The optimized YOLO model specifically includes: Adjust the input layer and expand the input layer of the YOLO model to the actual number of channels of the multispectral image; initialize the weights of the newly expanded input layer; add additional convolutional layers to the YOLO model and increase the depth of the convolutional layers; perform multi-scale feature fusion through the feature pyramid network; optimize the training strategy by introducing the self-attention mechanism and optimizing the loss function.

3. The multi-spectral oil leak detection method according to claim 2, characterized in that: The multi-scale feature fusion through the feature pyramid network specifically includes: A feature pyramid network is integrated into the YOLO model. The feature pyramid network includes fusing low-level high-resolution features with high-level low-resolution features through upsampling, and inputting the fused multi-scale feature map into the YOLO detection head to obtain the detection result.

4. The multi-spectral oil leak detection method according to claim 2, characterized in that: The introduction of the self-attention mechanism specifically includes: A channel attention mechanism is introduced to automatically adjust the weights of different spectral channels; a self-attention mechanism is introduced in the spatial dimension to enhance the model's attention to the leakage area.

5. The multi-spectral oil leak detection method according to claim 2, characterized in that: The optimized loss function specifically includes: Use generalized intersection-over-union as the loss function for bounding box regression and optimize the weights of classification loss and regression loss.

6. The multi-spectral oil leak detection method according to claim 2, characterized in that: The optimization of the training strategy also includes: A phased learning strategy is adopted to gradually reduce the learning rate and adjust the model parameters. The anchor box is designed according to the actual size of the oil spill area to ensure the matching of the anchor box with the target area. Based on data enhancement, the generalization ability of the model is improved.

7. The multi-spectral oil leak detection method according to claim 1, characterized in that: The method of reducing the data dimension by using principal component analysis method on the preprocessed multispectral data includes: Center each band in the multispectral data so that its mean is 0; Calculate the covariance matrix of the centralized data to obtain the correlation between different bands; Perform eigenvalue decomposition on the covariance matrix, extract the principal components, and select several components for subsequent analysis based on the eigenvalue size; Project the multispectral data into the preset principal component space to reduce the data dimension.

8. The multi-spectral oil leak detection method according to claim 1, characterized in that: The ROI identification by using the region growing algorithm specifically includes: Based on the spectral angle map output by SAM, multiple pixels with significant spectral feature differences are selected as seed points; Based on the preset spectral similarity threshold, starting from the seed point, adjacent pixels are checked in sequence, and pixels that meet the spectral similarity conditions are added to the ROI; When no more neighboring pixels satisfy the spectral similarity condition, region growing stops.

9. A multi-spectral oil leak detection device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: It stores a computer program executable by a multi-spectral oil leak detection device. When the computer program runs on the multi-spectral oil leak detection device, the multi-spectral oil leak detection device executes the steps of the method described in any one of claims 1 to 8.

Citation Information

Cited By

  • Gas leakage position positioning method and device

    CN119762764A

  • Petroleum transportation safety supervision method and system based on artificial intelligence

    CN120429724A

  • TDGA-YOLO-based cryogenic propellant leakage detection positioning method and device

    CN120635420A