Real-time fire smog detection and identification system for car washer construction based on computer vision

By using computer vision technology and support vector machine models, a fire and smoke detection system for car wash machine construction environments was constructed. This system solved the problem of high false alarm rates in high humidity and water mist environments using traditional methods, and achieved accurate classification and real-time response to flames and smoke.

CN121640394AActive Publication Date: 2026-03-10建研防火科技有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Traditional fire detection methods have a high false alarm rate in car wash machine operation environments and cannot effectively distinguish between water mist and real smoke, resulting in poor reliability and practicality of the detection system.

Method used

A computer vision-based fire and smoke detection system is adopted. Through image acquisition and preprocessing, dynamic interference suppression and foreground segmentation, multimodal suspected region generation, multidimensional feature fusion and fire and smoke recognition modules, combined with dynamic background reference frames and predefined moving part masks, multidimensional features of flames and smoke are extracted and classified using a support vector machine model.

Benefits of technology

In complex industrial environments, it can effectively distinguish between real fires and interference, reduce false alarm rates, improve identification accuracy, and ensure the system's high sensitivity and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640394A_ABST
    Figure CN121640394A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and particularly discloses a car washer construction real-time fire smog detection and recognition system based on computer vision, and the system comprises the steps: carrying out the image enhancement processing of a video stream collected in real time, and obtaining a preprocessing image sequence; foreground segmentation is carried out by adopting dynamic background modeling in combination with a predefined inherent moving part mask of the car washer, and a real moving foreground area is extracted; based on color space analysis and a dark channel theory, parallelly extracting a suspected flame region and a suspected smoke region from the motion foreground region; respectively extracting static texture features and dynamic shape change features of the flame region to form a flame feature vector, and extracting color statistical features and gradient direction features of the smoke region to form a smoke feature vector; inputting the feature vectors into a pre-trained classification model to obtain a fire behavior and smoke probability value, and outputting a structured recognition result containing category and position information when the probability value exceeds a set threshold value; the real fire behavior and the environment interference can be effectively distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, specifically to a computer vision-based real-time fire and smoke detection and recognition system for car wash machine construction. Background Technology

[0002] The construction environment of car wash machines, especially the interior and surrounding areas of automated tunnel car wash machines, presents a series of unique fire hazards. These environments are typically characterized by high humidity, strong water mist, frequent changes in lighting, and the accumulation of volatile gases from various chemical cleaning agents. Traditional fire detection technologies based on smoke and heat sensors are severely hampered in such environments. Water mist is easily misinterpreted as smoke, and the high temperature and humidity also affect sensor sensitivity, resulting in extremely low reliability of existing technologies for fire detection in car wash machine construction scenarios.

[0003] The existing technology has the following shortcomings: Traditional fire detection methods suffer from extremely high false alarm rates in special industrial environments such as car washes, characterized by high humidity, strong water mist, and periodic mechanical movement. The continuous high-pressure water mist in the car wash environment is visually very similar to real smoke, and the regular movements of equipment such as brush rollers and conveyor belts are easily misinterpreted as dynamic flame characteristics. This leads to a large number of false alarms in detection systems based on ordinary video analysis or traditional sensors, severely impacting the reliability and practicality of the detection system. Summary of the Invention

[0004] The purpose of this invention is to provide a computer vision-based real-time fire and smoke detection and identification system for car wash machine construction, in order to solve the problems mentioned above.

[0005] The objective of this invention can be achieved through the following technical solutions: A computer vision-based real-time fire and smoke detection and recognition system for car wash machine construction includes: The image acquisition and preprocessing module is used to acquire real-time monitoring video streams of the car wash machine construction area and perform image enhancement processing on the video streams to obtain preprocessed image sequences. The dynamic interference suppression and foreground segmentation module is used to perform background modeling and foreground analysis on the preprocessed image sequence. By calculating the difference between the current frame and the background reference frame, and combining it with the predefined car wash machine inherent moving part mask for filtering, the real moving foreground region caused by potential fire smoke is segmented. A multimodal suspected region generation module is used to extract suspected flame regions and suspected smoke regions in parallel from a real moving foreground region; The multi-dimensional feature fusion module is used to extract static texture features and dynamic shape change features of suspected flame areas to form flame feature vectors, and to extract color statistical features and gradient direction features of suspected smoke areas to form smoke feature vectors. The fire and smoke identification and result output module is used to input the flame feature vector and smoke feature vector into the pre-trained fire and smoke classification model, and output the fire probability value and smoke probability value. When any probability value exceeds the corresponding threshold, it is determined that there is a fire or smoke. The probability value includes the fire probability value and the smoke probability value, and outputs a structured identification result containing category and location information.

