A Marine Oil Spill Detection Method and System Based on an Improved Quantum Gray Wolf Optimization Algorithm

By optimizing the hyperparameters of the restricted Boltzmann machine model and using a quantum-inspired gray wolf optimization algorithm for dual-threshold optimization, the problems of blindness and large computational load in oil film region segmentation in existing technologies are solved, achieving efficient and accurate marine oil spill detection.

CN123118633APending Publication Date: 2026-11-17SHENZHEN INST OF GUANGDONG OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611614470.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-19
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing marine oil spill detection technologies, the number of hidden nodes and the learning rate of the restricted Boltzmann machine model are subject to manual setting, leading to blindness. The three-class Otsu segmentation has a large computational load and is prone to getting trapped in local optima, making it difficult to achieve efficient and accurate oil film area segmentation.

Method used

The hyperparameters of the restricted Boltzmann machine model are optimized using the Langevin equation evolution algorithm, and dual-threshold optimization is performed by combining the quantum heuristic gray wolf optimization algorithm. The oil film interest region is extracted and segmented by improving the quantum gray wolf optimization algorithm.

Benefits of technology

It improves the pixel-level three-class classification accuracy and segmentation integrity of oil slick images, provides an intuitive decision-making basis for oil spill emergency response, and supports the deployment of oil booms and the dispatch of cleanup vessels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118633A_ABST
    Figure CN123118633A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for marine oil spill detection based on an improved quantum gray wolf optimization algorithm, relating to the field of marine oil spill image detection and segmentation technology. The method first acquires preprocessed images from shipborne radar; then, it extracts the region of interest (ROI) of the oil slick using a restricted Boltzmann machine model. This includes using the number of hidden nodes and the learning rate as hyperparameters to be optimized, employing the Langevin equation evolutionary algorithm for optimization, extracting hidden layer features from the image using the optimal hyperparameters, and performing pixel-level three-class classification based on these features. This process then extracts a binary mask of the oil slick region to obtain the ROI. Next, a quantum heuristic gray wolf optimization algorithm is used to optimize the ROI with dual thresholds to obtain the optimal dual threshold combination. Finally, oil slick segmentation is performed based on the optimal dual threshold combination to obtain the oil slick segmentation result. This invention improves the accuracy of ROI extraction and oil slick segmentation, and can be used for marine oil spill detection and emergency response, providing a basis for oil spill emergency decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of marine oil spill image detection and segmentation technology, specifically to a marine oil spill detection method and system based on an improved quantum gray wolf optimization algorithm. Background Technology

[0002] Marine oil spills can easily cause severe ecological damage, and the subsequent ecological restoration costs are enormous. Therefore, building efficient early monitoring and rapid emergency response capabilities is crucial. In oil spill monitoring, synthetic aperture radar (SAR) has become one of the most effective means of detecting and dynamically tracking oil slicks on the sea surface due to its unique advantages of being available 24 / 7 and unaffected by cloud or rain conditions. However, spaceborne and airborne SAR platforms are limited by satellite revisit cycles and flight schedules, making it difficult to achieve continuous, real-time monitoring of oil spill areas, and there are still significant shortcomings in the timeliness of emergency response. As a standard configuration for ship navigation, marine radar can be deployed at oil spill sites to achieve close-range, uninterrupted scanning and real-time detection of oil slicks.

[0003] In existing methods, the Restricted Boltzmann Machine (RBM) model is often used for image feature extraction, but its number of hidden nodes and learning rate are mostly manually set, which is blind and affects the subsequent classification accuracy. There are differences in gray levels inside the oil film region, and single threshold segmentation is difficult to fully characterize the target boundary. If exhaustive search is used for the three-class Otsu segmentation with dual threshold optimization, the computational cost is large. If intelligent optimization algorithms are used to solve the problem, there is a risk of getting trapped in local optima. Summary of the Invention

[0004] In view of the above problems, this invention proposes a marine oil spill detection method and system based on an improved quantum gray wolf optimization algorithm, in an attempt to solve or alleviate the above technical problems.

[0005] According to one aspect of the present invention, a marine oil spill detection method based on an improved quantum gray wolf optimization algorithm is proposed, the method comprising the following steps: S1. Acquire pre-processed images from shipborne radar. S2. Extracting the oil film region of interest from the preprocessed shipborne radar image using a Restricted Boltzmann Machine (RBM) model, including: constructing a RBM model with the number of hidden nodes and the learning rate as the hyperparameters to be optimized; using the Langevin equation evolution algorithm to optimize the hyperparameters to obtain the optimal hyperparameters; extracting hidden layer features of the image using the RBM model with the optimal hyperparameters; performing pixel-level three-class classification based on the hidden layer features of the image using a classifier to obtain the three-class classification results; extracting a binary mask of the oil film region based on the three-class classification results; and obtaining the oil film region of interest based on the binary mask of the oil film region. S3. The quantum-inspired gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film region of interest to obtain the optimal dual-threshold combination; S4. Perform oil film segmentation on the oil film region of interest according to the optimal dual threshold combination to obtain the oil film segmentation result.

