A fire source identification method based on image recognition technology

By using image recognition technology, morphological filtering, color feature extraction, and optical flow field analysis of image data collected by cameras, combined with deep learning models, the limitations of traditional fire detection systems in terms of accuracy and range in harsh environments have been solved, enabling real-time and accurate identification of fire sources.

CN116824501BActive Publication Date: 2026-07-03CHINA UNIV OF MINING & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNIV OF MINING & TECH
Filing Date
2023-06-30
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Traditional fire detection systems cannot effectively detect fires in harsh environments. Smoke, heat, and light detectors suffer from low sensitivity and poor environmental adaptability, which limits the accuracy and scope of early fire identification.

Method used

Image recognition technology is used to collect image data through a camera, and morphological filtering, color feature extraction, optical flow field estimation and feature fusion are performed using the Lucas-Kanade method. Combined with the Yolov5x model, fire source identification is performed to eliminate environmental interference and improve the accuracy of identification.

Benefits of technology

It enables real-time identification of fire sources in various environments, reduces the influence of light and other environmental factors, and improves the accuracy and range of fire source identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116824501B_ABST
    Figure CN116824501B_ABST
Patent Text Reader

Abstract

This invention discloses a fire source identification method based on image recognition technology. The method includes the following steps: Step 1: Collecting image data through a camera and then performing morphological filtering on the collected images; Step 2: Extracting color features from the morphologically filtered images in Step 1 by converting the images from the RGB color space to grayscale to obtain color features, and then filtering out regions that match the flame color by setting a threshold; Step 3: Estimating the optical flow field of the grayscale images from Step 2 using the Lucas-Kanade method to obtain the motion features of the images, and then performing feature fusion; Step 4: Inputting the images from Step 3 into a Yolov5x model to generate a prediction bounding box, thereby obtaining the fire source identification prediction result. This invention uses real-time image information collected by on-site cameras to detect and identify fire sources in gas stations in real time, providing real-time data for fire early warning and maximizing the fire safety of gas stations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to fire source image recognition technology, specifically to a fire source recognition method based on image recognition technology. Background Technology

[0002] In recent years, image recognition technology has been developing rapidly and has been put into use in various industries, among which the application of fire source identification in fire protection is also quite common.

[0003] Currently, traditional fire detection systems based on contact sensors such as smoke, heat, and light detectors are unable to effectively detect fires in harsh environments due to environmental limitations and interference. Smoke detectors use forward-scattering light collection technology, which has low sensitivity to black smoke but high sensitivity to white smoke. However, since most fires initially emit black smoke, this limits the scope of application of such detectors. Heat detectors have limited temperature ranges and suffer from self-heating, inconsistencies in durability, and the need for an external power source. Light detectors, on the other hand, have poor environmental adaptability (indoors, wind, smoke, fog, heat sources, etc.).

[0004] This invention aims to integrate image processing algorithms into monitoring equipment using image recognition technology. By detecting real-time image information collected by on-site cameras, it can identify fire sources in gas stations in real time, providing real-time data for fire early warning and maximizing the fire safety of gas stations. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a fire source identification method based on image recognition technology to solve the problems mentioned in the background technology.

[0006] According to one aspect of this application, a fire source identification method based on image recognition technology is provided.

[0007] The method includes the following steps:

[0008] Step 1: Collect image data using a camera, and then perform morphological filtering on the collected images;

[0009] Step 2: Extract color features from the image after morphological filtering in Step 1. Convert the image from RGB color space to grayscale to obtain color features, and then filter out the regions that match the color of the flame by setting a threshold.

[0010] Step 3: Use the Lucas-Kanade method to estimate the optical flow field of the grayscale image from Step 2 to obtain the motion features of the image, and then perform feature fusion.

[0011] Step 4: Input the image from Step 3 into the YOLOv5x model to generate a prediction block diagram, thereby obtaining the fire source identification prediction result.

[0012] Preferably, the morphological filtering in step one is performed by morphological filtering the flame image, and the steps are as follows:

[0013] Binarization: Converting the collected image into a binary image, achieved through grayscale thresholding or adaptive thresholding methods;

[0014] Erosion operation: Perform multiple erosion operations on the binary image to eliminate small noise and black boundaries, while reducing the size of the target area;

[0015] Dilation operation: Dilation operation is performed on the image obtained after erosion to restore the size of the target region and remove some irrelevant noise.

[0016] Opening operation: Performs an opening operation on the dilated image, that is, erosion is performed first and then dilation is performed;