[0006] As a further aspect of the present invention: the process for identifying the real moving foreground region is as follows: For the preprocessed image sequence, a method based on the statistical distribution of pixel values ​​in the time domain is adopted to establish and maintain a sample set containing multiple possible background values ​​for each pixel, and to incorporate scene illumination changes through a random update strategy to generate a dynamic background reference frame; Calculate the color and brightness differences between the current frame and the dynamic background reference frame at each pixel position to obtain the preliminary binarized motion region; perform a logical subtraction operation between the preliminary binarized motion region and the predefined car wash machine inherent moving part mask to obtain the candidate real motion foreground region; Multi-scale motion consistency verification is performed on the candidate real moving foreground regions. The consistency of motion vectors in the internal regions between consecutive frames is analyzed, and the region color uniformity judgment is integrated to eliminate small and discrete false motion regions caused by water splashes and local reflections. Finally, the real moving foreground regions are output.

[0007] As a further aspect of the present invention: obtaining the preliminary binarized motion region specifically includes: Calculate the absolute differences between the current frame and the dynamic background reference frame on multiple color channels, and then weight and fuse the absolute differences to generate a comprehensive difference map. Based on the local contrast within the neighborhood of each pixel in the comprehensive difference map, the difference threshold of the corresponding pixel is dynamically calculated to generate an initial binarized motion region that can suppress texture noise. Using the connected region with the largest difference value in the initial binarized motion region as the seed point, region growing is performed based on the similarity of the difference values ​​between adjacent pixels. Internal holes and discrete artifacts are eliminated in the grown region, and finally a preliminary binarized motion region is obtained.

[0008] As a further aspect of the present invention: the extraction of suspected flame areas and suspected smoke areas specifically includes: In the RGB color space, verify whether the red component of each pixel in the real moving foreground region is simultaneously greater than the green and blue components, and in the HSV color space, verify whether the saturation of each pixel in the real moving foreground region is higher than the dynamically calculated saturation threshold; define the set of pixels that simultaneously meet the color rules and whose brightness change rate exceeds the preset threshold as the initial flame candidate region. Calculate the dark channel image of the real moving foreground region, and initially identify the region with dark channel value below a first preset threshold as a potential smoke region; perform chromaticity clustering analysis on the real moving foreground region in the YUV color space, and identify the region with chromaticity value concentrated in the preset smoke characteristic chromaticity range as a chromaticity candidate region; define the intersection of the potential smoke region and the chromaticity candidate region as the initial smoke candidate region. Perform morphological opening operations on the initial flame candidate region and the initial smoke candidate region respectively, and then perform morphological closing operations to output the suspected flame region and the suspected smoke region.

[0009] As a further aspect of the present invention: the process of generating the flame feature vector is as follows: Within the suspected flame area, local binary texture statistics are calculated for each window using sliding windows of different sizes. By statistically analyzing the distribution histograms of different texture patterns within each window, multi-scale texture features characterizing the roughness and contrast of the flame texture are obtained. In a continuous frame sequence, calculate the area change rate and contour fluctuation index of the suspected flame region; Multi-scale texture features, area change rate, and contour fluctuation index are normalized and then spliced ​​together in a preset order to form a flame feature vector that characterizes the static texture characteristics and dynamic shape change characteristics of the flame.

[0010] As a further aspect of the present invention: the calculation of the area change rate and contour fluctuation index of the suspected flame region specifically includes: In a continuous frame sequence, connected component analysis is performed on the suspected flame region, and the total number of pixels in each connected component is counted as the region area of ​​the corresponding continuous frame, thus constructing a sequence data of area change over time. Based on the sequential data of area changing over time, the relative change in area between adjacent frames is calculated, and a weighted moving average is applied to the change between multiple consecutive frames. The average of the processed change is used as the area change rate. Extract the minimum bounding rectangle of the suspected flame region in each consecutive frame, calculate the displacement of the center point of the minimum bounding rectangle between adjacent frames and the change in the aspect ratio, and use the product of the displacement and the change in aspect ratio as the contour fluctuation index.

[0011] As a further aspect of the present invention: the formation of the smoke feature vector specifically includes: The suspected smoke area is divided into multiple non-overlapping sub-blocks. The numerical distribution of pixels in each sub-block across multiple color channels is calculated. By statistically analyzing the similarity and distribution width between the color distribution histograms of each sub-block, color statistical features characterizing the uniformity and diffusion properties of smoke color are obtained. Calculate the gradient magnitude and direction of the suspected smoke region, divide the direction range into multiple intervals, count the sum of magnitudes in each gradient direction interval, and obtain the gradient direction feature that characterizes the degree of disorder of the smoke texture direction by calculating the ratio of the standard deviation to the mean of the sum of magnitudes in each interval. After normalizing the color statistical features and gradient direction features, they are concatenated and combined according to a preset dimensional order to form a smoke feature vector that simultaneously contains the smoke color distribution characteristics and texture direction characteristics.