[0006] Furthermore, the preprocessed image of the shipborne radar in S1 is the image obtained after preprocessing the shipborne radar image, including: coordinate transformation, detection and suppression of co-channel interference, speckle noise filtering, grayscale correction and contrast enhancement.

[0007] Further, in S2, the Langevin equation evolutionary algorithm is used to optimize the hyperparameters to obtain the optimal hyperparameters, which includes: in each iteration, using the trained Restricted Boltzmann Machine model to extract the hidden features of the training subset and the validation subset, training a KNN classifier using the hidden features of the training subset, and predicting the validation subset; calculating the classification error rate of the validation subset based on the predicted label and the prior class label; using the classification error rate of the validation subset as the fitness value corresponding to the candidate hyperparameter combination in each iteration, and using this fitness value to guide the Langevin equation evolutionary algorithm to update the population; until the maximum number of iterations is reached, the position of the individual with the smallest fitness value is output as the optimal hyperparameter; wherein, the classification error rate of the validation subset is: ; This indicates the number of samples in the validation subset. Indicates the validation subset number Predicted label for each sample, Indicates the validation subset number The prior class labels of each sample. This is an indicator function.

[0008] Furthermore, in S2, during the optimization of the hyperparameters to be optimized using the Langevin equation evolution algorithm, the K-Means clustering algorithm is used in advance to cluster all pixels and generate prior category labels.

[0009] Furthermore, in S2, the three-classification results include oil film areas, sea surface background, and other types.

[0010] Further, in S2, extracting the binary mask of the oil film region based on the three-classification result, and obtaining the oil film region of interest based on the binary mask of the oil film region includes: extracting the binary mask corresponding to the oil film region to separate the oil film target from the background; removing waveless areas at the top of the image that are unrelated to the oil film target by spatial cropping; removing discrete noise points with an area smaller than a preset lower limit by combining area threshold filtering; performing pixel-level multiplication and superposition of the optimized binary mask and the preprocessed image; and assigning white to the background region to obtain the oil film region of interest.

[0011] Furthermore, in S3, the quantum-heuristic gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film region of interest, including: dividing the pixels of the oil film region of interest into the darkest, intermediate, and brightest classes using three-class Otsu segmentation; using the maximization of the inter-class variance of the three classes of Otsu as the segmentation criterion, and using the negative inter-class variance as the objective function; determining the optimal position of the quantum mean based on the positions of the three best individuals in the current population, and performing a quantum search based on the optimal position of the quantum mean, the quantum step size decay factor, and the random direction factor to obtain the quantum search position; fusing the standard gray wolf optimization update result with the quantum search position to obtain a new position; iterating until the maximum number of iterations is reached to obtain the optimal dual-threshold combination.

[0012] Furthermore, in S3, the negative inter-class variance is used as the objective function: ; in, For the three-class Otsu's inter-class variance, ; , , This indicates the proportion of the three types of pixels; , , This represents the average grayscale value of the three pixel classes; This represents the average grayscale value of all valid pixels; This indicates the dual thresholds to be optimized.

[0013] Further, in S4, the oil film segmentation of the region of interest is performed according to the optimal dual threshold combination to obtain the oil film segmentation result, which includes: performing oil film segmentation according to the optimal dual threshold combination, retaining the darkest category as the oil film target, and removing speckle noise from the segmentation result to obtain the final oil film segmentation result.

[0014] According to another aspect of the present invention, a marine oil spill detection system based on an improved quantum gray wolf optimization algorithm is proposed. The system is used to implement the aforementioned marine oil spill detection method based on the improved quantum gray wolf optimization algorithm; the system includes: Image acquisition module, used to acquire pre-processed images from shipborne radar; The oil film region of interest extraction module is used to extract the oil film region of interest in the preprocessed image of the shipborne radar using a restricted Boltzmann machine model. This includes: constructing a restricted Boltzmann machine model with the number of hidden nodes and the learning rate as hyperparameters to be optimized; using the Langevin equation evolutionary algorithm to optimize the hyperparameters to obtain the optimal hyperparameters; extracting hidden layer features of the image using the restricted Boltzmann machine model with the optimal hyperparameters; performing pixel-level three-class classification based on the hidden layer features to obtain the three-class classification result; extracting a binary mask of the oil film region based on the three-class classification result; and obtaining the oil film region of interest based on the binary mask of the oil film region. The dual-threshold optimization module is used to perform dual-threshold optimization on the oil film interest region using the quantum-inspired gray wolf optimization algorithm to obtain the optimal dual-threshold combination; The oil film segmentation module is used to segment the oil film region of interest according to the optimal dual threshold combination to obtain the oil film segmentation result.