[0017] Area filtering: Finally, select the effective morphological filtering results based on the target area size.

[0018] Preferably, the step of color feature extraction in step two is as follows:

[0019] First, the relevant RGB format flame image or video information is obtained through the camera. Then, the values ​​of the red, green and blue components of each pixel in the RGB format image or video information are weighted and averaged through linear function transformation to obtain a grayscale value, which is then converted into a grayscale image with more obvious features.

[0020] The resulting grayscale image is then subjected to Gaussian filtering. The Gaussian function is used to calculate the weight of each pixel. The weight of a pixel that is farther away from the current pixel is smaller, resulting in a grayscale image with reduced image noise.

[0021] Then, using the maximum inter-class variance method, the probability of each gray level appearing in the image is counted through the following steps: all possible thresholds are traversed, the intra-class variance and inter-class variance at the current threshold are calculated, and the maximum inter-class variance and the corresponding threshold are updated. The final selected threshold is the threshold that maximizes the inter-class variance. The image is then binarized to obtain multiple local images of suspected flame features.

[0022] Finally, a two-dimensional Laplacian operator is used to calculate the Laplacian value of each pixel in the image. For each pixel, if its Laplacian value exceeds a preset threshold, the pixel is marked as an edge point, and finally, multiple edge-enhanced images with suspected flame features are obtained.

[0023] Preferably, the specific steps for estimating the optical flow field using the Lucas-Kanade method in step three are as follows:

[0024] Select a pixel in one image and find similar pixels in another image;

[0025] Select a small window around the selected pixel and convert the motion of all pixels within this small window into a system of equations.

[0026] By using the least squares method to solve the system of equations, we obtain the average value of the motion vectors in the x and y directions. This vector is the optical flow vector of this pixel.

[0027] Repeat the above steps until every pixel has been processed and the optical flow field of the entire image is generated;

[0028] The image of the generated optical flow field is then fused with features.

[0029] Preferably, the feature fusion step in step three is as follows:

[0030] Feature encoding: The extracted morphological, color, and motion features are converted into vector form for further calculation and processing;

[0031] Feature normalization: unifies the values ​​of different features to make the impact of each feature on the final result comparable;

[0032] Feature fusion: Combining and fusing vectors of different features into a total feature vector. Using a concatenated combination strategy, different feature levels are spliced ​​into a longer vector, which serves as a new sample feature.

[0033] Preferably, the method for fire source identification and prediction in step four is to input the image after feature fusion in step three into the YOLOv5 algorithm model, through the following steps:

[0034] Feature extraction: Deep convolutional neural networks are used to extract features from the input image;

[0035] Object detection: Using multiple prediction heads, the feature map is detected at different scales to obtain candidate fire source object boxes and their confidence scores;

[0036] Non-maximum suppression: Removes redundant candidate boxes and retains only the most representative boxes;

[0037] Post-processing: For each object bounding box, the position and size of the box are further refined using a regression model. At the same time, confidence post-processing is performed to improve classification accuracy, thereby determining whether a fire source has been generated in this fire source area.

[0038] This application discloses a fire source identification method based on image recognition technology. The image recognition technology used in this application detects fire sources by using real-time image information collected by a camera. The image data collected by the camera is only related to the light intensity of the ambient environment, eliminating environmental factors such as temperature and wind force. Compared with a detector, it has a larger range of action. Furthermore, by extracting color features from the morphologically filtered image and converting it from the RGB color space to a grayscale image, the color features are more obvious, reducing image blurring caused by light. Then, the optical flow field is estimated using the Lucas-Kanade method to obtain the motion features of the image, and feature fusion is performed. This can further determine whether a fire source has been generated and distinguish the fire source from relatively stable interfering light sources such as vehicle headlights and flashlights. Through the above steps, the inaccuracy of prediction results caused by environmental factors is reduced. Attached Figure Description

[0039] Figure 1 This is a flowchart of a fire source identification method based on image recognition technology according to an embodiment of this application. Detailed Implementation

[0040] To make the content of this application easier to understand, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0041] like Figure 1 As shown, a fire source identification method based on image recognition technology is presented.

[0042] The method includes the following steps:

[0043] Step 1: Collect image data using a camera, and then perform morphological filtering on the collected images;

[0044] Step 2: Extract color features from the image after morphological filtering in Step 1. Convert the image from RGB color space to grayscale to obtain color features, and then filter out the regions that match the color of the flame by setting a threshold.

