A sea ice image recognition analysis method and system based on YOLOv8

By using a sea ice image recognition and analysis method based on YOLOv8, the problems of real-time performance and accuracy in port sea ice monitoring were solved, enabling automatic identification and quantitative assessment of sea ice, and improving the efficiency and accuracy of port safety management.

CN122156964APending Publication Date: 2026-06-05TIANJIN PORT ENG INST LTD OF CCCC FIRST HARBOR ENG +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN PORT ENG INST LTD OF CCCC FIRST HARBOR ENG
Filing Date
2026-02-25
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing port sea ice monitoring technologies suffer from poor real-time performance, low accuracy, inability to quantify and assess risks, and slow emergency response, making it impossible to achieve automatic, real-time, and accurate sea ice identification and analysis.

Method used

A sea ice image recognition and analysis method based on YOLOv8 is adopted, including data preprocessing, preliminary detection of sea ice regions, generation of pixel-level sea ice masks and post-processing. The sea ice coverage ratio is calculated and displayed in real time by combining a fusion algorithm of watershed segmentation and random forest classification.

Benefits of technology

It enables automatic, real-time identification and accurate analysis of sea ice, and can quantitatively assess the sea ice coverage ratio, thereby improving the real-time performance and accuracy of port safety management and reducing the intensity of manual labor and error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156964A_ABST
    Figure CN122156964A_ABST
Patent Text Reader

Abstract

The application discloses a sea ice image recognition analysis method and system based on YOLOv8, the method comprises the following steps: acquiring sea ice image or video stream data and carrying out pretreatment, the pretreatment comprises geometric correction and image enhancement; based on the pre-trained YOLOv8 model, the sea ice region of the pretreated sea ice image data is preliminarily detected, and the boundary box containing the sea ice is output; the region of interest is extracted based on the boundary box, the fusion algorithm of watershed segmentation combined with random forest classification is applied, and the pixel-level sea ice mask is generated; the pixel-level sea ice mask is post-processed, and the post-processing includes morphological operation and connected region analysis; according to the post-processed pixel-level sea ice mask, the sea ice coverage ratio is calculated, and the calculation result of the sea ice coverage ratio is dynamically displayed at the predetermined position of the user interface. The application realizes the full-process automation from image input to risk output, without the need for personnel to continuously monitor and prevent, thereby reducing the labor intensity and human error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and marine engineering safety technology, and in particular to a method and system for sea ice image recognition and analysis based on YOLOv8. Background Technology

[0002] Winter port icing poses a multifaceted and serious threat to ship navigation safety. Firstly, the presence of ice significantly increases drag, drastically reducing maneuverability and making it difficult for crew to precisely control course and speed. More destructive is the fact that moving ice floes or ice floes, driven by currents and wind, repeatedly impact the hull like a ramming object, potentially causing coating damage, structural deformation, and even, in extreme cases, hull rupture and leaks. Simultaneously, ice fragments sucked into the ship's cooling system can easily cause blockages; even more dangerously, propellers can become stuck in thick ice, causing the ship to lose power completely and become uncontrollable in the channel. Furthermore, icing in waterways directly reduces effective navigation width, significantly increasing the risk of collisions when ships meet.

[0003] Besides the direct threats to navigation, port icing also poses severe challenges to berthing operations and personnel safety. Slippery icy surfaces covering wharves, approach bridges, and decks pose a significant risk of slips and falls for workers and passengers embarking and disembarking. Low temperatures also make mooring equipment such as cables and bollards brittle, while icing reduces the friction between the cables and bollards. Both of these conditions can lead to mooring failure, causing ships to drift and endangering port facilities and the safety of surrounding vessels. Severe ice conditions often force ports to suspend normal loading and unloading operations, causing not only huge economic losses but also potentially triggering a chain reaction of supply chain disruptions.