[0015] The beneficial technical effects of this invention are: This invention proposes a marine oil spill detection method and system based on an improved quantum grey wolf optimization algorithm. Compared with existing technologies, this invention uses the Lang Evin Equation Evolutionary Algorithm (LEE) to automatically optimize the hyperparameters of the Raw Material Model (RBM)—the number of hidden nodes and the learning rate—to verify the fitness of the subset classification error rate, avoiding the blindness of manual parameter tuning and improving the pixel-level three-class classification accuracy and the extraction effect of the region of interest (ROI) of the oil slick image. Furthermore, it employs the Quantum-inspired Grey Wolf Optimizer (QGWO) algorithm for three-class Otsu segmentation of the RBI, using dual-threshold optimization. This algorithm can quickly and stably search for the optimal dual-threshold combination that maximizes the inter-class variance, improving the completeness and efficiency of fine segmentation of the oil slick. This invention provides intuitive decision-making basis for command and dispatch, oil boom deployment, and cleanup vessel dispatch in oil spill emergency response. Attached Figure Description

[0016] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein: Figure 1 A flowchart illustrating the marine oil spill detection method based on the improved quantum gray wolf optimization algorithm provided in this embodiment of the invention; Figure 2 A schematic diagram of a shipborne radar preprocessed image provided in an embodiment of the present invention; Figure 3This is a schematic diagram of the process of extracting the region of interest of oil film using the LEE-RBM model according to an embodiment of the present invention; wherein, (a) is a schematic diagram of pixel-level three-classification results, (b) is a schematic diagram of the binary mask of the oil film region, (c) is a schematic diagram after spatial clipping and area threshold filtering, and (d) is a schematic diagram of the region of interest of oil film. Figure 4 A schematic diagram of the convergence curve of the quantum-heuristic gray wolf optimization algorithm provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the result of oil film segmentation based on the optimal dual threshold combination provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the final oil film segmentation result after removing speckle noise, provided in an embodiment of the present invention. Figure 7 This is a schematic diagram of color mapping overlay of oil film segmentation results provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the polar coordinate plotting of the oil film segmentation results provided in an embodiment of the present invention. Detailed Implementation

[0017] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0018] This invention proposes a marine oil spill detection method based on an improved quantum gray wolf optimization algorithm, such as... Figure 1 As shown, the method includes the following steps: S1. Acquire pre-processed images from shipborne radar. S2. Extracting oil film regions of interest from images using a Restricted Boltzmann Machine (RBM) model, including: constructing a RBM model with the number of hidden nodes and learning rate as hyperparameters to be optimized; using the Langevin equation evolution algorithm to optimize the hyperparameters; extracting hidden layer features of the image using the RBM model with the optimal hyperparameters; and then using a classifier to perform pixel-level three-class classification based on these features; and finally extracting a binary mask of the oil film region based on the three-class classification results to obtain the oil film regions of interest. S3. The quantum-inspired gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film interest region to obtain the optimal dual-threshold combination; S4. Perform oil film segmentation on the region of interest based on the optimal dual threshold combination to obtain the oil film segmentation result.

[0019] The method begins with S1. In S1, preprocessed images from the shipborne radar are acquired.

[0020] According to an embodiment of the present invention, the preprocessed image of the shipborne radar is an image obtained after preprocessing the shipborne radar image. The preprocessing includes: coordinate transformation, detection and suppression of co-channel interference, speckle noise filtering, grayscale correction, and contrast enhancement. Specifically, firstly, the original radar image data in the polar coordinate system is transformed to the Cartesian coordinate system to achieve spatial structure standardization. On this basis, convolution calculation is performed to initially enhance high-frequency features; co-channel interference is extracted using a grayscale threshold of 150 and suppressed using mean filtering. Subsequently, a grayscale threshold of 120 is set to extract bright pixels, and bright connected regions with an area of ​​less than 200 pixels are further identified in the upper 2 / 3 of the image area as speckle noise for filtering, and discrete noise is further eliminated by combining 20×20 window midpoint filtering. To further improve image quality, the global grayscale distribution is optimized overall by a grayscale adjustment matrix, and local contrast enhancement is performed in the approximate rectangular area of ​​the oil film target.