[0012] As a further aspect of the present invention: the step of inputting the flame feature vector and the smoke feature vector into a pre-trained fire and smoke classification model, and outputting the fire probability value and the smoke probability value, specifically includes: Flame feature vectors and smoke feature vectors are used as independent inputs to a fire and smoke classification model built on support vector machines. The training objective of the fire and smoke classification model is to minimize the cross-entropy loss between the predicted probability value and the true labeled probability value. The fire and smoke classification model is trained, and the corresponding fire probability value and smoke probability value are output according to the trained fire and smoke classification model.

[0013] As a further aspect of the present invention: the construction process of the fire smoke classification model is as follows: Flame and smoke feature vectors from historical monitoring data were collected and combined with manually labeled real fire and smoke states as target labels to construct a historical training dataset. The entire dataset was divided into training and validation subsets according to a preset ratio for parameter learning and performance validation of the fire and smoke classification model, respectively. The support vector machine algorithm was used to construct the fire and smoke classification model, and the kernel function type, penalty factor, and kernel function parameters were set as key hyperparameters. During training, the support vectors were solved using the sequence minimum optimization algorithm to determine the optimal classification hyperplane, and nonlinear mapping was performed in the feature space to handle complex feature distributions. The particle swarm optimization algorithm was introduced to automatically optimize the hyperparameters of the fire and smoke classification model. After each training iteration, the cross-entropy loss between the predicted result and the real label was calculated. When the cross-entropy loss on the validation subset tended to stabilize and reached a preset threshold, the training of the fire and smoke classification model was completed. The trained fire and smoke classification model was deployed to the car wash machine construction monitoring system, which received input data composed of flame and smoke feature vectors in real time and output the corresponding fire probability value and smoke probability value.

[0014] The beneficial effects of this invention are: (1) To address the complex conditions unique to car wash machine construction areas, such as water mist interference, mechanical motion interference, and changes in lighting, this invention effectively distinguishes between real fire situations and conventional environmental interference by constructing a dual filtering mechanism of dynamic background reference frames and predefined moving part masks. Specifically, a background modeling method based on pixel temporal distribution statistics is adopted, combined with a random update strategy to adapt to changes in lighting. Then, periodic motion interference from brush rollers, conveyor belts, etc., is filtered out through moving part masks. Finally, multi-scale motion consistency verification and color uniformity judgment are used to eliminate water splashes and local reflection interference. This multi-level interference suppression system enables the system to maintain high sensitivity while keeping the false alarm rate at an extremely low level, solving the technical problem of poor applicability of traditional detection methods in complex industrial environments.

[0015] (2) This invention overcomes the limitations of single feature detection and constructs a complete feature engineering system. Multi-dimensional feature extraction schemes are designed to address the different physical characteristics of flames and smoke: static texture features and dynamic shape change features are extracted from the flame region to capture its irregular jumping characteristics; for the smoke region, color statistical features and gradient direction features are combined to characterize its diffusion and semi-transparency. A support vector machine model is used to process the 57-dimensional smoke feature vector and the 44-dimensional flame feature vector in parallel, achieving accurate classification of fire smoke. This multi-modal feature fusion method not only improves the recognition accuracy but also ensures the real-time performance of the system through feature dimensionality reduction and optimization, providing technical support for rapid response in industrial environments. Attached Figure Description

[0016] The invention will now be further described with reference to the accompanying drawings.

[0017] Figure 1 This is a system block diagram of 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] Please see Figure 1 As shown, this invention is a computer vision-based real-time fire and smoke detection and recognition system for car wash machine construction, comprising: The image acquisition and preprocessing module is used to acquire real-time monitoring video streams of the car wash machine construction area and perform image enhancement processing on the video streams to obtain preprocessed image sequences. The dynamic interference suppression and foreground segmentation module is used to perform background modeling and foreground analysis on the preprocessed image sequence. By calculating the difference between the current frame and the background reference frame, and combining it with the predefined car wash machine inherent moving part mask for filtering, the real moving foreground region caused by potential fire smoke is segmented. A multimodal suspected region generation module is used to extract suspected flame regions and suspected smoke regions in parallel from a real moving foreground region; The multi-dimensional feature fusion module is used to extract static texture features and dynamic shape change features of suspected flame areas to form flame feature vectors, and to extract color statistical features and gradient direction features of suspected smoke areas to form smoke feature vectors. The fire and smoke identification and result output module is used to input the flame feature vector and smoke feature vector into the pre-trained fire and smoke classification model, and output the fire probability value and smoke probability value. When any probability value exceeds the corresponding threshold, it is determined that there is a fire or smoke. The probability value includes the fire probability value and the smoke probability value, and outputs a structured identification result containing category and location information.

