Sea fog monitoring method and device, electronic equipment, storage medium and product
By employing a generative adversarial network training and pixel-by-pixel verification method for sea fog monitoring, the generalization problem of traditional sea fog monitoring models under new sea areas and new sensor data is solved, achieving efficient and accurate sea fog identification that adapts to different environmental conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING TIANXIANG XINYA TECH CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-23
AI Technical Summary
Traditional sea fog monitoring models rely on large-scale labeled sample training, which makes it difficult to generalize performance when in new sea areas or when switching to new sensor data. Furthermore, existing threshold methods lack universality and are difficult to adapt to the unique characteristics of the marine underlying surface and water vapor environment of sea fog.
An unsupervised training method based on generative adversarial networks is adopted, which combines generative adversarial networks with generative adversarial networks. The core pixels of sea fog are initially screened by a classifier, and the sea fog judgment rules are verified pixel by pixel by a queue or stack mechanism. The method dynamically adapts to different fog concentrations and lighting conditions to reduce the risk of misidentification.
It improves the cross-scenario universality and recognition accuracy of sea fog monitoring, reduces the dependence on labeled data, enhances the ability to resist interference from complex marine scenes, and balances computational efficiency and recognition accuracy.
Smart Images

Figure CN122265859A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a sea fog monitoring method, device, electronic device, storage medium and product. Background Technology
[0002] The field of sea fog remote sensing monitoring has long faced technical bottlenecks: traditional supervised sea fog monitoring models rely heavily on large-scale labeled sample training, and the discrimination patterns they learn are easily constrained by specific domain features. When the application scenario is expanded to new sea areas or switched to new sensor data, the model's generalization performance will drop sharply, making it difficult to meet actual monitoring needs.
[0003] In the practice of satellite remote sensing monitoring of sea fog during the day, the threshold method is the most widely used traditional technical approach. There are three main methods: First, the multi-channel threshold method based on spectral analysis, which involves sampling and analyzing the radiation data from each satellite channel, or simulating the spectral radiation differences between clouds / fog and other ground features using radiative transfer modes, to determine the channel threshold combinations that distinguish sea fog. Second, the fractal dimension threshold method based on image texture, which uses fractal dimension analysis techniques such as differential box dimension and box-counting dimension to capture the texture differences between sea fog and non-fog targets, and extracts fog area information by setting dimension thresholds. Third, the multi-parameter fusion threshold method, which integrates multi-dimensional information such as spectral features, structural features, and fractal features to construct composite thresholds for sea fog identification. However, existing threshold methods have significant technical limitations: on the one hand, the thresholds they determine are mostly derived from case analyses of specific times and regions, lacking universality, and are prone to failure due to feature shift when facing cross-domain scenarios, making them difficult to promote and apply; on the other hand, most related studies focus on the monitoring of land fog, and research on the adaptability of sea fog to the unique characteristics of the marine underlying surface and water vapor environment is relatively scarce, further limiting the application effect of traditional threshold methods in sea fog monitoring. Summary of the Invention
[0004] Therefore, it is necessary to provide a sea fog monitoring method, device, electronic equipment, storage medium, and product to address the aforementioned technical problems.
[0005] In a first aspect, this application provides a method for monitoring sea fog, the method comprising: Acquire image data of the target region to be identified; The image data is input into a classifier to obtain candidate results for sea fog identification; Based on the sea fog identification candidate results, the core pixels of sea fog and the sea fog determination rules are determined; Starting from the core pixel of the sea fog, each adjacent pixel is checked to see if it meets the sea fog determination rule until all pixels in the image data are traversed to obtain the target result of sea fog identification.
[0006] In one embodiment, determining the core pixels of the sea fog and the sea fog determination rules based on the sea fog identification candidate results includes: Target pixels that match the core features of sea fog are selected from the sea fog recognition results as the core sea fog pixels; Based on the core features of the sea fog and the core pixels of the sea fog, the sea fog determination rule is determined; wherein, the sea fog determination rule includes a similarity rule and a boundary stopping rule.
[0007] In one embodiment, the step of determining whether adjacent pixels satisfy the sea fog determination rule, starting from the core pixel of the sea fog, includes: By combining a queue mechanism or a stack mechanism, starting from the starting point, we can determine whether each of the adjacent pixels satisfies the similarity rule; If the similarity rule is satisfied, the pixel is marked as sea fog; if the similarity rule is not satisfied or the boundary stopping rule is satisfied, the pixel is marked as non-sea fog and the sea fog determination process for the adjacent pixels of the pixel is stopped.
[0008] In one embodiment, the classifier is trained in the following ways: Obtain source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results; The source domain data is divided into a training set and a validation set, and the target domain data is determined to be an unsupervised training set. Using the training set and the unsupervised training set, and in conjunction with a generative adversarial network, an initial feature extractor and an initial classifier are trained to obtain the feature extractor and the classifier.
[0009] In one embodiment, the step of training an initial feature extractor and an initial classifier using the training set and the unsupervised training set, combined with a generative adversarial network, to obtain the feature extractor and the classifier includes: The initial feature extractor and initial classifier are pre-trained using the training set to obtain the candidate feature extractor and candidate classifier; The generative adversarial network is constructed by combining the initial domain discriminator to train the candidate feature extractor, thereby obtaining the alternative feature extractor and the alternative domain discriminator; The candidate feature extractor, the candidate domain discriminator, and the candidate classifier are trained using the training set and the unsupervised training set. The classifier and the feature extractor are obtained by combining the target domain entropy minimization loss.
[0010] In one embodiment, acquiring source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results includes: Obtain the first data of labeled sea fog identification results and the second data of unlabeled sea fog identification results; The first data and the second data are preprocessed according to standard methods to obtain the first candidate data and the second candidate data. Perform data augmentation operations on the first candidate data and the second candidate data to obtain the source domain data and the target domain data.
[0011] Secondly, this application also provides a sea fog monitoring device, the device comprising: The acquisition module is used to acquire image data of the target area to be identified; The first recognition module is used to input the image data into a classifier to obtain sea fog recognition candidate results; The determination module is used to determine the core pixels of sea fog and the sea fog determination rules based on the sea fog identification candidate results; The second recognition module is used to determine whether adjacent pixels meet the sea fog determination rules one by one, starting from the core pixel of the sea fog, until all pixels in the image data are traversed to obtain the sea fog recognition target result.
[0012] Thirdly, this application also provides an electronic device, including a processor and a memory; wherein the memory is used to store a computer program; and the processor is configured to, when executing the computer program, implement the steps of the method described in any embodiment of this application.
[0013] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any embodiment of this application.
[0014] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method described in any embodiment of this application.
[0015] In the aforementioned sea fog monitoring method, the core pixels of sea fog are determined based on the candidate results output by the classifier, ensuring the accuracy of seed points from the source and reducing the risk of misidentification by mistaking interference such as clouds and sea surface reflections as growth starting points. Simultaneously, the sea fog judgment rules are dynamically customized based on the sea fog identification candidate results, rather than a fixed threshold, allowing for flexible adaptation to sea fog characteristics under different fog concentrations, lighting conditions, and sensor conditions, thus improving cross-scene universality. Pixel-by-pixel verification, gradually expanding from the core pixels, naturally aligns with the continuous distribution characteristics of sea fog, reducing the fragmentation of complete fog areas, and accurately depicting gradient edges, making it more consistent with the true shape of fog areas than the threshold method. First, the candidate range is quickly narrowed down using a classifier, and then growth verification is performed focusing on key areas, balancing computational efficiency and recognition accuracy. This reduces invalid computation while compensating for local biases in the classifier and the susceptibility of single seed growth to noise interference. Furthermore, the initial screening by the classifier can eliminate areas with strong interference, and the growth rules further distinguish sea fog from interference through multi-dimensional feature verification, demonstrating strong resistance to interference in complex marine scenes and adaptability to unsupervised / semi-supervised scenarios, reducing reliance on labeled data. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a sea fog monitoring method according to an exemplary embodiment; Figure 2 This is a schematic diagram illustrating candidate results for sea fog identification according to an exemplary embodiment; Figure 3 This is a schematic diagram illustrating the result of target identification in sea fog according to an exemplary embodiment; Figure 4 This is a structural block diagram of a sea fog monitoring device according to an exemplary embodiment; Figure 5 This is an internal structural diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0018] The terms "first," "second," and "third" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.
[0019] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0020] In some embodiments, the sea fog monitoring method provided in this application can be applied to electronic devices or cloud servers. The electronic device can be any mobile terminal or fixed terminal. The terminal can be a device that provides voice and / or data connectivity to the user. For example, the terminal can be an IoT terminal, such as a sensor device, a mobile phone or so-called "cellular" phone, and a computer with an IoT terminal; for example, it can be a fixed, portable, pocket-sized, handheld, or computer-embedded device. The cloud server can be any virtualized computing resource or physical server cluster. The server can be a platform that provides on-demand, scalable computing, storage, networking, and application services to the user.
[0021] In some embodiments, such as Figure 1 As shown, a method for monitoring sea fog is provided, the method comprising the following steps: S101, acquire image data of the target area to be identified.
[0022] In this embodiment of the application, the image data may include, but is not limited to, satellite remote sensing data, video monitoring data, etc.
[0023] S102, the image data is input into the classifier to obtain sea fog recognition candidate results.
[0024] In this embodiment, the classifier can be a binary classifier used to distinguish between sea fog data and non-fog data. The classifier can learn key features of sea fog such as grayscale, texture, and spectrum by receiving sample data, and output the classification result (i.e., sea fog identification candidate result) of the image data to be identified as belonging to sea fog or non-fog (such as sea surface, clouds, and islands).
[0025] In some embodiments, the classifier may include, but is not limited to, at least one of support vector machines, convolutional neural networks, multilayer perceptrons (MLPs), and lightweight Transformers.
[0026] For example, such as Figure 2 As shown, Figure 2 Example image for identifying candidate results for sea fog.
[0027] S103, Based on the sea fog identification candidate results, determine the core pixels of sea fog and the sea fog determination rules.
[0028] In some embodiments, determining the core pixels of the sea fog and the sea fog determination rules based on the sea fog identification candidate results includes: Target pixels that match the core features of sea fog are selected from the sea fog recognition results as the core sea fog pixels; Based on the core features of the sea fog and the core pixels of the sea fog, the sea fog determination rule is determined; wherein, the sea fog determination rule includes a similarity rule and a boundary stopping rule.
[0029] For example, the core features of sea fog may include, but are not limited to, at least one of brightness features, grayscale features, and texture features.
[0030] In some embodiments, the selection of core pixels for sea fog can be combined with image features of sea fog. For example, in satellite or surveillance images, sea fog typically corresponds to a grayscale range associated with low brightness and high humidity. Electronic devices can identify the probability of sea fog from the sea fog recognition results and determine the core pixels of sea fog by combining the core features of sea fog; or, they can determine candidate sea fog pixels from the candidate sea fog recognition results, and automatically select a set of pixels that meet the threshold conditions of sea fog features from the candidate sea fog recognition results, such as consecutive pixels with grayscale values between 50 and 100, to ensure that the core pixels of sea fog are pure sea fog areas, without interference from clouds, sea surface, land, or other interfering factors.
[0031] In this embodiment of the application, the core of the sea fog determination rule is similarity judgment, which requires that adjacent pixels and the core pixels of sea fog be similar in features.
[0032] For example, similarity rules may include, but are not limited to, at least one of commonly used rules, including grayscale difference threshold, texture consistency, and auxiliary reference features. Specifically, the grayscale difference threshold may be that the grayscale value difference between adjacent pixels and the core pixel of the sea fog does not exceed 5; texture consistency may be that the sea fog texture is uniform and has no obvious edge features; and auxiliary reference features may be sensor indicators such as humidity or visibility.
[0033] For example, the boundary stopping rule can terminate the growth process in that direction when adjacent pixels do not meet the similarity requirement, or when encountering obvious non-sea fog boundaries such as land or thick clouds.
[0034] In some embodiments, the electronic device can extract key features such as grayscale values and texture entropy from sea fog identification candidate results, calculate the mean and standard deviation of each key feature, determine feature similarity thresholds (such as grayscale similarity, texture similarity, auxiliary reference feature similarity, etc.) based on the mean and / or standard deviation, and determine similarity rules based on the key features and feature similarity thresholds.
[0035] In some embodiments, the electronic device can statistically analyze the feature distribution of non-fog target pixels such as land, thick clouds, and sea surface reflection in the sea fog recognition candidate results, and clarify the feature intervals corresponding to each non-fog target (e.g., land grayscale value ≤30 or ≥150, thick cloud grayscale value ≥120, and sea surface reflection has a significantly higher local variance than sea fog); based on the feature intervals of each non-fog target pixel, determine the boundary determination threshold (e.g., grayscale value ≥120 is determined as thick cloud boundary, grayscale value ≤30 is determined as land boundary); if there is a pre-processed semantic mask (e.g., pre-labeled land range), the semantic mask is combined to supplement the boundary determination, and the boundary stopping rule is obtained.
[0036] S104, starting from the core pixel of the sea fog, determine whether each adjacent pixel meets the sea fog determination rule, until all pixels in the image data are traversed to obtain the sea fog identification target result.
[0037] In some embodiments, candidate pixels corresponding to the sea fog identification candidate results are included in a queue or stack. Starting from the sea fog core pixel (i.e., seed point), its neighboring pixels are substituted one by one to determine whether the sea fog determination rule is met. If it is met, it is marked as sea fog and included in the subsequent expansion queue. If it is not met, the growth in this direction is stopped. This process is repeated until all pixels of the image data are traversed. Finally, each pixel is labeled as "sea fog" or "non-sea fog" to complete the full-image pixel-by-pixel identification.
[0038] For example, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the results of the sea fog recognition template.
[0039] In the aforementioned sea fog monitoring method, the core pixels of sea fog are determined based on the candidate results output by the classifier, ensuring the accuracy of seed points from the source and reducing the risk of misidentification by mistaking interference such as clouds and sea surface reflections as growth starting points. Simultaneously, the sea fog judgment rules are dynamically customized based on the sea fog identification candidate results, rather than a fixed threshold, allowing for flexible adaptation to sea fog characteristics under different fog concentrations, lighting conditions, and sensor conditions, thus improving cross-scene universality. Pixel-by-pixel verification, gradually expanding from the core pixels, naturally aligns with the continuous distribution characteristics of sea fog, reducing the fragmentation of complete fog areas, and accurately depicting gradient edges, making it more consistent with the true shape of fog areas than the threshold method. First, the candidate range is quickly narrowed down using a classifier, and then growth verification is performed focusing on key areas, balancing computational efficiency and recognition accuracy. This reduces invalid computation while compensating for local biases in the classifier and the susceptibility of single seed growth to noise interference. Furthermore, the initial screening by the classifier can eliminate areas with strong interference, and the growth rules further distinguish sea fog from interference through multi-dimensional feature verification, demonstrating strong resistance to interference in complex marine scenes and adaptability to unsupervised / semi-supervised scenarios, reducing reliance on labeled data.
[0040] In some embodiments, the step of determining whether adjacent pixels satisfy the sea fog determination rule, starting from the core pixel of the sea fog, includes: By combining a queue mechanism or a stack mechanism, starting from the starting point, we can determine whether each of the adjacent pixels satisfies the similarity rule; If the similarity rule is satisfied, the pixel is marked as sea fog; if the similarity rule is not satisfied or the boundary stopping rule is satisfied, the pixel is marked as non-sea fog and the sea fog determination process for the adjacent pixels of the pixel is stopped.
[0041] In some embodiments, the electronic device can use the core pixel of sea fog as the starting point, add pixels identified as sea fog from the sea fog recognition candidate results to a preset queue mechanism or stack mechanism, and define the traversal range of adjacent pixels (such as the four neighboring regions of top, bottom, left, and right or the eight neighboring regions including diagonal directions); sequentially take out the pixels to be judged from the queue or stack, and check whether each of its adjacent pixels meets the similarity rule in the sea fog determination rule, while checking whether the boundary stop rule is triggered; if the adjacent pixels meet the similarity rule and the boundary stop rule is not triggered, the pixel is marked as sea fog and added to the queue or stack to continue judging its adjacent pixels; if the adjacent pixels do not meet the similarity rule, or trigger the boundary stop rule (such as falling into the non-fog target feature region or encountering the semantic mask boundary), the pixel is marked as non-sea fog and is not included in the subsequent judgment process of adjacent pixels, thereby realizing sea fog recognition that gradually expands from the core pixel to the periphery.
[0042] In this embodiment, the queue or stack mechanism ensures that the traversal process from the core pixel to the periphery proceeds in an orderly manner, avoiding pixel omissions or repeated judgments. Pixel-by-pixel verification, combined with similarity rules and boundary stopping rules, can accurately distinguish between sea fog and non-fog pixels. It fully captures the fog area range through expansion logic when the rules are met, and avoids non-fog areas (such as land and thick clouds) from being mistakenly included through termination logic when the rules are not met, reducing false edge detections. Furthermore, it eliminates the need to include non-fog pixels in subsequent traversal processes, significantly reducing unnecessary computation. While ensuring the accuracy of pixel-by-pixel recognition, it improves the overall recognition efficiency and restores the natural shape of sea fog through orderly expansion, preventing the fog area from being split or broken.
[0043] In some embodiments, the training method of the classifier includes: Obtain source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results; The source domain data is divided into a training set and a validation set, and the target domain data is determined to be an unsupervised training set. Using the training set and the unsupervised training set, and in conjunction with a generative adversarial network, an initial feature extractor and an initial classifier are trained to obtain the feature extractor and the classifier.
[0044] In some embodiments, obtaining source domain data with labeled sea fog identification results and target domain data without labeled sea fog identification results includes: Obtain the first data of labeled sea fog identification results and the second data of unlabeled sea fog identification results; The first data and the second data are preprocessed according to standard methods to obtain the first candidate data and the second candidate data. Perform data augmentation operations on the first candidate data and the second candidate data to obtain the source domain data and the target domain data.
[0045] In some embodiments, the electronic device can acquire first data with labeled sea fog identification results and second data without labels. The first data includes original samples and corresponding fog / non-fog labels (labels are clearly defined, such as 0 for non-fog and 1 for fog). The samples need to cover diverse marine environments such as different time periods, different fog concentrations and humidity, and ensure accurate labeling. The unlabeled second data only contains original samples and needs to be as close as possible to the distribution of the first data, while covering fog / non-fog samples in the target application scenario. The data types need to be adapted and unified. If it is an image sample (such as a fog monitoring map), the size should be unified. If it is sensor data (such as a visibility / humidity sequence), the length should be unified and missing values should be filled in.
[0046] In some embodiments, the electronic device can perform preprocessing operations on the first data and the second data: first, perform standardization / normalization to eliminate the influence of dimensions, for example, normalize image samples to the [0,1] interval and subtract the mean and divide by the standard deviation, and normalize sensor data to the [-1,1] interval to obtain the first candidate data and the second candidate data; then, perform data augmentation operations on the first candidate data and the second candidate data to improve the robustness of the feature extractor, for example, randomly crop, flip, and adjust the brightness of image samples, and add noise and time offset to sensor data to obtain source domain data and target domain data; finally, perform data partitioning, dividing the source domain data into training set and validation set in an 8:2 ratio (for supervised model training and performance validation, respectively), while the target domain data is all used as unsupervised training set for semi-supervised fine-tuning of the feature extractor.
[0047] In some embodiments, training an initial feature extractor and an initial classifier using the training set and the unsupervised training set, combined with a generative adversarial network, to obtain the feature extractor and the classifier includes: The initial feature extractor and initial classifier are pre-trained using the training set to obtain the candidate feature extractor and candidate classifier; The generative adversarial network is constructed by combining the initial domain discriminator to train the candidate feature extractor, thereby obtaining the alternative feature extractor and the alternative domain discriminator; The candidate feature extractor, the candidate domain discriminator, and the candidate classifier are trained using the training set and the unsupervised training set. The classifier and the feature extractor are obtained by combining the target domain entropy minimization loss.
[0048] In some embodiments, the electronic device can acquire source domain data (covering different fog concentrations, lighting conditions, and marine scenes) labeled with fog / non-fog tags and unlabeled target domain data (with data types consistent with the source domain, such as satellite remote sensing images). The source domain data is divided into training and validation sets according to a preset ratio (e.g., 8:2), while the target domain data is designated as the unsupervised training set. First, based on the source domain training set, an initial feature extractor and an initial classifier are pre-trained using cross-entropy loss to master the basic discrimination logic between fog and non-fog in the source domain, resulting in candidate feature extractors and candidate classifiers. Then, a gradient inversion layer is introduced. The domain discriminator constructs a generative adversarial network (GAN), inputting the source domain training set and the target domain unsupervised training set into the network. It aligns the feature distributions of the two domains through a domain adversarial loss (where the feature extractor attempts to confuse the domain discriminator's judgment of the feature source, while the domain discriminator strives for accurate differentiation). Simultaneously, it incorporates a target domain entropy minimization loss, forcing the initial classifier to explicitly classify target domain samples. This jointly optimizes the initial feature extractor, initial classifier, and domain discriminator. Finally, it monitors model performance (e.g., F1 score, recall) based on the source domain validation set, fine-tuning the model parameters until performance stabilizes, resulting in the final feature extractor and classifier.
[0049] For example, an expression for cross-entropy loss can be shown as follows: ; Where M indicates the number of samples in the source domain training set; Indicates the true label of the j-th sample; Indicates the predicted probability of the candidate classifier for the j-th sample.
[0050] For example, an expression for a domain adversarial loss can be shown as follows: ; in, Indicates the source domain probability of the j-th sample; Indicates the target domain probability of the i-th sample.
[0051] For example, an expression for minimizing the loss by target domain entropy can be shown below: ; ; ; ; in, Indicates the fog probability output by the candidate classifier; Indicates the non-fog probability output by the candidate classifier; T indicates the temperature coefficient, a pre-set hyperparameter. Indicates the non-fog prediction probability after temperature coefficient smoothing; The value indicates the fog prediction probability after temperature coefficient smoothing; N indicates the total number of samples in the unsupervised training set of the target domain.
[0052] In this embodiment, the model's basic discriminative ability is strengthened by leveraging source domain labeled data, and the feature representation distance between the source and target domains is effectively reduced through generative adversarial networks, alleviating the domain offset problem across sea areas and sensors in sea fog classification. At the same time, the entropy minimization loss overcomes the limitation that the target domain cannot be directly optimized without labeling, achieving efficient transfer of classification ability to the target domain. The entire process takes into account both the model's accuracy and generalization. The trained classifier can accurately identify sea fog in the source domain and adapt to unlabeled scenarios in the target domain, reducing the dependence on labeled data in the target domain. Furthermore, the reliability and stability of the model in sea fog recognition tasks are further ensured through real-time monitoring and fine-tuning of the validation set.
[0053] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0054] Based on the same inventive concept, this application also provides a sea fog monitoring device for implementing the sea fog monitoring method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the sea fog monitoring device provided below can be found in the limitations of the sea fog monitoring method described above, and will not be repeated here.
[0055] In one embodiment, such as Figure 4 As shown, a sea fog monitoring device is provided, the device comprising: The acquisition module 10 is used to acquire image data of the target area to be identified; The first recognition module 20 is used to input the image data into the classifier to obtain sea fog recognition candidate results; The determination module 30 is used to determine the core pixels of sea fog and the sea fog determination rules based on the sea fog identification candidate results; The second recognition module 40 is used to determine whether adjacent pixels meet the sea fog determination rules one by one, starting from the core pixel of the sea fog, until all pixels in the image data are traversed to obtain the sea fog recognition target result.
[0056] In one embodiment, the determining module 30 is configured to perform the following steps: Target pixels that match the core features of sea fog are selected from the sea fog recognition results as the core sea fog pixels; Based on the core features of the sea fog and the core pixels of the sea fog, the sea fog determination rule is determined; wherein, the sea fog determination rule includes a similarity rule and a boundary stopping rule.
[0057] In one embodiment, the second identification module 40 is used to perform the following steps: By combining a queue mechanism or a stack mechanism, starting from the starting point, we can determine whether each of the adjacent pixels satisfies the similarity rule; If the similarity rule is satisfied, the pixel is marked as sea fog; if the similarity rule is not satisfied or the boundary stopping rule is satisfied, the pixel is marked as non-sea fog and the sea fog determination process for the adjacent pixels of the pixel is stopped.
[0058] In one embodiment, the sea fog monitoring device further includes: a training module; The training module includes: The acquisition unit is used to acquire source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results; A partitioning unit is used to divide the source domain data into a training set and a validation set, and to determine the target domain data as an unsupervised training set; The training unit is used to train an initial feature extractor and an initial classifier using the training set and the unsupervised training set, combined with a generative adversarial network, to obtain the feature extractor and the classifier.
[0059] In one embodiment, the training unit is configured to perform the following steps: The initial feature extractor and initial classifier are pre-trained using the training set to obtain the candidate feature extractor and candidate classifier; The generative adversarial network is constructed by combining the initial domain discriminator to train the candidate feature extractor, thereby obtaining the alternative feature extractor and the alternative domain discriminator; The candidate feature extractor, the candidate domain discriminator, and the candidate classifier are trained using the training set and the unsupervised training set. The classifier and the feature extractor are obtained by combining the target domain entropy minimization loss.
[0060] In one embodiment, the acquiring unit is configured to perform the following steps: Obtain the first data of labeled sea fog identification results and the second data of unlabeled sea fog identification results; The first data and the second data are preprocessed according to standard methods to obtain the first candidate data and the second candidate data. Perform data augmentation operations on the first candidate data and the second candidate data to obtain the source domain data and the target domain data.
[0061] Each module in the aforementioned sea fog monitoring device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in the processor of the electronic device in hardware form or independent of the processor, or it can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0062] In one embodiment, an electronic device is provided, the internal structure of which can be shown as follows: Figure 5 As shown, the electronic device includes a processor, memory, communication interface, display unit, and input device connected via a method bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores operating methods and computer programs. The internal memory provides an environment for the operation of the operating methods and computer programs stored in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a sea fog monitoring method. The display screen can be an LCD screen or an e-ink display screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the device's casing, or an external keyboard, touchpad, or mouse.
[0063] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0064] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0065] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps performed by the processor of the electronic device of any of the above.
[0066] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0067] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, compilable logic units, quantum computing-based data processing logic units, etc., and are not limited to these.
[0068] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0069] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for monitoring sea fog, characterized in that, The method includes: Acquire image data of the target region to be identified; The image data is input into a classifier to obtain candidate results for sea fog identification; Based on the sea fog identification candidate results, the core pixels of sea fog and the sea fog determination rules are determined; Starting from the core pixel of the sea fog, each adjacent pixel is checked to see if it meets the sea fog determination rule until all pixels in the image data are traversed to obtain the target result of sea fog identification.
2. The method according to claim 1, characterized in that, The process of determining the core pixels of sea fog and the sea fog determination rules based on the sea fog identification candidate results includes: Target pixels that match the core features of sea fog are selected from the sea fog recognition results as the core sea fog pixels; Based on the core features of the sea fog and the core pixels of the sea fog, the sea fog determination rule is determined; wherein, the sea fog determination rule includes a similarity rule and a boundary stopping rule.
3. The method according to claim 2, characterized in that, The step of determining whether adjacent pixels satisfy the sea fog determination rule, starting from the core pixel of the sea fog, includes: By combining a queue mechanism or a stack mechanism, starting from the starting point, we can determine whether each of the adjacent pixels satisfies the similarity rule; If the similarity rule is satisfied, the pixel is marked as sea fog; if the similarity rule is not satisfied or the boundary stopping rule is satisfied, the pixel is marked as non-sea fog and the sea fog determination process for the adjacent pixels of the pixel is stopped.
4. The method according to claim 1, characterized in that, The training methods for the classifier include: Obtain source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results; The source domain data is divided into a training set and a validation set, and the target domain data is determined to be an unsupervised training set. Using the training set and the unsupervised training set, and in conjunction with a generative adversarial network, an initial feature extractor and an initial classifier are trained to obtain the feature extractor and the classifier.
5. The method according to claim 4, characterized in that, The step of training an initial feature extractor and an initial classifier using the training set and the unsupervised training set, combined with a generative adversarial network, to obtain the feature extractor and the classifier includes: The initial feature extractor and initial classifier are pre-trained using the training set to obtain the candidate feature extractor and candidate classifier; The generative adversarial network is constructed by combining the initial domain discriminator to train the candidate feature extractor, thereby obtaining the alternative feature extractor and the alternative domain discriminator; The candidate feature extractor, the candidate domain discriminator, and the candidate classifier are trained using the training set and the unsupervised training set. The classifier and the feature extractor are obtained by combining the target domain entropy minimization loss.
6. The method according to claim 4, characterized in that, The acquisition of source domain data with labeled sea fog identification results and target domain data with unlabeled sea fog identification results includes: Obtain the first data of labeled sea fog identification results and the second data of unlabeled sea fog identification results; The first data and the second data are preprocessed according to standard methods to obtain the first candidate data and the second candidate data. Perform data augmentation operations on the first candidate data and the second candidate data to obtain the source domain data and the target domain data.
7. A sea fog monitoring device, characterized in that, The device includes: The acquisition module is used to acquire image data of the target area to be identified; The first recognition module is used to input the image data into a classifier to obtain sea fog recognition candidate results; The determination module is used to determine the core pixels of sea fog and the sea fog determination rules based on the sea fog identification candidate results; The second recognition module is used to determine whether adjacent pixels meet the sea fog determination rules one by one, starting from the core pixel of the sea fog, until all pixels in the image data are traversed to obtain the sea fog recognition target result.
8. An electronic device, characterized in that, It includes a processor and a memory; wherein the memory is used to store a computer program; and the processor is configured to, when executing the computer program, implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program performs the steps of the method as described in any one of claims 1 to 6.