Ship fire identification method based on edge detection and deep learning

By using the fire recognition method based on edge detection and deep learning in ships to process and analyze the cabin image image, the problem of lack of fire testing and insufficient hardware performance in the existing technologies has been solved, and more efficient and accurate fire recognition is achieved.

CN119380277AInactive Publication Date: 2025-01-28CHINA SHIP DEV & DESIGN CENT
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411497740.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing ship fire detection methods are difficult to detect fire sources immediately in the early stages of fires, and the performance of domestic military hardware and software environments is poor, making it difficult to deploy efficient fire recognition algorithms.

Method used

Using a ship fire recognition method based on edge detection and deep learning, the target cabin image is treated through the edge detection algorithm, and the image to be detected can be obtained. The filter -based image noise reduction method is used for noise and image enhancement, and a neural network model is constructed for fire. Identify and identify the fire in the cabin image or video.

Benefits of technology

The fire recognition rate of the ship's cabin has been improved, the background of the picture or video to be recognized is simplified, the problem of poor environmental performance of domestic military software and hardware has been solved, and faster and accurate fire recognition has been achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380277A_ABST
    Figure CN119380277A_ABST
Patent Text Reader

Abstract

The invention discloses a ship fire identification method based on edge detection and deep learning, and belongs to the technical field of artificial intelligence, and the method comprises the steps: processing a target cabin image through employing an edge detection algorithm, and carrying out the cutting of the target image according to an edge detection result, and obtaining a to-be-detected image; de-noising an image to be detected by using an image de-noising method based on a filter, and improving the image quality and enhancing the image recognition effect through image enhancement; a large number of to-be-detected images, subjected to edge detection and image preprocessing, of ship cabin fire and non-fire scenes are used for analyzing and training a fire recognition algorithm, and a target cabin fire recognition model is obtained; and according to the fire identification result, identifying the target character in the cabin image or the cabin video to prompt the crew whether the fire occurs in the target cabin. The method can simplify the picture or video background to be identified and reduce the data volume; the fire recognition rate of each cabin of the ship is improved; and the problem of poor performance of domestic military software and hardware environments is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and more specifically, relates to a ship fire identification method based on edge detection and deep learning. Background Art

[0002] When a ship is sailing at sea, once a fire occurs, it is difficult to get rescue from other ships. Therefore, timely and effective fire identification plays a decisive role in controlling accident losses. Ship fires mainly rely on the ship's own strength to rescue, and the effective operation of the fire detection system is the key. The fire detection system can issue visual and sound alarms at the early stage of the fire, indicating the space and fire area where the fire occurs. This is the first control measure and barrier to prevent the fire from reaching the fully mature stage.

[0003] Ships currently still use traditional fire detection methods, which usually rely on heat or smoke detectors, but these devices may not be able to immediately detect the source of fire in the early stages of a fire. At present, the software and hardware environment of domestic military products generally faces the challenge of poor performance. It is usually difficult to deploy algorithms or software with high performance requirements, but such algorithms or software have more powerful functions and higher efficiency. Summary of the invention

[0004] In view of the above defects or improvement needs of the prior art, the present invention proposes a ship fire identification method based on edge detection and deep learning to solve the problem of fire identification existing in the above-mentioned existing ships.

[0005] To achieve the above object, according to one aspect of the present invention, a ship fire identification method based on edge detection and deep learning is provided, comprising:

[0006] The target cabin image is processed by using an edge detection algorithm, and the target cabin image is cropped according to the edge detection result to obtain the image to be detected, wherein the target cabin image includes a ship cabin fire image and a non-fire scene image;

[0007] Use the filter-based image denoising method to denoise the image to be detected, and improve the image quality and enhance the image recognition effect to obtain the target image through image enhancement;

[0008] A ship fire recognition model is constructed based on a neural network model, and the ship fire recognition model is analyzed and trained using target images to obtain a trained ship fire recognition model.

[0009] The trained ship fire recognition model identifies the cabin to be inspected, and marks the target word in the cabin image or cabin video according to the fire recognition result to prompt the crew whether a fire has occurred in the target cabin.

[0010] In some optional implementation schemes, the processing of the target cabin image using an edge detection algorithm and cropping the target cabin image to obtain the image to be detected according to the result of the edge detection include:

[0011] A color image of the target cabin is obtained as a first sample image, and the first sample image is grayed, and the RGB value of each pixel in the first sample image is converted into a gray value to obtain a gray image;

[0012] For the obtained grayscale image, a binarization process is used to filter out some dark areas in the grayscale image, and interference items in the image before edge detection are filtered out to obtain a binarized cabin image;