[0020] In the image acquisition and preprocessing module, the image acquisition equipment deployment steps are as follows: High-definition network cameras, mounted on fixed brackets on both sides and the top of the car wash tunnel, continuously capture video of the construction area. These cameras are equipped with wide dynamic range image sensors, capable of simultaneously capturing image details in both brightly lit and shadowed areas. The cameras transmit uncompressed raw video data in real time.

[0021] Image denoising and color correction steps: First, bilateral filtering is performed on the acquired raw video data to reduce image noise while preserving edge features. Then, adaptive contrast enhancement is performed on the luminance component in the LAB color space, and non-linear stretching is applied to the pixel values ​​in the highlight and shadow areas respectively.

[0022] Image sequence generation steps: Arrange the denoised and color-corrected image frames in chronological order to construct a continuous preprocessed image sequence. Each image frame is accompanied by a timestamp and camera location identifier, forming an image data set with spatiotemporal correlation.

[0023] In the dynamic interference suppression and foreground segmentation module, the dynamic background reference frame generation step involves: for each pixel in the preprocessed image sequence, establishing and maintaining a sample set containing 50 historical pixel values. The sample set is constructed as follows: from the first 100 frames of the video sequence, 50 pixel values ​​at different time points are randomly selected as initial samples for each pixel. In subsequent processing, for each new frame where a pixel is not identified as foreground, its current pixel value is added to its own sample set with a 1% probability, and its pixel value is also randomly added to the sample sets of neighboring pixels with a 1% probability. The sample set is updated using a first-in, first-out (FIFO) strategy, maintaining a constant sample size of 50. The dynamic background reference frame is obtained by calculating the median value of the sample set corresponding to each pixel; that is, after sorting the 50 sample values ​​for each pixel, the 25th sample value is taken as the background reference value for that pixel.

[0024] Binarized motion region acquisition steps: Calculate the absolute differences between the current frame and the dynamic background reference frame in the red, green, and blue color channels. Weight the differences in the three channels with weights of 0.3, 0.6, and 0.1 respectively, and sum them to generate a comprehensive difference map. Based on the standard deviation of pixel values ​​within an 11×11 neighborhood of each pixel in the comprehensive difference map, dynamically calculate the difference threshold for that pixel. The threshold calculation formula is: base threshold 0.15 plus the neighborhood standard deviation multiplied by a coefficient of 0.05. Mark the regions in the comprehensive difference map where pixel values ​​are greater than the corresponding threshold as foreground, thus obtaining the initial binarized motion region.

[0025] Motion interference filtering steps: The predefined inherent moving part mask of the car wash machine is obtained as follows: A video sequence of 100 frames continuously being captured under fire-free conditions showing the car wash machine operating normally is obtained. The frequency of each pixel being identified as a moving region is counted, and pixel regions with a frequency exceeding 80% are marked as inherent moving part regions. A logical subtraction operation is performed between the initial binarized motion region and the inherent moving part mask, that is, all pixels located within the inherent moving part mask are removed from the initial binarized motion region to obtain candidate real moving foreground regions.

[0026] Region refinement processing steps: For the candidate true moving foreground regions obtained after interference filtering, calculate the motion vector of each connected region within it over 5 consecutive frames. The motion vector is obtained by calculating the centroid displacement of the same connected region between adjacent frames, and the centroid coordinates are calculated by averaging the coordinates of all pixels within the region. For each connected region, analyze the standard deviation of its internal pixels in the red channel. If the standard deviation is less than 15 and the change in motion vector direction exceeds 60 degrees, the region is determined to be a true moving foreground region. The final output true moving foreground region must meet the conditions of having an area greater than 100 pixels and motion lasting for more than 3 frames.

[0027] In the multimodal suspected region generation module, the specific process of extracting suspected flame regions from the real moving foreground region is as follows: First, each pixel is judged in the RGB color space, requiring that the red component R is greater than the green component G, and the green component G is not less than the blue component B. Simultaneously, the saturation S of each pixel is calculated in the HSV color space, and the saturation threshold is determined by statistically analyzing the 70th percentile of the saturation values ​​of all pixels in the current frame. The brightness change rate is calculated using a sequence of brightness values ​​from five consecutive frames, and the slope is obtained through linear regression. Pixels with a slope greater than 0.05 are considered to meet the brightness change condition. The set of pixels that simultaneously meet the color rule and the brightness change condition is used as the initial flame candidate region.