[0004] Currently, port ice condition monitoring mainly relies on manual inspections and traditional video surveillance. Manual observation is labor-intensive, has long observation intervals, and limited coverage, failing to provide real-time and comprehensive understanding of ice conditions and resulting in poor timeliness of early warnings. While simple video surveillance provides visual data, it lacks intelligent analysis capabilities and still requires personnel to monitor screens 24 / 7, which is not only inefficient but also prone to subjective judgment errors and cannot provide quantitative data (such as sea ice coverage percentage and density) to support scientific decision-making. Therefore, there is an urgent need for a technological solution that can automatically, in real-time, and accurately identify and analyze sea ice, and quantitatively assess its safety risks, to overcome the shortcomings of existing technologies and improve port safety management. Summary of the Invention

[0005] The purpose of this invention is to provide a sea ice image recognition and analysis method and system based on YOLOv8, which aims to overcome the problems of poor real-time performance, low accuracy, inability to quantify and assess risks, and slow emergency response in existing port sea ice monitoring technologies.

[0006] To achieve the above objectives, the present invention provides the following solution: A YOLOv8-based method for sea ice image recognition and analysis includes the following steps: S1. Acquire sea ice images or video stream data and perform preprocessing, including geometric correction and image enhancement; S2. Based on the pre-trained YOLOv8 model, perform preliminary detection of sea ice regions on the pre-processed sea ice image data and output bounding boxes containing sea ice. S3. Based on the bounding box, extract the region of interest and apply a fusion algorithm of watershed segmentation and random forest classification to generate pixel-level sea ice mask; S4. Post-process the pixel-level sea ice mask, the post-processing including morphological operations and connected component analysis; S5. Calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation result of the sea ice coverage ratio at a predetermined position on the user interface.

[0007] Preferably, step S1 further includes a data augmentation step, which employs a multi-level combined augmentation strategy, specifically including: Geometric Transformation Layer: Used to perform one or more of the following operations on sea ice images with preset probabilities: BBox safe random cropping, D4 symmetry transformation, elastic transformation, mesh distortion, and perspective transformation; Color noise layer: Used to add one or more of the following to sea ice images with preset probabilities: Gaussian noise, ISO noise, image compression effect, random raindrops, and random shadow effects; The data augmentation step is implemented through an image augmentation program or library that supports multi-loop augmentation and configurable probability parameters to generate different augmentation variants.

[0008] Preferably, S2 also includes optimizing the YOLOv8 model using a sea ice-specific dataset, with training strategies including: Sample diversity was increased through rotation, scaling, and color jitter; weights were initialized using pre-trained weights from a self-built dataset and fine-tuned on sea ice images; a combined loss function of cross-entropy loss and Dice loss was employed.

[0009] Preferably, in S3, the application of a fusion algorithm combining watershed segmentation and random forest classification to generate pixel-level sea ice masks specifically includes: Watershed Transform Stage: Gradient magnitude calculation is applied to the region of interest, local minimum values ​​are located as marker points, and watershed transformation is performed to over-segment the image into superpixel regions. Feature extraction and classification stage: Extract the texture and spectral features of each superpixel region and input them into a pre-trained random forest classifier for classification to identify sea ice regions; Mask generation stage: Assign labels to each region based on the classification results to generate pixel-level sea ice masks.

[0010] Preferably, the gradient magnitude is calculated using the Sobel operator; the texture features include the LBP operator, and the spectral features include the RGB channel mean; the random forest classifier contains 100 decision trees with a maximum depth of 10, and the feature importance is evaluated through OOB error.

[0011] Preferably, in S4, post-processing includes morphological operations and connected component analysis, as follows: A circular kernel is used to perform dilation and erosion operations on the pixel-level sea ice mask to smooth the mask edges; connected component analysis is performed to filter noise regions with an area smaller than a threshold, where the threshold = total number of image pixels × 0.001%; ​​a Gaussian kernel is used to filter the pixel-level sea ice mask.

[0012] Preferably, in S5, the sea ice coverage ratio is calculated based on the post-processed pixel-level sea ice mask, using the following formula: Sea ice coverage ratio = (Number of sea ice mask pixels / Total number of image pixels) × 100%.