[0045] Step 3: Use the Lucas-Kanade method to estimate the optical flow field of the grayscale image from Step 2 to obtain the motion features of the image, and then perform feature fusion.

[0046] Step 4: Input the image from Step 3 into the YOLOv5x model to generate a prediction block diagram, thereby obtaining the fire source identification prediction result.

[0047] In one embodiment, the morphological filtering in step one is performed by morphologically filtering the flame image, and the steps are as follows:

[0048] 1) Binarization: Converting the original image into a binary image, achieved through methods such as grayscale thresholding or adaptive thresholding;

[0049] 2) Erosion operation: Perform multiple erosion operations on the binary image to eliminate small noise and black boundaries, while reducing the size of the target area;

[0050] 3) Dilation operation: Dilation operation is performed on the image obtained after erosion to restore the size of the target region and remove some irrelevant noise;

[0051] 4) Opening operation: The opening operation is performed on the dilated image, that is, erosion is performed first and then dilation. The opening operation can smooth the edge of the target area, remove noise on the boundary, smooth the outline of the object, and make the target clearer and more visible.

[0052] 5) Area filtering: Finally, select the effective morphological filtering results based on the size of the target area. In general, features of small areas will be filtered out, and only larger target areas will be retained, thereby reducing the impact on the detection results.

[0053] In one embodiment, the step of color feature extraction in step two is as follows:

[0054] 1) Obtain relevant RGB format flame images or video information through a camera;

[0055] 2) By transforming the RGB format image or video information with a linear function, the values ​​of the red, green and blue components of each pixel are weighted and averaged to obtain a gray value. This gray value can be used to represent the brightness information of the pixel in the original image, while ignoring the color information, and transforming it into a gray image with more obvious features.

[0056] 3) Apply Gaussian filtering to the obtained grayscale image, using the Gaussian function to calculate the weight of each pixel. Pixels farther away from the current pixel have smaller weights, resulting in a grayscale image with reduced image noise.

[0057] 4) Using the Otsu's method, the following steps are performed:

[0058] 1. Calculate the probability of each gray level appearing in the image (i.e., create a histogram);

[0059] 2. Iterate through all possible thresholds, calculate the intra-class variance and inter-class variance at the current threshold, and update the maximum inter-class variance and the corresponding threshold.

[0060] 3. The final selected threshold is the one that maximizes the inter-class variance. The image is then binarized to obtain multiple local images of suspected flame features.

[0061] 5) Use the two-dimensional Laplacian operator to calculate each pixel in the image and calculate the corresponding Laplacian value. For each pixel, if its Laplacian value exceeds the preset threshold, then mark the pixel as an edge point. Finally, obtain multiple edge-enhanced images of suspected flame features.

[0062] In one embodiment, the specific steps for estimating the optical flow field using the Lucas-Kanade method in step three are as follows:

[0063] 1) Select a pixel in one image and find a similar pixel in another image;

[0064] 2) Select a small window around the selected pixel and convert the motion of all pixels within this small window into a system of equations;

[0065] 3) Solve the system of equations using the least squares method to obtain the average value of the motion vectors in the x and y directions. This vector is the optical flow vector of this pixel.

[0066] 4) Repeat the above steps until every pixel has been processed and the optical flow field of the entire image is generated;

[0067] 5) Perform feature fusion on the generated optical flow field image.

[0068] In one embodiment, the feature fusion step in step three is as follows:

[0069] 1) Feature encoding: The extracted morphological, color, and motion features are converted into vector form for further calculation and processing;

[0070] 2) Feature normalization: The values ​​of different features are normalized to make the impact of each feature on the final result comparable;

[0071] 3) Feature fusion: Combining and fusing vectors of different features into a total feature vector. Using a concatenated combination strategy, different feature levels are spliced ​​into a longer vector as a new sample feature.

[0072] In one embodiment, the fire source identification and prediction in step four is achieved by inputting the image obtained from feature fusion in step three into the YOLOv5 algorithm model, through the following steps:

[0073] 1) Feature extraction: Using deep convolutional neural networks to extract features from the input image;

[0074] 2) Object detection: Using multiple prediction heads, the feature map is detected at different scales to obtain candidate fire source object boxes and their confidence scores;

[0075] 3) Non-maximum suppression: Remove redundant candidate boxes and retain only the most representative boxes;

[0076] 4) Post-processing: For each object bounding box, the position and size of the box are further refined using a regression model. At the same time, post-processing of the confidence level is performed to improve the classification accuracy, thereby determining whether a fire source has been generated in this fire source area.