[0013] The cabin image after binarization is processed using a preset edge detection algorithm, the cabin image after edge detection is compared with the first sample image, and the fire range obtained according to the edge detection algorithm is compared and cropped in the first sample image to obtain an image to be detected, and the image to be detected is used as the second sample image.

[0014] In some optional embodiments, the grayscale image is subjected to binarization processing to filter out dark areas in the grayscale image and to filter out interference items in the image before edge detection, including:

[0015] In a grayscale image, let the probability of grayscale value i be P i , assuming the threshold is T, the grayscale value between 0 and T is the background B, and the grayscale value between T+1 and 255 is the foreground F;

[0016] By Get the probability that the gray value of class B is i;

[0017] Depend on Get the probability that the gray value of class F is i;

[0018] Depend on and Calculate the corresponding information entropy,

[0019] Among them, p i is the proportion of pixels with gray value i in all pixels of the image, P T and 1-P T are the cumulative probabilities of background and foreground pixels respectively, and L is the maximum grayscale value of 256.

[0020] Traverse the exhaustive threshold T and obtain B +H F The maximum threshold T is the grayscale image segmentation point obtained by the maximum entropy method. The grayscale value greater than the threshold is set to 255, otherwise it is set to 0.

[0021] In some optional embodiments, the using a preset edge detection algorithm to process the binarized cabin image includes:

[0022] The Sobel operator template is used to convolve the binary cabin image A to obtain G x is the horizontal gradient amplitude, G y is the vertical gradient amplitude, where

[0023] By the horizontal gray value G x and the vertical gray value G y , calculate the gray value of the corresponding point: A threshold is set, the grayscale values ​​are compared and then a binary image is output to obtain the cabin image after edge detection.

[0024] In some optional embodiments, the filter-based image denoising method is used to denoise the image to be detected, and the target image is obtained by improving the image quality and enhancing the image recognition effect through image enhancement, including:

[0025] Two-dimensional Gaussian filtering is used to denoise the image to be detected. The entire kernel is normalized by a two-dimensional Gaussian function and a specified variance σ to obtain a suitable n×n dimensional Gaussian kernel, where n is calculated using the 3σ principle.

[0026] Using an n×n dimensional Gaussian kernel, for each pixel in the second sample image, a weighted average is calculated with the pixels in the surrounding neighborhood;

[0027] Perform image enhancement on the second sample image to improve the image visual effect of the second sample image.

[0028] In some optional implementation schemes, a ship fire recognition model is constructed by the InceptionV1-OnFire model.

[0029] In some optional implementation schemes, based on the fire identification results, each frame in the cabin image or cabin video is marked with the words FIRE and CLEAR and annotated with red and green boxes, where a red box and FIRE indicate a fire, and a green box and CLEAR indicate no fire.

[0030] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

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

[0032] The target cabin image is processed using an edge detection algorithm. According to the edge detection results, the target image is cropped to obtain the image to be detected; the filter-based image denoising method is used to denoise the image to be detected, and the image quality and image recognition effect are improved through image enhancement; the fire recognition algorithm is analyzed and trained using a large number of images to be detected of ship cabin fire and non-fire scenes that have undergone edge detection and image preprocessing to obtain a target cabin fire recognition model; according to the fire recognition results, the target word is marked in the cabin image or cabin video to prompt the crew whether a fire has occurred in the target cabin. This method can simplify the background of the picture or video to be identified, reduce the amount of data; improve the fire recognition rate of each cabin of the ship; and solve the pain point of poor performance of the domestic military software and hardware environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of a ship fire identification method based on edge detection and deep learning provided by an embodiment of the present invention;

[0034] Figure 2 It is a model structure diagram of a simplified architecture (InceptionV1-OnFire model) of a deep convolutional neural network (CNN) provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0036] In order to solve the technical problems in the aforementioned background technology, Figure 1 This is a flow chart of a ship fire identification method based on edge detection algorithm and deep learning algorithm provided in an embodiment of the present disclosure, which is mainly used to timely report the fire situation when a fire occurs in various cabins inside the ship to ensure that the crew can take emergency measures in the shortest time. It mainly includes the following steps:

[0037] S1. Use edge detection algorithm to process the target cabin image to obtain edge detection image results, thereby narrowing the fire identification range;

[0038] In order to meet the requirements of edge detection, the target cabin image is first preprocessed, including:

[0039] A color image of the target cabin (first sample) is obtained, and grayscale processing is performed on the color image to convert the RGB value of each pixel in the color image into a grayscale value, thereby reducing the color noise in the color image, wherein the grayscale processing adopts the average value method:

[0040]

[0041] Among them, R(i,j), G(i,j), B(i,j) are the brightness values ​​of the three components of red (R), green (G), and blue (B), respectively, and gray(i,j) is the grayscale value of the pixel at the current position (i,j);