[0013] This invention also provides a sea ice image recognition and analysis system based on YOLOv8, and a sea ice image recognition and analysis method based on YOLOv8 applying any of the above claims, comprising: A data preprocessing module is used to acquire sea ice image or video stream data and perform preprocessing, including geometric correction and image enhancement. The sea ice region preliminary detection module is used to perform preliminary sea ice region detection on pre-processed sea ice image data based on a pre-trained YOLOv8 model, and output bounding boxes containing sea ice. The sea ice mask generation module is used to extract the region of interest based on the bounding box and apply a fusion algorithm of watershed segmentation and random forest classification to generate pixel-level sea ice masks. The post-processing module is used to perform post-processing on pixel-level sea ice masks. Post-processing includes morphological operations and connected component analysis. The sea ice coverage ratio calculation module is used to calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation results of the sea ice coverage ratio at a predetermined position on the user interface.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a sea ice image recognition and analysis method based on YOLOv8 as described above.

[0015] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention not only identifies sea ice but also accurately calculates the sea ice coverage ratio and displays the results in real time. Through a multi-layered data augmentation strategy, the model can learn sea ice characteristics under various extreme weather and shooting conditions, possessing strong generalization ability and adapting to the monitoring needs of different ports and seasons. It achieves full automation from image input to risk output, eliminating the need for continuous personnel monitoring, greatly reducing manpower, labor intensity, and human error rate. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating the sea ice image recognition and analysis method based on YOLOv8 provided by this invention; Figure 2 A schematic diagram of the architecture of the sea ice image recognition and analysis system based on YOLOv8 provided by the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] like Figure 1 As shown, the present invention provides a sea ice image recognition and analysis method based on YOLOv8, comprising the following steps: S1. Acquire sea ice images or video stream data and perform preprocessing, including geometric correction and image enhancement; S2. Based on the pre-trained YOLOv8 model, perform preliminary detection of sea ice regions on the pre-processed sea ice image data and output bounding boxes containing sea ice. S3. Based on the bounding box, extract the region of interest and apply a fusion algorithm of watershed segmentation and random forest classification to generate pixel-level sea ice mask; S4. Post-process the pixel-level sea ice mask, the post-processing including morphological operations and connected component analysis; S5. Calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation result of the sea ice coverage ratio at a predetermined position on the user interface.

[0021] Specifically, data input is transmitted through a high-bandwidth network within the port, connecting to high-definition cameras deployed at key locations such as channel entrances, main channels, turning areas, and various berths. These cameras collect video stream data at fixed intervals. The system is responsible for receiving the video streams, decoding them, and converting them into a unified image frame format.

[0022] Preprocessing includes the following operations: Geometric correction: Eliminates image distortion caused by camera installation angle by calibrating camera parameters, ensuring the geometric accuracy of the image.

[0023] Image enhancement: Adaptive histogram equalization (CLAHE) is used to improve image contrast and make the boundary between sea ice and background (seawater) clearer; at the same time, Gaussian filtering (kernel size 3×3, σ=1.0) is applied to suppress noise interference.

[0024] Normalization: Scales pixel values ​​to the range of [0,1] to facilitate subsequent model processing.

[0025] Furthermore, S1 also includes a data augmentation step, which employs a multi-level combined augmentation strategy, specifically including: Geometric Transformation Layer: Used to perform one or more of the following operations on sea ice images with preset probabilities: BBox safe random cropping, D4 symmetry transformation, elastic transformation, mesh distortion, and perspective transformation. The application probability parameters are configured as p=0.3, 0.1, 0.1, 0.2, and 0.2, respectively. Color noise layer: used to add one or more of Gaussian noise, ISO noise, image compression effect, random raindrops and random shadow effects to sea ice images with preset probabilities, and the application probability parameters are configured as p=0.1, 0.2, 0.4, 0.2 and 0.2 respectively; The data augmentation step is implemented through an image augmentation program or library that supports multi-loop augmentation and configurable probability parameters to generate different augmentation variants.

[0026] Furthermore, S2 also includes optimizing the YOLOv8 model using a sea ice-specific dataset. The training strategies include: Sample diversity was increased through rotation, scaling, and color jitter; weights were initialized using pre-trained weights from a self-built dataset and fine-tuned on sea ice images; a combined loss function of cross-entropy loss and Dice loss was employed.