[0021] The acquired preprocessed images from the shipborne radar are as follows: Figure 2 As shown, this image reflects the echo intensity distribution of different targets within the radar detection range, and serves as the foundational data for subsequent target detection and identification.

[0022] Then, in S2, the oil film region of interest in the image is extracted using a restricted Boltzmann machine model.

[0023] According to an embodiment of the present invention, the Restricted Boltzmann Machine (RBM) model is an energy-based generative stochastic neural network, consisting of visible layer state vectors. and hidden state vector The structure consists of no connections within a layer and full connections between layers. Represents the real number space. Sets the number of visible layer units. (The input is a 3D vector obtained by pseudo-three-channel expansion of a normalized grayscale image), the number of hidden nodes is the same as the number of hidden layer units. The energy function is determined by the LEE algorithm in the range [5,40]. Defined as: (1) in, For connecting the weight matrix; The visible layer bias vector; This is the hidden layer bias vector.

[0024] Given the visible layer state v Under the conditions, the first z Hidden layer units Activated ( The probability of (=1) for: (2) in, Use the Sigmoid activation function; For the visible layer u The unit and the hidden layer z The connection weights of each unit; For the first z Bias terms for each hidden unit; For the visible layer u The state of each unit.

[0025] Similarly, the visible layer reconstruction probability is: (3) in, For the visible layer u The bias term of each unit; Indicates the visible layer number. u One unit was activated.

[0026] The Lang Evin Equation Evolutionary Algorithm (LEE) is an intelligent optimization algorithm that combines random perturbation and directional drift. Drawing inspiration from Lang Evin dynamics, this algorithm optimizes parameters through differential perturbations among individuals in the population, guidance from the optimal individual, and a temperature decay mechanism. Compared to algorithms that rely solely on deterministic search, the LEE algorithm maintains strong stochastic exploration capabilities in the early stages of the search and gradually enhances its ability to converge towards the optimal solution in the later stages.

[0027] Therefore, this invention utilizes the LEE algorithm to optimize the key hyperparameters of the RBM model—the number of hidden nodes and the learning rate. Since the number of hidden nodes and the learning rate of the RBM model directly affect its feature extraction capability, these two parameters are selected as the optimization targets of the LEE algorithm.

[0028] Let the first The position vector of each individual for: (4) in, This indicates the number of hidden nodes in the RBM model, set... The search range is [5,40]; This represents the learning rate of the RBM model; setting the learning rate. The search range is [0.001, 0.1]; the optimization dimension of LEE is 2, which corresponds to the two parameters of the number of hidden nodes and the learning rate, respectively.

[0029] During the initialization phase, the LEE algorithm randomly generates population individuals within a given parameter range. Its initialization formula is as follows: It can be represented as: (5) in, and These represent the lower and upper bounds of the search space, respectively. It is a random number within the interval [0,1].

[0030] During the iteration process, the LEE algorithm uses a decay factor. Control the search step size and decay factor The expression is: (6) in, Indicates the current iteration number; This represents the maximum number of iterations. As the number of iterations increases, By gradually reducing the size, the algorithm gradually shifts from a large-scale search in the early stages to a localized, refined search in the later stages.

[0031] Meanwhile, the algorithm incorporates a temperature decay mechanism to control the intensity of random perturbations. The temperature factor gradually decreases with each iteration, causing the random perturbations to be stronger in the early stages and gradually weaken in the later stages. (Temperature factor) The expression is: (7) When the algorithm is in the random diffusion search state, individuals update their positions through differential perturbation and random noise, and the updated candidate individual positions... The expression is: (8) in, Indicates the first The current location of each individual; and This represents two individuals randomly selected from the population; Indicates the search control factor; Indicates the temperature factor; This represents a random perturbation term that follows a normal distribution. This update method enhances the randomness of the population search and avoids prematurely getting trapped in local optima.

[0032] When the algorithm is in the optimal guided search state, individuals perform drift updates under the guidance of the current optimal solution, and the updated candidate individual positions... The expression is: (9) in, This indicates the position of the best individual in the current population; and This represents two randomly selected individuals; for Random numbers within the interval. This formula allows individuals to approach the current optimal solution while still retaining a certain degree of differential perturbation capability.

[0033] Subsequently, the algorithm calculates the fitness value corresponding to the new individual and updates the population using a greedy selection strategy. If the fitness value of the new position is better than that of the original position, the new position is accepted; otherwise, the original position is retained. Since the fitness function in this embodiment is the classification error rate, the smaller the fitness value, the better the classification performance corresponding to that set of RBM hyperparameters.

[0034] Based on the optimal hyperparameters, this embodiment uses the contrastive divergence method to train the RBM model and obtain the optimal weights. and hidden layer bias By inputting the preprocessed image into the trained RBM model, hidden layer features can be extracted. Each row of the hidden layer features corresponds to the hidden layer state vector of one pixel sample. Its expression is: (10) in, This represents the input pixel sample matrix, where each row corresponds to the visible layer state vector of one pixel sample. Subsequently, a KNN classifier was trained using the hidden layer features to classify the pixels in the entire image.

[0035] The LEE algorithm continuously updates candidate parameter combinations through random diffusion, optimal guidance, temperature decay, and greedy selection mechanisms, enabling the RBM model to obtain more suitable structural and training parameters. After optimizing the number of hidden nodes and the learning rate through the LEE algorithm, the RBM model can be trained under better parameter conditions, thereby extracting features that are more conducive to pixel classification and providing an input basis for subsequent KNN classification.

[0036] To evaluate the performance of a set of RBM model hyperparameters, this embodiment constructs a fitness evaluation function based on the classification error rate of the validation subset. During the fitness evaluation process, the training samples are first divided into a training subset and a validation subset. 5% of pixels are randomly selected from the entire image as the training set for LEE optimization; 80% of the sample pixels in the training set are used as the training subset to train the RBM model and the KNN classifier; and 20% of the sample pixels in the training set are used as the validation subset to evaluate fitness.

[0037] For a given combination of candidate parameters First, an RBM model is trained using a training subset. Then, the hidden features of both the training and validation subsets are extracted using the trained RBM model. Next, a KNN classifier is trained using the hidden features of the training subset and used to predict the validation subset samples. The classification error rate is... It can be represented as: (11) in, Indicates the number of samples in the validation subset; Indicates the validation subset number Predicted labels for each sample; Indicates the validation subset number Prior class labels for each sample; This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.

[0038] Since a lower classification error rate indicates better feature extraction performance corresponding to the hyperparameters of the RBM model, the classification error rate is used as the fitness function of the LEE algorithm, and its expression is... for: (12) If a set of parameters exhibits anomalies during training or classification, that parameter combination is considered an invalid solution and assigned a larger penalty fitness value. This penalty mechanism prevents the LEE algorithm from selecting parameter combinations that cannot be properly trained or classified.

[0039] The LEE algorithm establishes a connection between candidate hyperparameters, RBM feature extraction, KNN validation classification, and error rate evaluation in the fitness evaluation function of the RBM model. By continuously minimizing the classification error rate of the validation subset, the LEE algorithm searches for a better number of hidden nodes and a higher learning rate, enabling the RBM model to obtain feature representation capabilities more suitable for the current image data.

[0040] In summary, although the enhanced images obtained through preprocessing have significantly improved visual quality, the oil film target still needs to be accurately separated from the sea surface background to support subsequent quantitative analysis requirements such as area calculation and morphological parameter extraction. Therefore, the LEE-RBM model is used to perform pixel-level three-class classification on the preprocessed data, as follows: Figure 3As shown in the diagram. First, the K-Means clustering algorithm is introduced to generate prior class labels, providing training priors for subsequent supervised classification. Then, the LEE algorithm is used to jointly optimize the number of hidden nodes and the learning rate of the RBM model. The optimal number of hidden nodes is 8, the optimal learning rate is 0.091, and the final number of iterations for training the RBM is 30. The optimal hyperparameter combination is determined with the goal of minimizing the classification error rate of the validation subset, effectively avoiding the blindness of manual parameter tuning. Next, the optimized RBM model is used to perform nonlinear feature extraction on the preprocessed image, mapping the original three-dimensional pixel space to a low-dimensional feature subspace, highlighting the essential structural differences between the oil film and the background. Subsequently, in the hidden feature space, a KNN classifier is used to complete pixel-level class determination, outputting the three-class classification results as shown in the diagram. Figure 3 As shown in (a), the oil film area, sea surface background, and other types are marked with different color levels, clearly presenting the spatial distribution and morphological structure of the target area. Further extraction of the binary mask corresponding to the oil film area is used to separate the oil film target from the background, as shown in (a). Figure 3 As shown in (b), spatial cropping is used to remove waveless regions at the top of the image that are unrelated to the oil film target. Furthermore, area threshold filtering is used to remove discrete noise points with areas smaller than a preset lower limit, effectively eliminating residual isolated misclassified units in the classification results, such as... Figure 3 As shown in (c), to simultaneously present the target's spatial location and its original radiation information, the optimized binary mask and the preprocessed image are superimposed using pixel-level multiplication; finally, the background area is assigned white to obtain the oil film region of interest (ROI), as shown in (c). Figure 3 As shown in (d).

[0041] Then, in S3, the quantum-inspired gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film region of interest to obtain the optimal dual-threshold combination.

[0042] According to an embodiment of the present invention, when performing three-class classification of the oil film region of interest, the three-class classification Otsu segmentation (maximum inter-class variance threshold segmentation method) is adopted, which requires two thresholds. The quantum heuristic gray wolf optimization algorithm is used to optimize the dual thresholds of the oil film region of interest to obtain the optimal dual threshold combination. Specifically, the pixels of the oil film region of interest are divided into the following three categories: darkest class, intermediate class, and brightest class.

[0043] The Quantum-inspired Grey Wolf Optimizer (QGWO) is an improved algorithm based on the classical Grey Wolf Optimizer (GWO) by introducing quantum behavioral mechanisms. The classical GWO simulates the social hierarchy and hunting behavior of a grey wolf pack, guiding population convergence through the cooperation of three alpha wolves. However, in high-dimensional or unimodal search spaces, the position update step size of the standard GWO gradually decreases with each iteration, easily leading to local optima. The QGWO algorithm introduces a quantum potential well model with each position update, enabling particles to escape local constraints in a nondeterministic manner, significantly enhancing the algorithm's global search capability.

[0044] In this embodiment, the QGWO algorithm is used to search for two optimal thresholds in the three-class Otsu segmentation. Let the threshold vector to be optimized be... for: (13) in, and These represent the two candidate thresholds corresponding to the i-th individual. This represents the position of an individual in the search space, and also represents a set of dual thresholds to be optimized. The QGWO algorithm first randomly generates initial population positions within the effective pixel grayscale range.

[0045] Three-class Otsu inter-class variance It can be represented as: (14) in, , , This indicates the proportion of the three types of pixels; , , This represents the average grayscale value of the three pixel classes; This represents the average grayscale value of all valid pixels. A larger inter-class variance indicates a more significant difference in grayscale values ​​among the three classes of pixels, resulting in better threshold segmentation. Valid pixels are non-background pixels within the oil film's region of interest with a grayscale value not equal to 255.

[0046] Since the QGWO algorithm uses a minimization approach for optimization, it takes the negative between-class variance as the objective function, and minimizing the fitness function is equivalent to maximizing the between-class variance.

[0047] The fitness function is expressed as follows: (15) In each iteration, the QGWO algorithm selects the three best individuals in the current population based on the objective function value, denoted as follows: , and Their positions are respectively , and Convergence factor in the algorithm Attenuation factor in LEE algorithm The calculation method is the same.

[0048] For any individual position ,Towards New positional components learned by wolves for: (16) in, and The coefficient vector is generated from random numbers and convergence factors, and is calculated as follows: (17) (18) in, and A random number in the range [0, 1]. The same method can be used to obtain... and , respectively representing by wolves and The positional component obtained by the wolf's guidance.

[0049] Position update results of the standard GWO part It can be represented as: (19) To enhance the algorithm's global search capability, the QGWO algorithm introduces the quantum mean optimal position, whose expression is... for: (20) The quantum mean optimal position integrates information from three leader individuals and can provide a reference center for quantum search.

[0050] Quantum search step size It can be represented as: (twenty one) in, Indicates a random direction factor; Indicates the quantum step size decay factor; for Random numbers within the interval. This formula enhances the randomness of the search by using a logarithmic substep size, which helps improve the algorithm's ability to escape local optima.

[0051] Quantum step size decay factor It can be represented as: (twenty two) As the iterations proceed, the quantum search step size gradually decreases, causing the algorithm to be more exploratory in the early stages and more convergent in the later stages.

[0052] Finally, the QGWO algorithm merges the standard GWO update result and the quantum-inspired update result to obtain its new position expression. for: (twenty three) in, This indicates the position obtained through quantum search; This indicates the position obtained from a standard GWO search; This indicates the fusion weight.

[0053] The fusion weights change with the number of iterations, and their expression is as follows: for: (twenty four) Among them, the early stage of iteration The algorithm is relatively large and leans more towards quantum random exploration; in the later stages of iteration... As the number of wolves gradually decreases, the algorithm tends to converge more steadily under the guidance of the GWO (Golden Wolf) leader.

[0054] The QGWO algorithm uses the three-class Otsu variance as the evaluation metric and continuously searches for the optimal dual thresholds through a gray wolf leadership mechanism, quantum mean optimal guidance, and logarithmic quantum step size updates. This algorithm can find the threshold combination that maximizes the inter-class difference within the effective pixel grayscale range, thereby achieving three-class classification of the ROI region.

[0055] In summary, considering the grayscale differences within the oil film region, single threshold segmentation is insufficient to fully characterize the target boundary. Therefore, the QGWO algorithm is introduced for dual-threshold optimization. This algorithm integrates the leader hierarchy update mechanism of the Gray Wolf optimization algorithm with a quantum heuristic search strategy, enabling stable searching for the optimal dual-threshold combination that maximizes the inter-class variance of the three classes. The QGWO algorithm divides non-background pixels into three levels based on grayscale differences. The number of wolves is set to 20, the maximum number of iterations is 50, and the convergence curve is shown below. Figure 4 As shown in the figure, the convergence curve of the QGWO algorithm is very steep in the initial stage, almost vertically descending. The algorithm has a very strong global search or development capability in the initial stage, and can quickly converge to the optimal solution, getting rid of the poor state of the initial random solution. The curve becomes completely horizontal around the 6th iteration, indicating that the QGWO algorithm can lock the globally optimal double threshold combination with extremely fast search efficiency. No oscillation or divergence occurs in the entire optimization process, which fully verifies the high efficiency and good stability of the algorithm in the double threshold optimization problem of oil film image. The thresholds T1=47 and T2=73 are obtained.

[0056] Then, in S4, oil film segmentation is performed based on the optimal combination of dual thresholds to obtain the oil film segmentation result.

[0057] According to an embodiment of the present invention, oil film segmentation is performed based on the optimal dual threshold combination T1 and T2, and the result is as follows: Figure 5 As shown. The darkest category is retained as the oil film target, and speckle noise is removed to obtain the final oil film segmentation result, as shown. Figure 6 As shown. Further, the final oil film segmentation result image is color-mapped and overlaid, as shown... Figure 7 As shown.

[0058] To further reveal the true spatial distribution of the oil film target, the final oil film segmentation result image is inversely transformed from Cartesian coordinates to polar coordinates for plotting, such as... Figure 8 As shown in the diagram, the polar coordinate display allows operators to directly see the target's location, which is instructive for decision-making in oil spill emergency response, including command and dispatch, deployment of oil booms, and dispatch of cleanup vessels.

[0059] This invention also proposes a marine oil spill detection system based on an improved quantum gray wolf optimization algorithm. This system is used to implement the marine oil spill detection method based on the improved quantum gray wolf optimization algorithm described in the above embodiments. The system includes: Image acquisition module, used to acquire pre-processed images from shipborne radar; The oil film region of interest extraction module is used to extract oil film regions of interest from preprocessed images of shipborne radar using a restricted Boltzmann machine (RBM) model. Specifically, a RBM model is constructed with the number of hidden nodes and the learning rate as the hyperparameters to be optimized. The Langevin equation evolutionary algorithm is used to optimize the hyperparameters to obtain the optimal parameters. The RBM model with the optimal hyperparameters is used to extract hidden layer features from the image. Based on these features, a classifier is used to perform pixel-level three-class classification to obtain the three-class classification results. A binary mask of the oil film region is extracted based on the three-class classification results, and the oil film region of interest is obtained from the binary mask. The dual-threshold optimization module is used to perform dual-threshold optimization on the oil film interest region using the quantum-inspired gray wolf optimization algorithm to obtain the optimal dual-threshold combination; The oil film segmentation module is used to segment the oil film region of interest based on the optimal combination of dual thresholds to obtain the oil film segmentation result.

[0060] It should be noted that the functions of the marine oil spill detection system based on the improved quantum gray wolf optimization algorithm described in the embodiments of the present invention can be explained by the aforementioned marine oil spill detection method based on the improved quantum gray wolf optimization algorithm. Therefore, for the parts not described in detail in the system embodiments, please refer to the above method embodiments, and they will not be repeated here.

[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A marine oil spill detection method based on an improved quantum gray wolf optimization algorithm, characterized in that, Includes the following steps: S1. Acquire pre-processed images from shipborne radar. S2. Extracting the oil film region of interest from the preprocessed shipborne radar image using a Restricted Boltzmann Machine (RBM) model, including: constructing a RBM model with the number of hidden nodes and the learning rate as the hyperparameters to be optimized; using the Langevin equation evolution algorithm to optimize the hyperparameters to obtain the optimal hyperparameters; extracting hidden layer features of the image using the RBM model with the optimal hyperparameters; performing pixel-level three-class classification based on the hidden layer features of the image using a classifier to obtain the three-class classification results; extracting a binary mask of the oil film region based on the three-class classification results; and obtaining the oil film region of interest based on the binary mask of the oil film region. S3. The quantum-inspired gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film region of interest to obtain the optimal dual-threshold combination; S4. Perform oil film segmentation on the oil film region of interest according to the optimal dual threshold combination to obtain the oil film segmentation result.

2. The method according to claim 1, characterized in that, The preprocessed image of the shipborne radar in S1 is the image obtained after preprocessing the shipborne radar image, including: coordinate transformation, detection and suppression of co-channel interference, speckle noise filtering, grayscale correction and contrast enhancement.

3. The method according to claim 1, characterized in that, In S2, the Langevin Equation Evolutionary Algorithm is used to optimize the hyperparameters to obtain the optimal hyperparameters. This involves: in each iteration, extracting hidden features from the training and validation subsets using the trained Restricted Boltzmann Machine (RBM) model; training a KNN classifier using the hidden features of the training subset; predicting the validation subset; calculating the validation subset classification error rate based on the predicted label and prior class label; using the validation subset classification error rate as the fitness value corresponding to the candidate hyperparameter combination in each iteration; and using this fitness value to guide the Langevin Equation Evolutionary Algorithm to update the population; until the maximum number of iterations is reached, outputting the position of the individual with the smallest fitness value as the optimal hyperparameter; wherein, the validation subset classification error rate is: ; This indicates the number of samples in the validation subset. Indicates the validation subset number Predicted label for each sample, Indicates the validation subset number The prior class labels of each sample. This is an indicator function.

4. The method according to claim 3, characterized in that, In S2, during the process of optimizing the hyperparameters using the Langevin equation evolution algorithm, the K-Means clustering algorithm is used in advance to cluster all pixels and generate prior category labels.

5. The method according to claim 1, characterized in that, In S2, the three-classification results include oil film areas, sea surface background, and other types.

6. The method according to claim 5, characterized in that, In S2, extracting a binary mask for the oil film region based on the three-classification results, and obtaining the oil film region of interest based on the binary mask includes: extracting the binary mask corresponding to the oil film region to separate the oil film target from the background; removing waveless areas at the top of the image that are unrelated to the oil film target by spatial cropping; removing discrete noise points with an area smaller than a preset lower limit by combining area threshold filtering; performing pixel-level multiplication and superposition of the optimized binary mask and the preprocessed image; and assigning white to the background region to obtain the oil film region of interest.

7. The method according to claim 1, characterized in that, In S3, the quantum-heuristic gray wolf optimization algorithm is used to perform dual-threshold optimization on the oil film region of interest, including: dividing the pixels of the oil film region of interest into the darkest, intermediate, and brightest classes using three-class Otsu segmentation; using the maximization of the inter-class variance of the three classes as the segmentation criterion and the negative inter-class variance as the objective function; determining the optimal position of the quantum mean based on the positions of the three best individuals in the current population, and performing a quantum search based on the optimal position of the quantum mean, the quantum step size decay factor, and the random direction factor to obtain the quantum search position; fusing the standard gray wolf optimization update result with the quantum search position to obtain a new position; iterating until the maximum number of iterations is reached to obtain the optimal dual-threshold combination.

8. The method according to claim 7, characterized in that, In S3, the negative inter-class variance is used as the objective function: ; in, For the three-class Otsu's inter-class variance, ; , , This indicates the proportion of the three types of pixels; , , This represents the average grayscale value of the three pixel classes; This represents the average grayscale value of all valid pixels; This indicates the dual thresholds to be optimized.

9. The method according to claim 1, characterized in that, In S4, the oil film segmentation of the region of interest is performed according to the optimal dual threshold combination to obtain the oil film segmentation result, which includes: performing oil film segmentation according to the optimal dual threshold combination, retaining the darkest category as the oil film target, and removing speckle noise from the segmentation result to obtain the final oil film segmentation result.

10. A marine oil spill detection system based on an improved quantum gray wolf optimization algorithm, characterized in that, The system is used to implement the marine oil spill detection method based on the improved quantum gray wolf optimization algorithm as described in any one of claims 1-9; the system includes: Image acquisition module, used to acquire pre-processed images from shipborne radar; The oil film region of interest extraction module is used to extract the oil film region of interest in the preprocessed image of the shipborne radar using a restricted Boltzmann machine model. This includes: constructing a restricted Boltzmann machine model with the number of hidden nodes and the learning rate as hyperparameters to be optimized; using the Langevin equation evolutionary algorithm to optimize the hyperparameters to obtain the optimal hyperparameters; extracting hidden layer features of the image using the restricted Boltzmann machine model with the optimal hyperparameters; performing pixel-level three-class classification based on the hidden layer features to obtain the three-class classification result; extracting a binary mask of the oil film region based on the three-class classification result; and obtaining the oil film region of interest based on the binary mask of the oil film region. The dual-threshold optimization module is used to perform dual-threshold optimization on the oil film interest region using the quantum-inspired gray wolf optimization algorithm to obtain the optimal dual-threshold combination; The oil film segmentation module is used to segment the oil film region of interest according to the optimal dual threshold combination to obtain the oil film segmentation result.