[0028] The extraction of suspected smoke regions is based on dark channel prior theory and chromaticity analysis. The calculation formula for dark channel images is: ;in, Represents the pixel values ​​of the dark channel image. Represented in pixels A 15×15 neighborhood centered on the center, Indicates in color channel pixel values ​​on Representing the red channel, Represents a green channel. This represents the blue channel. A first preset threshold is set to 0.25, and regions with dark channel values ​​below this threshold are marked as potential smoke regions. In the YUV color space, chromaticity clustering analysis uses the K-means algorithm, with 3 clusters. Regions whose cluster centers fall within the intervals Cb∈[100,120] and Cr∈[130,150] are selected as chromaticity candidate regions. The intersection of potential smoke regions and chromaticity candidate regions is defined as the initial smoke candidate region.

[0029] Morphological processing was performed on the initial flame and smoke candidate regions respectively. First, an opening operation was performed using a 3×3 circular structuring element to eliminate isolated regions with an area smaller than 7 pixels. The mathematical expression for the opening operation is: ;in Indicates the input image. Represents a structural element. This indicates a corrosion operation. This represents the expansion operation. Then, the same structuring element is used for the closing operation to fill the holes inside the region. The mathematical expression for the closing operation is: After morphological optimization, the final suspected flame area and suspected smoke area are output.

[0030] In the multi-dimensional feature fusion module, texture features are extracted within the suspected flame region using sliding windows of three different sizes: 3×3, 7×7, and 15×15 pixels. For each window location, its local binary mode value is calculated using the following formula: ;in Indicates the number of neighboring pixels. Represents the neighborhood radius. The grayscale value of the center pixel. For each neighboring pixel grayscale value, a histogram of all LBP values ​​is plotted for each window size. The histograms of the three sizes are then concatenated to form a 36-dimensional feature vector. Simultaneously, the contrast feature of each pixel value within the window is calculated using the following formula: ;in The standard deviation of the pixel values ​​within the window. The mean, This is used to avoid division by zero errors. The final result is a 42-dimensional multi-scale texture feature vector containing texture mode and contrast information.

[0031] In a five-frame image sequence, each suspected flame region is labeled with connected components. The total number of pixels within each connected component is counted as the region area for that frame, constructing an area sequence A1, A2, ..., A5. The relative change in area between adjacent frames is calculated as the ratio of the absolute value of the difference in area between adjacent frames to the previous frame. A weighted moving average is used to process the change sequence, with weight coefficients [0.1, 0.2, 0.4, 0.2, 0.1], to obtain the area change rate feature. Simultaneously, the minimum bounding rectangle of the region in each frame is extracted, and the displacement of the center point of the rectangle between adjacent frames is calculated. and aspect ratio change Contour fluctuation index The calculation formula is: ; where displacement Scale change in pixels It is a dimensionless ratio. Indicates the first frame.

[0032] Multi-scale texture features, area change rate, and contour fluctuation index are normalized. Texture features are normalized using maximum-minimum normalization, calculated as the ratio of the difference between the current value and the minimum value to the difference between the maximum and minimum values. Dynamic features are normalized using Z-score normalization, calculated as the ratio of the difference between the current value and the feature mean to the standard deviation. The normalized features are concatenated in the following order: the first 42 dimensions are texture features, the 43rd dimension is the area change rate, and the 44th dimension is the contour fluctuation index, forming a 44-dimensional flame feature vector.

[0033] The suspected smoke area is divided into 4×4 non-overlapping sub-blocks, with the size of each sub-block adaptively adjusted according to the total area of ​​the region. For each sub-block, the distribution characteristics of the three color channels are calculated in the RGB color space. First, the mean and standard deviation of each channel are calculated; simultaneously, the Baumel coefficient between the color distribution histograms of each sub-block is calculated using the following formula: ;in , This is a normalized color histogram of adjacent sub-blocks. The number of bins in the histogram. Indicates the first Histogram bin This represents the Bartholomew's coefficient. The final result is a 48-dimensional color statistical feature including mean, standard deviation, and similarity.

[0034] To calculate the gradient magnitude and direction of the suspected smoke region, the Sobel operator is first used. This operator contains two convolution templates: the coefficients of the horizontal convolution template, from left to right and top to bottom, are -1, 0, 1, -2, 0, 2, -1, 0, 1; the coefficients of the vertical convolution template, from left to right and top to bottom, are -1, -2, -1, 0, 0, 0, 1, 2, 1. These two convolution templates are then convolved with the input image to obtain the horizontal and vertical gradient values.

[0035] The gradient magnitude is calculated as follows: square the horizontal and vertical gradient values ​​of each pixel, sum them, and then take the square root of the sum. The gradient direction is calculated as follows: for each pixel, use a two-parameter arctangent function, with the vertical gradient value as the first parameter and the horizontal gradient value as the second parameter. The result is expressed in radians and then converted to angles.

