Sea level segmentation method based on deep learning

Through deep learning technology, combined with semantic segmentation and data enhancement, model construction and information acquisition are optimized to solve the problem of mis-segmentation and missed detection in sea-sky segmentation under complex weather, and achieve more efficient and accurate sea level detection.

CN118570475APending Publication Date: 2024-08-30COSCO SHIPPING TECH CO LTD

Patent Information

Application Number
CN202410699860.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve sea-sky segmentation under complex weather conditions, and is prone to mis-segmentation and missed detection, especially because clouds and ocean waves have similar textures, and large-scale clouds have similar grayscale distributions to calm sea surfaces, resulting in inaccurate sea-level segmentation.

Method used

Adopt the sea level segmentation method based on deep learning, establish a data set through semantic segmentation technology, perform data enhancement and sample annotation, use a combination of cross-entropy loss and Dice loss function, adjust the learning rate and gradient clipping, optimize model construction, and combine connected domain labeling and least squares fitting to obtain sea level information.

Benefits of technology

It improves the accuracy and stability of sea-sky segmentation, enhances the system's detection capabilities in complex environments, reduces false alarm and missed detection rates, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570475A
    Figure CN118570475A
Patent Text Reader

Abstract

The sea level segmentation method based on deep learning comprises the following steps: (1) semantic segmentation, specifically comprising: 1) establishing a data set comprising the sky, the sea surface, the shore and the island; 2) data enhancement; 3) sample labeling: performing sea, sky and shore information labeling on the positive sample; 4) constructing a model; 5) model training: after the above steps are completed, training can be carried out, and a deep learning target segmentation weight is obtained; (2) sea level information acquisition, specifically comprising: 1) performing connected domain marking on each segmented partial region, and removing noise points in each region; and 2) segmentation line fitting: after obtaining the sea level segmentation line, determining the area where the sea level is located. Sea level segmentation is realized through a deep learning method, the detection accuracy can be continuously improved by continuously increasing feature samples and typical negative samples, meanwhile, the method is not greatly influenced by the environment, and target segmentation can be realized as long as the features of each part in the image can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of shipping, and specifically relates to a sea level segmentation method based on deep learning. Background Art

[0002] At present, my country's shipping companies are still in the starting stage in terms of popularization of informatization and intelligent application. In the future, with the increasing maturity of advanced technologies such as modern information technology, Internet of Things technology, and artificial intelligence technology, there is broad room for imagination in their deep integration with traditional shipping in safety supervision, operation services, ship management, port services, etc.

[0003] At present, intelligent navigation systems have emerged as the times require. That is, by installing cameras on the mast of the ship deck and around the ship to collect information about other ships around the ship, the navigation status of the surrounding ships is monitored, and then the ships close to the ship are monitored for collision avoidance warning, path planning and other functions. The key monitoring objects of the intelligent navigation system are ships at sea. If the sea level information can be adaptively segmented, the software target recognition area can be reduced, thereby increasing the detection speed and reducing the false alarm rate, which helps to improve the detection efficiency and accuracy of the system.

[0004] Existing design scheme and its shortcomings:

[0005] At present, the sea area acquisition method is mainly based on traditional video image processing technology, that is, threshold segmentation is performed according to the grayscale characteristics and texture information of the captured image to achieve the regional division of the sea surface and the sky, and then the divided image is subjected to edge detection or wavelet transformation to obtain the segmentation line. Traditional video image processing algorithms are difficult to achieve sea-sky segmentation under complex weather conditions, mainly because strip-shaped clouds are similar to the texture of waves and are difficult to segment; large-scale clouds are similar to the grayscale distribution of calm sea surfaces and are easily mis-segmented; and the occlusion of the coastline by ships, islands, etc. will weaken the straight line characteristics of the sea level and cause missed detection. Summary of the invention

[0006] In order to solve the problems that the prior art is difficult to achieve sea and sky segmentation, mis-segmentation and missed detection under complex weather conditions, the present invention provides a sea level segmentation method based on deep learning.

[0007] The technical solution of the present invention is as follows:

[0008] The sea level segmentation method based on deep learning is characterized by comprising the following steps:

[0009] (1) Semantic segmentation, including

[0010] 1) Establish a data set including the sky, sea surface, coast, and islands;

[0011] 2) Data augmentation;

[0012] 3) Sample labeling: labeling the positive samples with three types of information: sea, sky, and shore;