[0027] Specifically, the parameters of this model are set as follows: Input size: Resize the preprocessed image to 640×640 pixels while maintaining the aspect ratio; Confidence threshold: Set to 0.5 to filter low-confidence detection results; NMS IoU threshold: Set to 0.5 to merge overlapping bounding boxes.

[0028] Furthermore, in S3, a fusion algorithm combining watershed segmentation and random forest classification is applied to generate pixel-level sea ice masks, specifically including: Watershed Transform Stage: Gradient magnitude calculation is applied to the region of interest (ROI), local minima are located as marker points, and watershed transformation is performed to over-segment the image into superpixel regions; Sobel operator is applied to the ROI to calculate gradient magnitude, gradient threshold is set to 20, and seed points of the sea ice region are marked through morphological operations (dilation, erosion, kernel size 3×3); watershed transformation is performed to over-segment the image into superpixel regions with an average size of 50×50 pixels.

[0029] Feature extraction and classification stage: Extract the texture and spectral features of each superpixel region and input them into a pre-trained random forest classifier for classification to identify sea ice regions; Mask generation stage: Based on the classification results, labels are assigned to each region. Sea ice regions are marked in red (255,0,0) in the mask image, generating pixel-level sea ice masks.

[0030] Furthermore, the gradient magnitude is calculated using the Sobel operator; the texture features include the LBP operator, and the spectral features include the RGB channel mean; the random forest classifier contains 100 decision trees with a maximum depth of 10, and the feature importance is evaluated through OOB error.

[0031] Furthermore, in S4, post-processing includes morphological operations and connected component analysis, as detailed below: A 3×3 circular kernel is used to perform opening operations (erosion followed by dilation) to remove small noise points, and then closing operations (dilation followed by erosion) are performed to fill small holes. Connectivity analysis is performed to filter noise regions with an area smaller than a threshold, where the threshold is equal to the total number of pixels in the image × 0.001%. A Gaussian kernel with σ = 1.5 is used to filter the pixel-level sea ice mask to reduce the jagged effect.

[0032] Furthermore, in S5, the sea ice coverage ratio is calculated based on the post-processed pixel-level sea ice mask, using the following formula: Sea ice coverage ratio = (Number of sea ice mask pixels / Total number of image pixels) × 100%; The post-processed segmentation mask is superimposed on the original image, with the sea ice area marked in red; The coverage ratio is displayed in the upper right corner of the image using a semi-transparent black background and prominent font, with the update frequency synchronized with the input frame rate.

[0033] like Figure 2 As shown, the present invention also provides a sea ice image recognition and analysis system based on YOLOv8, and a sea ice image recognition and analysis method based on YOLOv8 applying any of the above claims, comprising: A data preprocessing module is used to acquire sea ice image or video stream data and perform preprocessing, including geometric correction and image enhancement. The sea ice region preliminary detection module is used to perform preliminary sea ice region detection on pre-processed sea ice image data based on a pre-trained YOLOv8 model, and output bounding boxes containing sea ice. The sea ice mask generation module is used to extract the region of interest based on the bounding box and apply a fusion algorithm of watershed segmentation and random forest classification to generate pixel-level sea ice masks. The post-processing module is used to perform post-processing on pixel-level sea ice masks. Post-processing includes morphological operations and connected component analysis. The sea ice coverage ratio calculation module is used to calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation results of the sea ice coverage ratio at a predetermined position on the user interface.

[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a sea ice image recognition and analysis method based on YOLOv8 as described above.

[0035] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0036] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A sea ice image recognition and analysis method based on YOLOv8, characterized in that, Includes the following steps: S1. Acquire sea ice images or video stream data and perform preprocessing, including geometric correction and image enhancement; S2. Based on the pre-trained YOLOv8 model, perform preliminary detection of sea ice regions on the pre-processed sea ice image data and output bounding boxes containing sea ice. S3. Based on the bounding box, extract the region of interest and apply a fusion algorithm of watershed segmentation and random forest classification to generate a pixel-level sea ice mask. S4. Post-process the pixel-level sea ice mask, the post-processing including morphological operations and connected component analysis; S5. Calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation result of the sea ice coverage ratio at a predetermined position on the user interface.