[0036] The 360-degree directional range is evenly divided into 8 intervals, each covering 45 degrees. The gradient magnitude of all pixels within each directional interval is summed to obtain 8 gradient direction statistics. The standard deviation and arithmetic mean of these 8 statistics are calculated, and the gradient direction distribution ratio is obtained by dividing the standard deviation by the arithmetic mean. Finally, the 8 gradient direction statistics and the gradient direction distribution ratio together constitute a 9-dimensional gradient direction feature.

[0037] The 48-dimensional color statistical features and the 9-dimensional gradient direction features were subjected to maximum and minimum value normalization. The normalization method is to subtract the minimum value of the feature values ​​of the dimension from all feature values ​​of the dimension, and then divide by the difference between the maximum and minimum values ​​of the feature values ​​of the dimension.

[0038] Before feature concatenation, the distribution similarity component in the color statistical features undergoes a logarithmic transformation. The transformation method involves adding 1 to the original feature value and then taking the natural logarithm. This process enhances the discriminative power of the features.

[0039] The processed 48-dimensional color statistical features and 9-dimensional gradient direction features are concatenated in the order of color features first, followed by gradient features, to form a 57-dimensional smoke feature vector. This feature vector contains both the color distribution characteristics and texture direction characteristics of the smoke, which are used for subsequent classification and recognition processing.

[0040] In the fire and smoke recognition and output module, the flame feature vector and the smoke feature vector are used as independent inputs to the fire and smoke classification model built on support vector machine. The cross-entropy loss between the predicted probability value and the true labeled probability value is used as the training objective of the fire and smoke classification model. The fire and smoke classification model is trained, and the corresponding fire probability value and smoke probability value are output according to the trained fire and smoke classification model.

[0041] The construction process of the fire smoke classification model is as follows: Flame and smoke feature vectors from historical monitoring data were collected and combined with manually labeled real fire and smoke states as target labels to construct a historical training dataset. The entire dataset was divided into training and validation subsets according to a preset ratio for parameter learning and performance validation of the fire and smoke classification model, respectively. The support vector machine algorithm was used to construct the fire and smoke classification model, and the kernel function type, penalty factor, and kernel function parameters were set as key hyperparameters. During training, the support vectors were solved using the sequence minimum optimization algorithm to determine the optimal classification hyperplane, and nonlinear mapping was performed in the feature space to handle complex feature distributions. The particle swarm optimization algorithm was introduced to automatically optimize the hyperparameters of the fire and smoke classification model. After each training iteration, the cross-entropy loss between the predicted result and the real label was calculated. When the cross-entropy loss on the validation subset tended to stabilize and reached a preset threshold, the training of the fire and smoke classification model was completed. The trained fire and smoke classification model was deployed to the car wash machine construction monitoring system, which received input data composed of flame and smoke feature vectors in real time and output the corresponding fire probability value and smoke probability value.

[0042] The thresholds for determining the probability values ​​of fire and smoke were determined through historical data statistics. The fire probability threshold was 0.85, and the smoke probability threshold was 0.75. A fire was determined to exist when the fire probability value was greater than or equal to 0.85; smoke was determined to exist when the smoke probability value was greater than or equal to 0.75. If both conditions were met simultaneously, both fire and smoke categories were recorded in the structured recognition results. The probability values ​​were compared frame-by-frame independently, ensuring that the processing results of each video frame did not affect each other.

[0043] A mapping relationship is established between the probability values ​​of identifying a fire or smoke and the corresponding suspected areas. The coordinates of the minimum bounding rectangle of each suspected area are obtained using a region labeling algorithm, and the coordinates of the top-left vertex (x1, y1) and bottom-right vertex (x2, y2) of the rectangle are recorded. Simultaneously, the centroid coordinates of the area are calculated, obtained by the arithmetic mean of the coordinates of all pixels within the area. For areas containing both fire and smoke, the probability values ​​and location information corresponding to each category are recorded separately.

[0044] The recognition results are encapsulated in JSON format and include the following fields: category label ("fire" or "smoke"), probability value (a floating-point number between 0.85 and 1.00), timestamp (accurate to milliseconds), and location information (including centroid coordinates and bounding box coordinates). In the location information, the centroid coordinates are represented as {"center_x": value, "center_y": value}, and the bounding box coordinates are represented as {"x1": value, "y1": value, "x2": value, "y2": value}. All coordinate values ​​are integers, representing the pixel position in the image.

[0045] The structured recognition results are sent to the designated data receiving interface. Each recognition result is transmitted as an independent data packet. Simultaneously, a complete recognition result, including image frame number, processing time, recognition result, and other detailed information, is recorded in a local log file. The log file is automatically updated every 24 hours.