[0013] 4) Model construction: During the model construction process, the following optimizations were performed to improve the accuracy of the detection results:

[0014] A) Loss Function Selection

[0015] Cross entropy loss: Use the cross entropy loss function as the main segmentation loss function to balance the difference between the predicted results and the true labels;

[0016] Dice loss: Combines cross entropy loss and Dice loss to comprehensively consider pixel-level accuracy and spatial consistency;

[0017] Category balance weight: The category balance weight is adjusted according to the number of samples in each category in the data set. The collision avoidance model is biased towards the category with a larger number of samples.

[0018] B) Learning rate adjustment

[0019] Learning rate decay: Use the learning rate decay strategy to gradually reduce the learning rate as the training progresses to refine the parameter update step size of the model during the training process and improve the convergence and generalization performance of the model;

[0020] Gradient clipping: clip the gradient to avoid gradient explosion or gradient vanishing problems and improve the stability and convergence of the model;

[0021] 5) Model training, after completing the above steps, you can conduct training to obtain the deep learning target segmentation weights;

[0022] (2) Acquisition of sea level information, including:

[0023] 1) Mark the connected domains of each segmented area and remove the noise points in each area;

[0024] 2) Partition line fitting:

[0025] Starting from the origin of the coordinate system, scan each column vertically in sequence. When a point satisfies the same mark value for at least 5 consecutive points and jumps to at least 5 consecutive pixel points with the value of sea level, the coordinates of this point are recorded. If the order is reversed, the same mark is applied.

[0026] Using the same method, starting from the coordinate origin, scan each row horizontally in turn and mark the sea level division points;

[0027] After obtaining the sea level information points, the sea surface segmentation line is obtained by the least square fitting method;

[0028] After obtaining the sea level dividing line, the area where the sea level is located can be determined.

[0029] Preferably, the data set includes sample data in different weather conditions, different lighting conditions, and different viewing angles.

[0030] Preferably, the data enhancement is achieved using the following three methods:

[0031] A) Randomly crop and scale the image to increase the model's adaptability to objects of different scales and improve the model's generalization performance;

[0032] B) Randomly flip and rotate the input image to increase the model's ability to perceive targets at different angles and directions and improve the model's robustness;

[0033] C) By performing color transformation and brightness adjustment on the input image, the model’s ability to recognize targets under different lighting conditions is enhanced, thereby improving the robustness of the model.

[0034] Preferably, the sample annotation uses a pixel-level annotation method to annotate the sea surface, sky, and shore areas in each sample image.

[0035] Preferably, the connected domain marking is performed using a block size of 3*3, and the specific marking method is as follows:

[0036] Use a 3*3 block to traverse each pixel in the image; when there are background points in this block and there are more than 5 points with the same pixel value in the block, the background point pixels are assigned the value of the majority of pixels in this block.

[0037] The technical effects of the present invention are as follows:

[0038] The present invention discloses a sea level segmentation method based on deep learning. The method collects video images by installing cameras on the deck of a ship and around the ship, marks pictures containing the sea surface, sky and shore, trains the calibrated samples, realizes the detection of the sea surface, sky and shore through a semantic segmentation method, performs traditional video image processing methods on the segmented images, obtains the sea-sky boundary line, and thus obtains the sea level area.

[0039] The sea level segmentation method proposed in the present invention realizes sea level segmentation through a deep learning method. By continuously increasing feature samples and typical negative samples, the detection accuracy can be continuously improved. At the same time, this method is not greatly affected by the environment. As long as the features of each part of the image can be detected, target segmentation can be achieved.

[0040] Specifically, compared with the prior art, the present invention has the following technical effects:

[0041] 1) Advancedness

[0042] This method integrates deep learning technology into the sea level segmentation method, and the concepts and technologies adopted should be leading in the industry. The video detection method based on deep learning has a higher detection rate, a simpler algorithm, easier implementation and higher detection accuracy.

[0043] 2) Anti-interference

[0044] The target segmentation method implemented by this method is not greatly affected by the weather. As long as the difference characteristics of the target can be reflected in the image, the target segmentation can be achieved. At the same time, the detection accuracy can be improved by increasing the number of samples, enriching the detection scenes, and retraining the images with wrong detection, and its scalability is stronger. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a flow chart of a sea level segmentation method according to an embodiment of the present invention;

[0046] Figure 2 This is a comparison chart of the semantic segmentation effects of the implementation examples. DETAILED DESCRIPTION