[0042] For the obtained grayscale image, binarization is used to filter out some dark areas in the image, such as non-flame parts such as crew members, cabinets, and operating tables, and to filter out interference items in the image before edge detection. The binarization uses the maximum entropy image segmentation method: In the gray image, let the probability of gray value i be P i , assuming the threshold is T, the grayscale value between 0 and T is the background B, and the grayscale value between T+1 and 255 is the foreground F;

[0043] The probability density of the gray value i of class B is:

[0044] The probability density of the gray value i of class F is:

[0045] Calculate the corresponding information entropy:

[0046] where p i is the proportion of pixels with gray value i in all pixels of the image, P T and 1-P T are the cumulative probabilities of background and foreground pixels respectively, and L is the maximum grayscale value of 256.

[0047] According to the above calculation method, traverse the exhaustive threshold T (0-255) to obtain B +H F The large threshold T is the grayscale image segmentation point obtained by the maximum entropy method. The grayscale value greater than the threshold is set to 255, otherwise it is set to 0;

[0048] After the target cabin image is grayed and binarized, a preset edge detection algorithm (using the Sobel operator) is used to process the cabin image to obtain an edge detection result, which is compared with the original target cabin image. The fire range obtained by the edge detection algorithm is compared and cropped in the original image to obtain an image to be detected (a second sample), thereby achieving the purpose of narrowing the fire recognition range.

[0049] The Sobel edge detection algorithm provides filtering templates in two directions, x horizontal and y vertical, which can detect vertical edges and vertical edges, including:

[0050] Use the Sobel operator template to convolve the original image A and get G x is the horizontal gradient amplitude, G y is the vertical gradient amplitude, and the calculation process is as follows:

[0051]

[0052] By the horizontal gray value G x and the vertical gray value G y , calculate the gray value of the point:

[0053]

[0054] Set a threshold, compare the data and output a binary image;

[0055] According to the recognition result of the edge detection algorithm, the image to be detected (second sample) is obtained by comparing and cropping with the original target cabin image, thereby achieving the purpose of narrowing the fire recognition range.

[0056] S2. Improving the quality of the input image of the ship fire identification algorithm model, the implementation method includes:

[0057] The image denoising method based on a two-dimensional Gaussian filter denoises the second sample, retaining key information such as the edge and texture of the image while eliminating data interference that cannot be explained or is not of concern to the deep learning algorithm model used by the method. The filtering process includes:

[0058] The ship fire identification method is oriented to two-dimensional images, and the two-dimensional Gaussian filter function used by the Gaussian filter is as follows:

[0059]

[0060] Among them, x, y are the Gaussian kernel, with the center point as the origin, x and y represent the horizontal and vertical coordinates respectively, σ is the variance, which is used to describe the dispersion of a set of data. The smaller the variance, the more concentrated the data is; the larger the variance, the more dispersed the data is;

[0061] Through the two-dimensional Gaussian function and the specified σ, the entire kernel is normalized (the sum of all element values ​​in the kernel is 1, ensuring that the energy of the new image remains unchanged after the Gaussian kernel acts on the image), and a suitable n×n dimensional Gaussian kernel can be obtained. n is calculated by the 3σ principle (the cumulative value of the elements in this area exceeds 99.7% of the cumulative value of all elements), that is:

[0062] n=1+2×3×σ

[0063] Using the Gaussian kernel, for each pixel in the image, a weighted average is calculated for the pixel and the pixels in the surrounding neighborhood, where the weight is determined according to the numerical distribution of the Gaussian kernel;

[0064] According to preset standard parameters such as picture brightness, contrast, color jitter, etc., the second sample is enhanced to improve the image visual effect of the second sample and make it more suitable for specific application scenarios such as various cabins of ships.

[0065] S3, using a large number of second sample images of ship cabin fire and non-fire scenes to analyze and train the ship fire recognition model, so as to obtain a ship fire recognition model that can effectively recognize the fire situation of the target cabin;

[0066] Using a simplified architecture of a deep convolutional neural network (CNN) (InceptionV1-OnFire model), the algorithm's computational performance is improved while maintaining recognition accuracy, providing a processing speed of up to 17fps on contemporary hardware.

[0067] The InceptionV1-OnFire model is a simplification of the InceptionV1 model structure. The input image size is 224×224×3. The neural network model architecture has 22 layers in total. Figure 2 As shown in the figure, there are three consecutive starting modules, each of which is stacked with parallel convolution towers with different filters, using 1×1, 3×3, and 5×5 convolution kernels to identify different features and cluster them. Then, Dropout is applied to the final fully connected layer and Softmax is used to activate the output.

[0068] S4. Transmit the surveillance videos or images of each cabin of the ship to the ship fire recognition model. According to the fire recognition result of the model, mark them in the cabin image or cabin video to remind the crew whether a fire occurs in the target cabin.