[0046] The working principle of this invention is as follows: High-definition network cameras deployed inside the car wash tunnel continuously capture video streams of the construction area. Image enhancement processing is performed on the video streams to obtain a preprocessed image sequence. Dynamic background modeling combined with predefined masks of the car wash's inherent moving parts is used for foreground segmentation to extract the real moving foreground region. Based on color space analysis and dark channel theory, suspected flame and smoke regions are extracted in parallel from the moving foreground region. Static texture features and dynamic shape change features of the flame region are extracted to form a flame feature vector. Color statistical features and gradient direction features of the smoke region are used to form a smoke feature vector. The feature vectors are input into a support vector machine classification model to obtain fire and smoke probability values. When the probability value exceeds a set threshold, a structured recognition result containing category labels, confidence levels, and location information is output.

[0047] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A computer vision-based real-time fire smoke detection and identification system for car washing machine construction, characterized in that, The method comprises the following steps: An image acquisition and preprocessing module is used to acquire a monitoring video stream of a car washing machine construction area in real time, and to perform image enhancement processing on the video stream to obtain a preprocessed image sequence; A dynamic interference suppression and foreground segmentation step module is used to perform background modeling and foreground analysis on the preprocessed image sequence, to segment out a real motion foreground area caused by potential fire smoke by calculating the difference between a current frame and a background reference frame and combining a predefined mask of inherent motion components of the car washing machine; A multi-modal suspected area generation module is used to extract a suspected flame area and a suspected smoke area from the real motion foreground area in parallel; A multi-dimensional feature fusion module is used to extract static texture features and dynamic shape change features of the suspected flame area to form a flame feature vector, and to extract color statistical features and gradient direction features of the suspected smoke area to form a smoke feature vector; A fire smoke identification and result output module is used to input the flame feature vector and the smoke feature vector into a pre-trained fire smoke classification model respectively, to output a fire probability value and a smoke probability value; when any of the probability values exceeds a corresponding threshold value, it is determined that there is a fire or smoke, the probability values include the fire probability value and the smoke probability value, and a structured identification result containing category and location information is output.

2. The computer vision-based carwash construction real-time fire smoke detection and identification system of claim 1, wherein, The identification process of the real motion foreground area is as follows: For the preprocessed image sequence, a method based on the statistical distribution of pixel values in the time domain is used to establish and maintain a sample set containing multiple possible background values for each pixel point, and a dynamic background reference frame is generated by incorporating the scene light changes through a random update strategy; The color and brightness differences between the current frame and the dynamic background reference frame at each pixel position are calculated to obtain a preliminary binary motion area; A logical subtraction operation is performed on the preliminary binary motion area and the predefined mask of inherent motion components of the car washing machine to obtain a candidate real motion foreground area; Multi-scale motion consistency verification is performed on the candidate real motion foreground area to analyze the motion vector consistency of its internal area between consecutive frames, and the color uniformity of the area is fused to remove small and discrete false motion areas caused by water splashing and local reflections, and finally the real motion foreground area is output.

3. The computer vision-based carwash construction real-time fire smoke detection and identification system of claim 2, wherein, The preliminary binary motion area is obtained by the following steps: The absolute difference values of the current frame and the dynamic background reference frame in multiple color channels are calculated respectively, and the absolute difference values are fused by weighting to generate a comprehensive difference map; The difference threshold of each pixel is dynamically calculated according to the local contrast in the neighborhood of each pixel in the comprehensive difference map to generate an initial binary motion area that can suppress texture noise; The largest connected region with the largest difference value in the initial binary motion area is taken as a seed point, and region growing is performed based on the similarity of the difference values between adjacent pixels to eliminate internal cavities and discrete artifacts in the grown region, and finally the preliminary binary motion area is obtained.

4. The computer vision based carwash construction real-time fire smoke detection and identification system of claim 1, wherein, The suspected flame area and the suspected smoke area are extracted by the following steps: Verify whether each pixel of the real motion foreground region is greater than the green component and the blue component in the RGB color space, and verify whether the saturation of each pixel of the real motion foreground region is higher than a dynamically calculated saturation threshold in the HSV color space; a pixel set that simultaneously satisfies the color rule and has a luminance change rate exceeding a preset threshold in the region is defined as an initial flame candidate region; Calculate a dark channel image of the real motion foreground region, and preliminarily identify a region with a dark channel value lower than a first preset threshold as a potential smoke region; perform chroma clustering analysis on the real motion foreground region in the YUV color space, and identify a region with a chroma value concentrated in a preset smoke characteristic chroma interval as a chroma candidate region; an intersection of the potential smoke region and the chroma candidate region is defined as an initial smoke candidate region; Perform morphological opening operation and then morphological closing operation on the initial flame candidate region and the initial smoke candidate region respectively, and output a suspected flame region and a suspected smoke region.