2. The sea ice image recognition and analysis method based on YOLOv8 according to claim 1, characterized in that, S1 further includes a data augmentation step, which employs a multi-level combined augmentation strategy, specifically including: Geometric Transformation Layer: Used to perform one or more of the following operations on sea ice images with preset probabilities: BBox safe random cropping, D4 symmetry transformation, elastic transformation, mesh distortion, and perspective transformation; Color noise layer: Used to add one or more of the following to sea ice images with preset probabilities: Gaussian noise, ISO noise, image compression effect, random raindrops, and random shadow effects; The data augmentation step is implemented through an image augmentation program or library that supports multi-loop augmentation and configurable probability parameters to generate different augmentation variants.

3. The sea ice image recognition and analysis method based on YOLOv8 according to claim 1, characterized in that, S2 also includes optimizing and training the YOLOv8 model using a sea ice-specific dataset. The training strategy includes: Sample diversity was increased through rotation, scaling, and color jitter; weights were initialized using pre-trained weights from a self-built dataset and fine-tuned on sea ice images; a combined loss function of cross-entropy loss and Dice loss was employed.

4. The sea ice image recognition and analysis method based on YOLOv8 according to claim 1, characterized in that, In step S3, the application of a fusion algorithm combining watershed segmentation and random forest classification to generate pixel-level sea ice masks specifically includes: Watershed Transform Stage: Gradient magnitude calculation is applied to the region of interest, local minimum values ​​are located as marker points, and watershed transformation is performed to over-segment the image into superpixel regions. Feature extraction and classification stage: Extract the texture and spectral features of each superpixel region and input them into a pre-trained random forest classifier for classification to identify sea ice regions; Mask generation stage: Assign labels to each region based on the classification results to generate pixel-level sea ice masks.

5. The sea ice image recognition and analysis method based on YOLOv8 according to claim 4, characterized in that, The gradient magnitude is calculated using the Sobel operator; the texture features include the LBP operator; the spectral features include the RGB channel mean; the random forest classifier contains 100 decision trees with a maximum depth of 10, and the feature importance is evaluated using OOB error.

6. The sea ice image recognition and analysis method based on YOLOv8 according to claim 1, characterized in that, In step S4, post-processing includes morphological operations and connected component analysis, as detailed below: A circular kernel is used to perform dilation and erosion operations on the pixel-level sea ice mask to smooth the mask edges; connected component analysis is performed to filter noise regions with an area smaller than a threshold, where the threshold = total number of image pixels × 0.001%; ​​a Gaussian kernel is used to filter the pixel-level sea ice mask.

7. The sea ice image recognition and analysis method based on YOLOv8 according to claim 1, characterized in that, In step S5, the sea ice coverage ratio is calculated based on the post-processed pixel-level sea ice mask, using the following formula: Sea ice coverage ratio = (Number of sea ice mask pixels / Total number of image pixels) × 100%.

8. A sea ice image recognition and analysis system based on YOLOv8, employing the sea ice image recognition and analysis method based on YOLOv8 as described in any one of claims 1-7, characterized in that, include: A data preprocessing module is used to acquire sea ice image or video stream data and perform preprocessing, including geometric correction and image enhancement. The sea ice region preliminary detection module is used to perform preliminary sea ice region detection on pre-processed sea ice image data based on a pre-trained YOLOv8 model, and output bounding boxes containing sea ice. The sea ice mask generation module is used to extract the region of interest based on the bounding box and apply a fusion algorithm of watershed segmentation and random forest classification to generate a pixel-level sea ice mask. The post-processing module is used to perform post-processing on pixel-level sea ice masks. The post-processing includes morphological operations and connected component analysis. The sea ice coverage ratio calculation module is used to calculate the sea ice coverage ratio based on the post-processed pixel-level sea ice mask, and dynamically display the calculation result of the sea ice coverage ratio at a predetermined position on the user interface.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a sea ice image recognition and analysis method based on YOLOv8 as described in claims 1-7.