[0047] In order to better understand the present invention, the present invention is further explained below in conjunction with the accompanying drawings and specific embodiments.

[0048] Example

[0049] In this embodiment, Figure 1 , 2 As shown in the figure, firstly, the sea level segmentation is realized by deep learning method, the segmentation results are marked as connected domains, and the least squares method is used to fit the sea-sky and coast junction points to finally obtain the sea level information. The specific implementation workflow is as follows:

[0050] 1. Semantic Segmentation

[0051] Semantic segmentation is an image segmentation technology in the field of computer vision. The goal of this technology is to assign each pixel in the image to a predefined category. Unlike traditional video image segmentation technology, semantic segmentation technology not only divides the image into several regions, but also classifies each pixel, so it can obtain more detailed image segmentation results.

[0052] The present invention adopts semantic segmentation technology mainly to accurately divide the sea level, sky, and shore, so as to obtain each part of the area. In terms of model selection, since the present invention has high real-time requirements, but the target to be segmented is large, the BiSeNet model has the characteristics of high efficiency, multi-scale module fusion, lightweight network structure, reduced parameters and calculation amount, and its segmentation effect for small targets may be poor, and the weakness of limited segmentation effect for complex scenes can be avoided in the application environment of the present invention. Therefore, after comparing multiple models, the BiSeNet model was selected.

[0053] The specific steps include:

[0054] 1) Create a dataset

[0055] The main purpose of the present invention is to segment the sea area. During the navigation process, the image data that appears in the field of view of the ship mainly includes information such as the sky, sea surface, shore, island, etc. Each part of the area has obvious characteristics. In the process of establishing the data set, sample data of different weather (rain, fog, sunny, snow), different lighting conditions (daytime, evening, nighttime), and different viewing angles are collected to ensure the diversity of the data, which is helpful for the generalization ability of the model and enables it to work well in different environments.

[0056] 2) Data Augmentation

[0057] This embodiment uses the following three methods to achieve data enhancement:

[0058] A) Randomly crop and scale the image to increase the model's adaptability to objects of different scales and improve the model's generalization performance;

[0059] B) Randomly flip and rotate the input image to increase the model's ability to perceive targets at different angles and directions and improve the model's robustness;

[0060] C) By performing color transformation and brightness adjustment on the input image, the model’s ability to recognize targets under different lighting conditions is enhanced, thereby improving the robustness of the model.

[0061] 3) Sample labeling

[0062] In combination with the application scenarios of the present invention, it is mainly to adapt to the intelligent navigation system to detect sea surface targets. Therefore, the main goal of the present invention is to obtain the sea surface area. In order to reduce the error rate of target segmentation, this embodiment will annotate the positive samples with three kinds of information: sea, sky, and shore, that is, to achieve three types of target classification.

[0063] To achieve segmentation accuracy, this embodiment uses a pixel-level annotation method, which can provide the most accurate semantic segmentation information, achieve pixel-level classification and segmentation, and capture the details and boundaries of objects. In the annotation process, the sea, sky, and shore areas in each sample image are annotated.

[0064] 4) Model construction

[0065] During the model building process, the following optimizations were performed to improve the accuracy of the detection results:

[0066] A) Loss Function Selection

[0067] Cross entropy loss: Use the cross entropy loss function as the main segmentation loss function to balance the difference between the predicted results and the true labels.

[0068] Dice loss: Combining cross entropy loss and Dice loss, comprehensively considering pixel-level accuracy and spatial consistency,

[0069] Category balance weight: The category balance weight is adjusted according to the number of samples in each category in the data set. The collision avoidance model is biased towards categories with larger number of samples.

[0070] B) Learning rate adjustment

[0071] Learning rate decay: Use the learning rate decay strategy to gradually reduce the learning rate as the training progresses to refine the parameter update step size of the model during the training process and improve the convergence and generalization performance of the model.

[0072] Gradient clipping: Clip the gradient to avoid gradient explosion or gradient vanishing problems and improve the stability and convergence of the model.

[0073] 5) Model training

[0074] After completing the above steps, you can perform training to obtain the deep learning target segmentation weights.

[0075] 2. Acquisition of sea level information

[0076] After semantic segmentation of the image, each pixel in the image is filled with the target number when it is marked. The present invention adopts the following method to obtain sea level information:

[0077] A) Connected domain labeling