5. The computer vision based carwash construction real-time fire smoke detection and identification system of claim 1, wherein, The generation process of the flame feature vector is as follows: In the suspected flame region, local binary texture statistical values in each window are calculated by using sliding windows of different sizes, and multi-scale texture features representing flame texture roughness and contrast are obtained by counting the distribution histogram of different texture modes in each window; In a continuous frame sequence, an area change rate and a contour fluctuation index of the suspected flame region are calculated; The multi-scale texture features, the area change rate and the contour fluctuation index are normalized and spliced and combined in a preset order to form a flame feature vector representing the static texture characteristics and the dynamic shape change characteristics of the flame.

6. The computer vision-based carwash construction real-time fire smoke detection and identification system of claim 5, wherein, The calculation of the area change rate and the contour fluctuation index of the suspected flame region specifically includes: In a continuous frame sequence, connected domain analysis is performed on the suspected flame region, the total number of pixels in each connected domain is counted as the area of the region in the corresponding continuous frame, and sequence data of the area change over time is constructed; Based on the sequence data of the area change over time, the relative change amount of the area between adjacent frames is calculated, and a weighted moving average processing is performed on the change amounts between a plurality of continuous frames, and the mean value of the processed change amounts is taken as the area change rate; The minimum bounding rectangle of the suspected flame region in each continuous frame is extracted, the center point displacement and the length-width ratio change amount of the minimum bounding rectangle between adjacent frames are calculated, and the product of the displacement and the ratio change amount is taken as the contour fluctuation index.

7. The computer vision based carwash construction real-time fire smoke detection and identification system of claim 1, wherein, The formation of the smoke feature vector specifically includes: The suspected smoke region is divided into a plurality of non-overlapping sub-blocks, the value distribution of the pixels in each sub-block in a plurality of color channels is calculated, the similarity and the distribution width between the color distribution histograms of the sub-blocks are counted, and color statistical features representing the color uniformity and the diffusion characteristics of the smoke are obtained; The gradient amplitude and direction of the suspected smoke region are calculated, the direction range is divided into a plurality of intervals, the amplitude cumulative sum in each gradient direction interval is counted, and the ratio of the standard deviation to the mean value of the amplitude cumulative sum in each interval is calculated to obtain a gradient direction feature representing the degree of disorder of the smoke texture direction; After the color statistical features and the gradient direction features are normalized, the normalized features are spliced and combined according to a preset dimension order to form a smoke feature vector containing both the color distribution characteristics and the texture direction characteristics of the smoke.

8. The computer vision based carwash construction real-time fire smoke detection and identification system of claim 1, wherein, The flame feature vector and the smoke feature vector are respectively input into a pre-trained fire smoke classification model to output a fire probability value and a smoke probability value, and the specific operations include the following steps. The flame feature vector and the smoke feature vector are respectively taken as independent inputs and input into a fire smoke classification model based on a support vector machine, and a cross-entropy loss between a predicted probability value and a real labeled probability value is minimized as a training target of the fire smoke classification model, so that the fire smoke classification model is trained, and the corresponding fire probability value and smoke probability value are respectively output according to the trained fire smoke classification model.

9. The computer vision-based carwash construction real-time fire smoke detection and identification system of claim 8, wherein, The construction process of the fire smoke classification model includes the following steps. The flame feature vectors and the smoke feature vectors in historical monitoring data are collected, and real fire state and smoke state artificially labeled as target labels are combined to construct a historical training data set; the entire data set is divided into a training subset and a verification subset according to a preset proportion, and is respectively used for parameter learning and performance verification of the fire smoke classification model; The support vector machine algorithm is used to construct the fire smoke classification model, and a kernel function type, a penalty factor and a kernel function parameter are set as key hyperparameters; in the training process, support vectors are solved by a sequential minimal optimization algorithm to determine an optimal classification hyperplane, and a non-linear mapping is performed in a feature space to process complex feature distribution; a particle swarm optimization algorithm is introduced to automatically optimize hyperparameters of the fire smoke classification model; after each training iteration, a cross-entropy loss between a predicted result and a real label is calculated; when the cross-entropy loss on the verification subset tends to be stable and reaches a preset threshold, the training of the fire smoke classification model is completed; the trained fire smoke classification model is deployed into a car washer construction monitoring system to receive input data composed of the flame feature vector and the smoke feature vector in real time, and output corresponding fire probability value and smoke probability value.

Citation Information

Patent Citations

  • Smog detection method and device based on video analysis

    CN106897720A

  • An early forest fire detection method based on a video image

    CN109165577A

  • Flame and smoke abnormal condition detection method and system

    CN111126293A

  • Foreground pixel extraction method and system based on combination of frame difference method and background difference method

    CN111260684A

  • VR video real-time detection method for garden monitoring

    CN112132124A