[0069] Among them, according to the fire recognition results of the model, each frame in the cabin image or cabin video is marked with the words FIRE and CLEAR and marked with red and green boxes (red and FIRE indicate a fire; green and CLEAR indicate no fire) to remind the crew whether a fire has occurred in the target cabin.

[0070] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, and two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.

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

Claims

1. A ship fire identification method based on edge detection and deep learning, characterized in that: include: The target cabin image is processed by using an edge detection algorithm, and the target cabin image is cropped according to the edge detection result to obtain the image to be detected, wherein the target cabin image includes a ship cabin fire image and a non-fire scene image; Use the filter-based image denoising method to denoise the image to be detected, and improve the image quality and enhance the image recognition effect to obtain the target image through image enhancement; A ship fire recognition model is constructed based on a neural network model, and the ship fire recognition model is analyzed and trained using target images to obtain a trained ship fire recognition model. The trained ship fire recognition model identifies the cabin to be inspected, and marks the target word in the cabin image or cabin video according to the fire recognition result to prompt the crew whether a fire has occurred in the target cabin.

2. The method according to claim 1, characterized in that The method of processing the target cabin image by using an edge detection algorithm and cropping the target cabin image according to the edge detection result to obtain the image to be detected includes: A color image of the target cabin is obtained as a first sample image, and the first sample image is grayed, and the RGB value of each pixel in the first sample image is converted into a gray value to obtain a gray image; For the obtained grayscale image, a binarization process is used to filter out some dark areas in the grayscale image, and interference items in the image before edge detection are filtered out to obtain a binarized cabin image; The cabin image after binarization is processed using a preset edge detection algorithm, the cabin image after edge detection is compared with the first sample image, and the fire range obtained according to the edge detection algorithm is compared and cropped in the first sample image to obtain an image to be detected, and the image to be detected is used as the second sample image.

3. The method according to claim 2, characterized in that The obtained grayscale image is subjected to binarization processing to filter out dark areas in the grayscale image and to filter out interference items in the image before edge detection, including: In a grayscale image, let the probability of grayscale value i be P i , assuming the threshold is T, the grayscale value between 0 and T is the background B, and the grayscale value between T+1 and 255 is the foreground F; By Get the probability that the gray value of class B is i; Depend on Get the probability that the gray value of class F is i; Depend on and Calculate the corresponding information entropy, Among them, p i is the proportion of pixels with gray value i in all pixels of the image, P T and 1-P T are the cumulative probabilities of background and foreground pixels respectively, and L is the maximum grayscale value of 256. Traverse the exhaustive threshold T and obtain B +H F The maximum threshold T is the grayscale image segmentation point obtained by the maximum entropy method. The grayscale value greater than the threshold is set to 255, otherwise it is set to 0.

4. The method according to claim 3, characterized in that The method of processing the binarized cabin image using a preset edge detection algorithm includes: The Sobel operator template is used to convolve the binary cabin image A to obtain G x is the horizontal gradient amplitude, G y is the vertical gradient amplitude, where By the horizontal gray value G x and the vertical gray value G y , calculate the gray value of the corresponding point: A threshold is set, the grayscale values ​​are compared and then a binary image is output to obtain the cabin image after edge detection.

5. The method according to any one of claims 2 to 4, characterized in that: The filter-based image denoising method is used to denoise the image to be detected, and the target image is obtained by improving the image quality and enhancing the image recognition effect through image enhancement, including: Two-dimensional Gaussian filtering is used to denoise the image to be detected. The entire kernel is normalized by a two-dimensional Gaussian function and a specified variance σ to obtain a suitable n×n dimensional Gaussian kernel, where n is calculated using the 3σ principle. Using an n×n dimensional Gaussian kernel, for each pixel in the second sample image, a weighted average is calculated with the pixels in the surrounding neighborhood; Perform image enhancement on the second sample image to improve the image visual effect of the second sample image.

6. The method according to claim 1, characterized in that The ship fire recognition model is constructed based on the InceptionV1-OnFire model.

7. The method according to claim 1, characterized in that According to the fire identification results, each frame in the cabin image or cabin video is marked with the words FIRE and CLEAR and annotated with red and green boxes, where a red box and FIRE indicate a fire, and a green box and CLEAR indicate no fire.

8. 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 according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fire recognition method based on maximum entropy threshold segmentation

    CN104008368A

  • Safety early warning management system based on deep learning image fire recognition

    CN110032977A

  • High-precision image recognition method

    CN111199227A

  • Direct-reading water meter reading identification method based on deep learning

    CN112200160A

  • Violence and terrorism picture safety detection system based on deep learning

    CN112906588A