[0077] The above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them. Although the embodiments of this application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features, without departing from the spirit and scope defined by the claims of this application.

Claims

1. A fire source identification method based on image recognition technology, characterized in that, The method includes the following steps: Step 1: Collect image data using a camera, and then perform morphological filtering on the collected images; Step 2: Extract color features from the image after morphological filtering in Step 1. Convert the image from RGB color space to grayscale to obtain color features, and then filter out the regions that match the color of the flame by setting a threshold. Step 3: Use the Lucas-Kanade method to estimate the optical flow field of the grayscale image from Step 2 to obtain the motion features of the image, and then perform feature fusion. Step 4: Input the image after feature fusion in Step 3 into the YOLOv5 algorithm model to generate a prediction bounding box, thereby obtaining the fire source identification prediction result; The feature fusion step in step three is as follows: Feature encoding: The extracted morphological, color, and motion features are converted into vector form for further calculation and processing; Feature normalization: unifies the values ​​of different features to make the impact of each feature on the final result comparable; Feature fusion: Combining and fusing vectors of different features into a total feature vector. Using a concatenated combination strategy, different feature levels are spliced ​​into a longer vector, which serves as a new sample feature.

2. The fire source identification method based on image recognition technology according to claim 1, characterized in that, The morphological filtering method in step one is to process the flame image using morphological filtering, and the steps are as follows: Binarization: Converting the collected image into a binary image, achieved through grayscale thresholding or adaptive thresholding methods; Erosion operation: Perform multiple erosion operations on the binary image to eliminate small noise and black boundaries, while reducing the size of the target area; Dilation operation: Dilation operation is performed on the image obtained after erosion to restore the size of the target region and remove some irrelevant noise. Opening operation: Performs an opening operation on the dilated image, that is, erosion is performed first and then dilation is performed; Area filtering: Finally, select the effective morphological filtering results based on the target area size.

3. The fire source identification method based on image recognition technology according to claim 2, characterized in that, The step of color feature extraction in step two is as follows: First, the relevant RGB format flame image or video information is obtained through the camera. Then, the values ​​of the red, green and blue components of each pixel in the RGB format image or video information are weighted and averaged through linear function transformation to obtain a grayscale value, which is then converted into a grayscale image with more obvious features. The resulting grayscale image is then subjected to Gaussian filtering. The Gaussian function is used to calculate the weight of each pixel. The weight of a pixel that is farther away from the current pixel is smaller, resulting in a grayscale image with reduced image noise. Then, using the maximum inter-class variance method, the probability of each gray level appearing in the image is counted through the following steps: all possible thresholds are traversed, the intra-class variance and inter-class variance at the current threshold are calculated, and the maximum inter-class variance and the corresponding threshold are updated. The final selected threshold is the threshold that maximizes the inter-class variance. The image is then binarized to obtain multiple local images of suspected flame features. Finally, a two-dimensional Laplacian operator is used to calculate the Laplacian value of each pixel in the image. For each pixel, if its Laplacian value exceeds a preset threshold, the pixel exceeding the preset threshold is marked as an edge point. Finally, multiple edge-enhanced images with suspected flame features are obtained.

4. The fire source identification method based on image recognition technology according to claim 3, characterized in that, The specific steps for estimating the optical flow field using the Lucas-Kanade method in step three are as follows: Select a pixel in one image and find similar pixels in another image; Select a small window around the selected pixel and convert the motion of all pixels within this small window into a system of equations. By using the least squares method to solve the system of equations, we obtain the average value of the motion vectors in the x and y directions. This vector is the optical flow vector of this pixel. Repeat the above steps until every pixel has been processed and the optical flow field of the entire image is generated; The image of the generated optical flow field is then fused with features.

5. The fire source identification method based on image recognition technology according to claim 1, characterized in that, The method for fire source identification and prediction in step four involves inputting the image obtained after feature fusion in step three into the YOLOv5 algorithm model, through the following steps: Feature extraction: Deep convolutional neural networks are used to extract features from the input image; Object detection: Using multiple prediction heads, the feature map is detected at different scales to obtain candidate fire source object boxes and their confidence scores; Non-maximum suppression: Removes redundant candidate boxes and retains only the most representative boxes; Post-processing: For each object bounding box, the position and size of the box are further refined using a regression model. At the same time, confidence post-processing is performed to improve classification accuracy, thereby determining whether a fire source has been generated in this fire source area.