[0078] Since the present invention needs to obtain sea level area information, it does not perform target segmentation on small and medium-sized islands and ships on the sea level. There may be noise points after segmentation. Therefore, after processing each frame of the image, it is necessary to mark the connected domains of the segmented parts and remove the noise points in each area.

[0079] In order to reduce the computational complexity, the present invention uses 3*3 blocks to mark the connected domains. The specific marking method is as follows:

[0080] Use a 3*3 block to traverse each pixel in the image.

[0081] When there are background points in this block and there are more than 5 points with the same pixel value in the block, the background point pixels are assigned the value of the majority pixel in this block.

[0082] B) Partition line fitting

[0083] Starting from the coordinate origin, scan each column vertically in sequence. When a point satisfies the same mark value for at least 5 consecutive points and jumps to at least 5 consecutive pixel points with the value of sea level, the coordinates of this point are recorded. If the order is reversed, the same mark is applied.

[0084] Using the same method, starting from the coordinate origin, scan each row horizontally in turn and mark the sea level division points.

[0085] After obtaining the sea level information points, the sea surface segmentation line is obtained by the least squares fitting method.

[0086] After obtaining the sea level dividing line, the area where the sea level is located can be determined, which is convenient for subsequent other operations.

Claims

1. The sea level segmentation method based on deep learning is characterized by The following steps are involved: (1) Semantic segmentation, including 1) Establish a data set including the sky, sea surface, coast, and islands; 2) Data augmentation; 3) Sample labeling: labeling the positive samples with three types of information: sea, sky, and shore; 4) Model construction: During the model construction process, the following optimizations were performed to improve the accuracy of the detection results: A) Loss Function Selection Cross entropy loss: Use the cross entropy loss function as the main segmentation loss function to balance the difference between the predicted results and the true labels; Dice loss: Combines cross entropy loss and Dice loss to comprehensively consider pixel-level accuracy and spatial consistency; Category balance weight: The category balance weight is adjusted according to the number of samples in each category in the data set. The collision avoidance model is biased towards the category with a larger number of samples. B) Learning rate adjustment Learning rate decay: Use the learning rate decay strategy to gradually reduce the learning rate as the training progresses to refine the parameter update step size of the model during the training process and improve the convergence and generalization performance of the model; Gradient clipping: clip the gradient to avoid gradient explosion or gradient vanishing problems and improve the stability and convergence of the model; 5) Model training, after completing the above steps, you can conduct training to obtain the deep learning target segmentation weights; (2) Acquisition of sea level information, including: 1) Mark the connected domains of each segmented area and remove the noise points in each area; 2) Partition line fitting: Starting from the origin of the coordinate system, scan each column vertically in sequence. When a point satisfies the same mark value for at least 5 consecutive points and the jump value for at least 5 consecutive pixels is sea level, the coordinates of this point are recorded. If the order is reversed, the same mark is applied. Using the same method, starting from the coordinate origin, scan each row horizontally in turn and mark the sea level division points; After obtaining the sea level information points, the sea surface segmentation line is obtained by the least square fitting method; After obtaining the sea level dividing line, the area where the sea level is located can be determined.

2. The method according to claim 1, characterized in that The data set includes sample data in different weather conditions, different lighting conditions, and different viewing angles.

3. The method according to claim 1, characterized in that The data enhancement is achieved using the following three methods: A) Randomly crop and scale the image to increase the model's adaptability to objects of different scales and improve the model's generalization performance; B) Randomly flip and rotate the input image to increase the model's ability to perceive targets at different angles and directions and improve the model's robustness; C) By performing color transformation and brightness adjustment on the input image, the model’s ability to recognize targets under different lighting conditions is enhanced, thereby improving the robustness of the model.

4. The method according to claim 1, characterized in that The sample annotation uses a pixel-level annotation method to annotate the sea surface, sky, and shore areas in each sample image.

5. The method according to claim 1, characterized in that The connected domain is marked using a 3*3 block, and the specific marking method is as follows: Use a 3*3 block to traverse each pixel in the image; when there are background points in this block and there are more than 5 points with the same pixel value in the block, the background point pixels are assigned the value of the majority of pixels in this block.

Citation Information

Patent Citations

  • Sea-sky-line detection method based on combination of semantic segmentation and Hough transform

    CN116824375A

  • Sea-land segmentation method based on context attention and boundary perception guidance

    CN117635628A

Cited By

  • Construction engineering safety supervision method based on artificial intelligence

    CN118799344A