A vehicle fire machine vision identification method based on deep learning

The deep learning-based vehicle fire identification method utilizes semantic segmentation and correlation analysis to match the optimal environmental reference block, calculate the temperature rise rate ratio and temperature change residual, and solves the accuracy problem of vehicle fire identification under strong light conditions. It achieves high-confidence extraction and accurate identification of early weak fire features.

CN123142173APending Publication Date: 2026-11-20ROPEOK TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611544831.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-08
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing outdoor vehicle fire monitoring methods are prone to false alarms under strong light conditions and cannot effectively eliminate passive temperature rise interference caused by ambient light, resulting in reduced accuracy and reliability of vehicle fire identification.

Method used

A deep learning-based machine vision method for vehicle fire identification is adopted. By acquiring visible light images and temperature data in real time, semantic segmentation and correlation analysis are used to match the best environmental reference block, calculate the temperature rise rate ratio and temperature change residual, and combine the abnormal temperature change index to identify the fire.

Benefits of technology

It effectively eliminates the static temperature baseline deviation caused by material emissivity differences, removes ambient light and heat interference, improves the accuracy and reliability of fire identification, and can identify weak fire characteristics at an early stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123142173A_ABST
    Figure CN123142173A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a vehicle fire machine vision identification method based on deep learning, which comprises the following steps: acquiring a visible light image of a vehicle environment and temperatures of all pixel points in real time; segmenting the image to obtain vehicle and environment pixel blocks, and matching the best environment reference block for the vehicle pixel block based on temperature variation rate correlation; calculating the temperature rise amplitude ratio of the vehicle pixel block and the reference block by using linear regression, and combining the temperature variation rate to calculate a temperature variation residual; weighting the temperature variation residual according to the temperature variation rate correlation to obtain an abnormal temperature variation index representing fire hazard; and performing connected domain detection and feature verification based on the abnormal temperature variation index to determine a fire identification result. The application solves the problems of false positives of traditional fire monitoring and missed early fire source reporting in an outdoor strong light environment, and improves the accuracy and reliability of vehicle fire identification in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to a machine vision recognition method for vehicle fires based on deep learning. Background Technology

[0002] With the increasing prevalence of new energy vehicles and outdoor charging facilities, the demand for vehicle fire monitoring in uncontrolled outdoor environments is growing. Current outdoor fire monitoring primarily relies on infrared thermal imaging technology, using fixed temperature thresholds to determine the presence of abnormal heat sources. However, in outdoor scenarios, solar radiation is the primary source of thermal interference. During sunny weather or periods of intense sunlight, vehicle surfaces (especially metal bodies) and the surrounding environment (such as concrete roads and buildings) experience significant temperature increases due to the absorption of solar radiation. This environment-driven "passive temperature rise" often causes the surface temperature of objects to rapidly exceed conventional fire warning thresholds.

[0003] Traditional background subtraction methods attempt to eliminate interference by subtracting the average ambient temperature. However, due to fundamental differences in specific heat capacity, thermal conductivity, and surface heat absorption coefficient between vehicle materials (metal, rubber, glass) and the ambient background (concrete, soil), their heating rates and magnitudes under the same illumination conditions are not consistent (for example, dark-colored metallic car bodies typically heat up faster than light-colored concrete pavements). Therefore, traditional background subtraction cannot effectively eliminate asynchronous passive temperature rise components, leading to false alarms under strong light and reducing the accuracy and reliability of vehicle fire detection. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a deep learning-based machine vision recognition method for vehicle fires, thereby resolving the existing issues.

[0005] The machine vision method for vehicle fire recognition based on deep learning proposed in this application adopts the following technical solution: One embodiment of this application provides a machine vision recognition method for vehicle fires based on deep learning, the method comprising the following steps: S1: Real-time acquisition of visible light images of the fire environment containing vehicles and the temperature at each pixel. S2: Segment the visible light image into multiple pixel blocks, use a semantic segmentation algorithm to divide the visible light image into vehicle image and environment image, analyze the correlation between each pixel block in the vehicle image and each pixel block in the environment image in terms of instantaneous temperature change rate, and select the best environment reference block for each pixel block in the vehicle image from all pixel blocks in the environment image. S3: Based on the instantaneous temperature change rate of each pixel block in the vehicle image and its best environmental reference block, use linear regression to calculate the temperature rise ratio, and combine it with the instantaneous temperature change rate of each pixel block in the vehicle image to calculate the temperature change residual of each pixel block in the vehicle image. S4: Based on the correlation between each pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate, the temperature change residual is weighted to obtain the abnormal temperature change index of each pixel block in the vehicle image, which is used to characterize the comprehensive fire hazard of the vehicle area corresponding to the pixel block. S5: Based on the abnormal temperature change index, perform connected component detection and feature verification on vehicle images to determine the fire situation of the vehicle.

[0006] Preferably, before segmenting the visible light image into multiple pixel blocks, the process further includes steps for determining the vehicle's motion state in the fire environment and controlling the vehicle fire identification process, specifically: Calculate the absolute difference in grayscale values ​​of pixels at the same location between a visible light image and its temporally adjacent previous visible light image. The percentage of pixels with an absolute difference greater than a preset brightness change threshold in the visible light image is calculated. If the percentage is greater than a preset stationary threshold, the fire environment is determined to be in motion, and vehicle fire identification is not performed. Otherwise, the fire environment is determined to be in a stationary state, and steps S2-S5 are performed on the visible light image to identify the vehicle fire.

[0007] Preferably, the step of selecting the optimal environmental reference block for each pixel block in the vehicle image from all pixel blocks of the environmental image includes: Calculate the correlation coefficient between each pixel block in the vehicle image and all pixel blocks in the environment image on the instantaneous rate of temperature change. The pixel block in the environment image corresponding to the largest correlation coefficient is taken as the best environment reference block for each pixel block in the vehicle image.

[0008] Preferably, the calculation process for the temperature rise rate ratio is as follows: If the correlation coefficient between the i-th pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate is less than a preset correlation threshold, then the temperature rise rate ratio of the i-th pixel block is set to 1. Conversely, the instantaneous temperature change rate of all pixels in the i-th pixel block of the vehicle image and the instantaneous temperature change rate of all pixels in the best environmental reference block of the i-th pixel block are used as the dependent and independent variables in the fitting algorithm, respectively. The slope of the fitted line is used as the temperature rise rate of the i-th pixel block in the vehicle image. The temperature rise rate of each pixel block is obtained by traversing all pixel blocks in the vehicle image.

[0009] Preferably, the calculation process for the temperature variation residual of each pixel block in the vehicle image is as follows: The theoretical passive temperature rise value is the result of multiplying the temperature rise rate of each pixel block in the vehicle image by the average instantaneous temperature change rate of all pixels in the corresponding optimal environment reference block. Calculate the difference between the mean of the instantaneous temperature change rate of all pixels in each pixel block of the vehicle image and the theoretical passive temperature rise value. If the difference is greater than or equal to the preset noise floor threshold, the difference is used as the temperature change residual of each pixel block in the vehicle image; otherwise, the temperature change residual of each pixel block in the vehicle image is set to 0.

[0010] Preferably, the method for obtaining the abnormal temperature change index is as follows: Based on the correlation between each pixel block in the vehicle image and its best environmental reference block in terms of the instantaneous rate of temperature change, the correlation weighting coefficient of each pixel block in the vehicle image is determined. The product of the temperature variation residual of each pixel block in the vehicle image and the correlation weighting coefficient is used as the abnormal temperature variation index of each pixel block in the vehicle image.

[0011] Preferably, the expression for the correlation weighting coefficient of each pixel block in the vehicle image is: In the formula, Represents the correlation weighting coefficient of pixel block i in the vehicle image; This represents the correlation coefficient between pixel block i in the vehicle image and its optimal environmental reference block in terms of the instantaneous rate of temperature change. This represents a very small constant that is pre-defined as being greater than 0; This indicates the preset penalty index; max() represents the maximum value function.

[0012] Preferably, the step of performing connected component detection and feature verification on vehicle images based on abnormal temperature change index to determine the vehicle fire situation specifically includes: Replace the pixel values ​​of all pixels in each pixel block of the vehicle image with the abnormal temperature change index of the corresponding pixel block. Record the replaced image as the abnormal temperature change index map. Perform binarization on the abnormal temperature change index map. Use the connected component labeling algorithm on the binarized image to obtain candidate abnormal high temperature regions. Calculate the average abnormal temperature change index of all pixel blocks in each candidate abnormal high temperature region, and record the average correlation coefficient between all pixel blocks and their best environmental reference block on the instantaneous rate of temperature change as the correlation mean. Based on the average abnormal temperature change index and the mean correlation, the fire situation of vehicles in candidate abnormal high temperature areas is determined.

[0013] Preferably, the process of obtaining candidate abnormal high-temperature regions by using a connected component labeling algorithm on the binarized image is as follows: A connected component labeling algorithm is used to extract all connected components in the binarized image and calculate their areas. Connected components with areas greater than or equal to a preset area threshold are selected as candidate abnormal high temperature regions.

[0014] Preferably, determining the vehicle fire situation in the candidate abnormal high temperature area further includes: If the average abnormal temperature change index of the current candidate abnormal high temperature area is greater than the preset fire alarm trigger threshold and the average correlation value is less than the preset independence threshold, then the current candidate abnormal high temperature area is determined to be a suspected fire source area; otherwise, the current candidate abnormal high temperature area is determined to be a non-fire source area.

[0015] This application has at least the following beneficial effects: This application first avoids the temporal analysis misalignment caused by vehicle movement by detecting static state, and then uses semantic segmentation and correlation analysis to match the best environmental reference block for vehicle pixel blocks based on the instantaneous temperature change rate. This method effectively eliminates the static temperature baseline deviation caused by material emissivity differences, establishes a refined "point-to-point" reference relationship, and ensures that the subsequent temperature difference analysis is based on the relative deviation under the same thermal response law, which helps to improve the accuracy of fire identification. Furthermore, this application quantifies the difference in thermal response between the vehicle and the environment by calculating the temperature rise ratio through correlation verification and linear regression. Then, it uses the theoretical passive temperature rise value to remove the ambient light and heat interference and calculates the temperature change residual. This method effectively eliminates the background noise caused by material heat absorption differences and environmental temperature rise, avoids the risk of misjudgment in non-heating scenarios, and accurately extracts the abnormal heating characteristics of the vehicle that are independent of the environment, which helps to improve the accuracy of fire identification. Furthermore, this application constructs a correlation weighting coefficient by utilizing the correlation between vehicle and environmental temperature change trends, and performs nonlinear enhancement processing on the temperature change residual to obtain an abnormal temperature change index. This method effectively suppresses background interference that is highly synchronized with ambient light, while significantly amplifying the abnormal temperature rise signal with independent heat source characteristics, thus achieving high-confidence extraction of early weak fire characteristics. Ultimately, this application constructs a temperature difference map based on the abnormal temperature change index, uses connected component detection to screen candidate regions, and combines the average abnormal temperature change index and the mean correlation value for dual feature verification and time series persistence verification, effectively eliminating random noise and passive high temperature interference, and improving the accuracy and reliability of vehicle fire information. Attached Figure Description

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

[0017] Figure 1 A flowchart illustrating the steps of a machine vision method for vehicle fire identification based on deep learning, provided as an embodiment of this application; Figure 2 A flowchart illustrating the temperature rise rate calculation process provided in one embodiment of this application. Detailed Implementation

[0018] To further illustrate the technical means and effects adopted by this application to achieve the intended purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a deep learning-based machine vision recognition method for vehicle fires proposed in this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0020] The following description, in conjunction with the accompanying drawings, details a specific scheme for a deep learning-based machine vision recognition method for vehicle fires provided in this application.

[0021] This application provides an embodiment of a deep learning-based machine vision method for recognizing vehicle fires. Specifically, it provides the following deep learning-based machine vision method for recognizing vehicle fires. Please refer to [link to relevant documentation]. Figure 1 The method includes the following steps: Step S1: Real-time acquisition of visible light images of the fire environment containing the vehicle and the temperature at each pixel.

[0022] First, the visible light camera and infrared thermal imager are activated to acquire visible light and infrared thermal image streams of the fire environment containing the vehicle, respectively. Due to differences in the physical installation location and field of view of the two sensors, spatial pixel-level alignment is necessary. Specifically, using a pre-calibrated homography matrix, each frame of the infrared thermal image is mapped to the coordinate system of the visible light image. After mapping, a temperature matrix with the same resolution as the visible light image is generated. In this matrix, the coordinates... The value at that point represents the actual surface temperature (in degrees Celsius) of that pixel in the visible light image. This alignment operation ensures that in subsequent steps, each region divided based on the visible light image can accurately correspond to its temperature data.

[0023] Step S2: Segment the visible light image into multiple pixel blocks. Use a semantic segmentation algorithm to divide the visible light image into a vehicle image and an environment image. Analyze the correlation between each pixel block in the vehicle image and each pixel block in the environment image in terms of instantaneous temperature change rate. Select the best environment reference block for each pixel block in the vehicle image from all pixel blocks in the environment image.

[0024] To avoid misalignment between spatial coordinates and physical objects caused by vehicle movement (such as entering, exiting, or reversing) (i.e., the same coordinates corresponding to the vehicle body and background at different times), static state detection must be performed first. Specifically: Calculate the absolute difference in grayscale values ​​of pixels at the same location between a visible light image and its temporally adjacent previous visible light image. The percentage of pixels with an absolute difference greater than a preset brightness change threshold in the visible light image is calculated. If the percentage is greater than a preset stationary threshold, the fire environment is determined to be in motion, and vehicle fire identification is not performed. Otherwise, the fire environment is determined to be in a stationary state, and steps S2-S5 are performed on the visible light image to identify the vehicle fire.

[0025] It should be noted that the preset brightness change threshold and the preset stillness threshold are both set manually. In this embodiment, the preset brightness change threshold is set to 20, which is intended to filter out low-amplitude grayscale oscillations caused by sensor thermal noise, weak ambient light fluctuations (such as shadow changes caused by swaying leaves), or encoding compression artifacts. At the same time, it ensures that it can keenly capture substantial brightness changes caused by vehicles entering, leaving, or large displacements. If the value is too small, a large number of background noise points will be misjudged as motion signals, causing the system to reset frequently. If the value is too large, it may ignore slow vehicle movement or low-contrast motion, causing stillness detection to fail and thus introducing incorrect timing data. Therefore, the implementer can adjust it within the range of 10 to 40 according to the camera signal-to-noise ratio, ambient light stability, and motion detection sensitivity requirements. The preset static threshold is set to 0.05, an empirical value determined based on common environmental dynamic characteristics in outdoor monitoring scenarios. This value is designed to tolerate unavoidable minor dynamic disturbances in the environment (such as leaves swaying in the wind, reflections on water, or small-scale movements of pedestrians in the distance). These disturbances typically account for only a very small proportion of the image pixels, while ensuring that substantial scene changes (usually involving large-scale pixel changes) caused by vehicles entering, leaving, or moving significantly are accurately captured. If the value is too small, the above-mentioned normal environmental background movements will be misjudged as vehicle movements, leading to frequent clearing of the historical data queue and failure to accumulate effective data. If the value is too large, the slow movement of vehicles at the edge of the image or minor vehicle maneuvers may be ignored, causing static detection to fail and introducing incorrect time-series analysis data. Implementers can make adaptive adjustments within the range of 0.03 to 0.10 according to the proportion of dynamic background in the actual monitoring field of view (e.g., it can be appropriately increased in windy environments and appropriately decreased in quiet indoor environments).

[0026] Furthermore, considering the situation where the vehicle is stationary in a fire environment, the following steps should be taken: First, the visible light image is uniformly divided into multiple pixel blocks, each with a size of 32×32. In practical applications, the implementer can set this size according to specific circumstances; this embodiment does not impose any special limitations. Further, a semantic segmentation algorithm is used to divide the visible light image into vehicle images and environment images. Specifically: In this embodiment, visible light images are used as input to a pre-trained semantic segmentation network model, and vehicle images and environment images are output. The vehicle images accurately cover areas such as the vehicle body, tires, and glass; the environment background images accurately cover fixed backgrounds such as roads, walls, and vegetation.

[0027] The pre-training process of the semantic segmentation network model and the process of using the pre-trained semantic segmentation network model to segment the foreground and background of visible light images are well-known techniques and will not be elaborated further.

[0028] Furthermore, to eliminate static temperature baseline deviations caused by differences in material emissivity (e.g., the base temperature of black tires is naturally higher than that of a white car body), the direct comparison strategy of absolute temperature is abandoned. Instead, the instantaneous rate of temperature change (i.e., the first derivative of temperature with respect to time) is used as the basis for analysis. By analyzing the correlation between the instantaneous rate of temperature change of each pixel block in the vehicle image and each pixel block in the environment image, the optimal environmental reference block for each pixel block in the vehicle image is selected from all pixel blocks in the environment image. Specifically: In this embodiment, the correlation coefficient between each pixel block in the vehicle image and all pixel blocks in the environment image on the instantaneous rate of temperature change is calculated, and the pixel block in the environment image corresponding to the largest correlation coefficient is taken as the best environment reference block for each pixel block in the vehicle image.

[0029] It should be noted that there are many commonly used methods for calculating correlation coefficients. In this embodiment, the Pearson correlation coefficient between each pixel block in the vehicle image and all pixel blocks in the environment image on the instantaneous rate of temperature change is used as the correlation coefficient between each pixel block in the vehicle image and all pixel blocks in the environment image on the instantaneous rate of temperature change. In practical applications, as other implementation methods, implementers may also use the Spearman correlation coefficient or other correlation coefficient calculation methods depending on the specific circumstances. This embodiment does not impose any special restrictions on the selection of correlation coefficient calculation methods.

[0030] The calculation process of the Pearson correlation coefficient is a well-known technique and will not be elaborated further.

[0031] It should be further explained that the instantaneous temperature change rate is the difference between the average temperature of the pixel block in the current frame and the average temperature of the pixel block in the previous frame. A sliding window queue of length M is maintained in real time, and the instantaneous temperature change rates of the M consecutive frames before the current moment are extracted to form a time series of length M, which is used for subsequent correlation analysis and linear regression calculation. The value of M is 30. In actual application, the implementer can also set it according to the specific situation. This embodiment does not impose any special restrictions.

[0032] Based on the optimal environmental reference block, it can be understood that a "dynamic benchmark" or "physical mapping" with the most similar thermal response law is found for each analysis unit on the vehicle in the environmental background. That is, the optimal environmental reference block and the corresponding pixel block on the vehicle image show the highest temperature change synchronization in historical time series. This solves the problem of asynchronous heating caused by the difference in specific heat capacity, thermal conductivity and emissivity between vehicle materials (such as metal body) and environmental materials (such as cement road surface). It establishes a "point-to-point" fine reference relationship, so that the temperature difference calculated later is based on the relative deviation under the same light response law, rather than the absolute numerical deviation caused by material differences.

[0033] Thus, this embodiment first avoids temporal analysis misalignment caused by vehicle movement by detecting stationary states, and then uses semantic segmentation and correlation analysis to match the optimal environmental reference block for vehicle pixel blocks based on the instantaneous temperature change rate. This method effectively eliminates the static temperature baseline deviation caused by material emissivity differences, establishes a refined "point-to-point" reference relationship, and ensures that subsequent temperature difference analysis is based on relative deviations under the same thermal response law, which helps to improve the accuracy of fire identification.

[0034] Step S3: Based on the instantaneous temperature change rate of each pixel block in the vehicle image and its best environmental reference block, calculate the temperature rise ratio using linear regression, and combine it with the instantaneous temperature change rate of each pixel block in the vehicle image to calculate the temperature change residual of each pixel block in the vehicle image.

[0035] In actual operation, if the environmental background exhibits high thermal stability (such as constant temperature on a cloudy day) or experiences severe thermal disturbance, the pixels within the vehicle mask may lack effective similar references in the environmental mask, resulting in the maximum correlation coefficient generally being lower than the effective threshold. To avoid the risk of subsequent calculation divergence caused by forcibly establishing incorrect reference relationships under such circumstances, a safety net logic is introduced, specifically: If the correlation coefficient between the i-th pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate is less than the preset correlation threshold, it means that there is no effective reference in the environment. In this case, the temperature rise rate ratio of the i-th pixel block will be set to 1. Conversely, based on the instantaneous temperature change rate of each pixel block in the vehicle image and its best environmental reference block, the temperature rise ratio is calculated using linear regression. Specifically, the instantaneous temperature change rate of all pixels in the i-th pixel block of the vehicle image and the instantaneous temperature change rate of all pixels in the best environmental reference block of the i-th pixel block are used as the dependent and independent variables in the fitting algorithm, respectively. The slope of the fitted line obtained by fitting is used as the temperature rise ratio of the i-th pixel block in the vehicle image. Iterate through all pixel blocks in the vehicle image to obtain the temperature rise rate of each pixel block.

[0036] Preferably, the flowchart for calculating the temperature rise rate ratio provided in this embodiment is as follows: Figure 2 As shown.

[0037] It should be noted that the preset correlation threshold is set manually. In this embodiment, the preset correlation threshold is set to 0.4. This value represents a moderate positive correlation and can effectively distinguish between "passive temperature rise with ambient light driving characteristics" and "no obvious pattern or independent heat source characteristics". If the correlation coefficient is lower than 0.4, it means that the vehicle temperature change and the ambient temperature change lack a linear correlation. Forcibly establishing a regression model will lead to distortion of the calculated temperature rise ratio (such as the value diverging due to too small denominator variance). By setting this threshold, a safety net logic can be triggered to set the ratio to zero to avoid misjudgment. The implementer can adjust it between 0.3 and 0.6 according to the complexity of the scenario to balance the robustness and sensitivity of the system.

[0038] It should be noted that there are many commonly used fitting algorithms. In this embodiment, the least squares method is used for linear fitting. In practical applications, as other implementation methods, implementers may also use other linear fitting algorithms according to specific circumstances. This embodiment does not impose any special restrictions.

[0039] The process of linear fitting using the least squares method is a well-known technique and will not be elaborated further.

[0040] The temperature rise ratio can be understood as a multiple of the heat absorption or temperature change response capability of a pixel block in a vehicle image relative to the optimal environmental reference block. It reflects the difference in thermophysical properties between the vehicle material and the reference environment material under unit light intensity. The larger the temperature rise ratio, the more severe the influence of ambient light on the vehicle surface, and the higher the theoretical passive temperature rise value will be predicted. This can effectively deduct large environmental interference components and suppress false alarms. Conversely, the smaller the temperature rise ratio (close to 0), the less sensitive the vehicle temperature change is to ambient light. The theoretical passive temperature rise value will be predicted lower, making it easier for the actual temperature rise to form a significant temperature change residual, thereby improving the detection sensitivity of weak fire sources.

[0041] Furthermore, to prevent cooling phenomena caused by rain, air conditioning, or entering shaded areas from being incorrectly identified as abnormal temperature rises, positive constraint logic must be introduced. Therefore, this embodiment further calculates the temperature change residual of each pixel block in the vehicle image based on the temperature rise amplitude ratio and combined with the instantaneous temperature change rate of each pixel block in the vehicle image. Specifically: In this embodiment, the theoretical passive temperature rise value is recorded as the result of multiplying the temperature rise rate of each pixel block in the vehicle image by the average instantaneous temperature change rate of all pixels in the corresponding optimal environment reference block. Calculate the difference between the mean of the instantaneous temperature change rate of all pixels in each pixel block of the vehicle image and the theoretical passive temperature rise value. If the difference is greater than or equal to the preset noise floor threshold, the difference is used as the temperature change residual of each pixel block in the vehicle image; otherwise, the temperature change residual of each pixel block in the vehicle image is set to 0.

[0042] It should be noted that the preset noise floor threshold is set manually. In this embodiment, the preset noise floor threshold is 0.1℃. In actual applications, as other implementation methods, implementers can also set it according to specific circumstances. This embodiment does not impose any special restrictions.

[0043] Based on the temperature change residual, it can be understood that the temperature change residual is used to characterize the "net temperature rise" component remaining in the vehicle's temperature measurement unit after removing the passive temperature rise component caused by ambient light. It reflects whether there is abnormal heating inside the vehicle that is independent of the ambient heat source. Its calculation is mainly affected by the actual temperature change rate of the vehicle and the theoretical passive temperature rise prediction value. The larger the actual temperature rise of the vehicle and the smaller the theoretical prediction value, the larger the temperature change residual, which reflects that the current heating behavior of the vehicle cannot be explained by ambient light and the higher the possibility of fire risk. At this time, it is easier to identify as abnormal. Conversely, the smaller the temperature change residual and the closer it is to zero, the more it reflects that the temperature change of the vehicle is completely in line with the driving law of ambient light and belongs to normal physical passive heating, which is judged as a safe state.

[0044] Thus, this embodiment quantifies the difference in thermal response between the vehicle and the environment by calculating the temperature rise ratio through correlation verification and linear regression. Then, it uses the theoretical passive temperature rise value to remove ambient light and heat interference and calculates the temperature change residual. This method effectively eliminates the background noise caused by material heat absorption differences and environmental temperature rise, avoids the risk of misjudgment in non-heating scenarios, and accurately extracts the abnormal heating characteristics of the vehicle independent of the environment, which helps to improve the accuracy of fire identification.

[0045] Step S4: Based on the correlation between each pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate, the temperature change residual is weighted to obtain the abnormal temperature change index of each pixel block in the vehicle image, which is used to characterize the comprehensive fire hazard of the vehicle area corresponding to the pixel block.

[0046] As an independent heat source, the temperature rise trend of a fire is determined by internal combustion and is generally unrelated to changes in external light (low correlation coefficient). In contrast, normal passive temperature rise is highly correlated with external light (high correlation coefficient). Therefore, based on this characteristic, this embodiment uses a weighted average of the temperature change residuals according to the correlation between the instantaneous temperature change rate of each pixel block in the vehicle image and its optimal environmental reference block, to obtain the abnormal temperature change index of each pixel block in the vehicle image. Specifically: First, this embodiment determines the correlation weighting coefficient of each pixel block in the vehicle image based on the correlation between each pixel block in the vehicle image and its optimal environmental reference block in terms of the instantaneous rate of temperature change. Specifically: As one implementation method, the correlation weighting coefficient of pixel block i in the vehicle image in this embodiment The expression is: In the formula, This represents the correlation coefficient between pixel block i in the vehicle image and its optimal environmental reference block in terms of the instantaneous rate of temperature change. This represents a very small constant that is preset to be greater than 0, used to prevent the denominator from being 0; This indicates the preset penalty index; max() represents the maximum value function.

[0047] It should be noted that, and preset penalty index The values ​​are all manually set, and the preset penalty index is usually greater than 1. In this embodiment, The value is 0.05, and the preset penalty index is 2. In actual application, as other implementation methods, implementers can also set it according to specific circumstances. This embodiment does not impose any special restrictions.

[0048] Based on the correlation weighting coefficient, it can be understood that the correlation weighting coefficient is used to characterize the "independence" or "abnormal confidence" of the vehicle temperature change trend relative to the change in ambient light, reflecting the intensity of nonlinear enhancement of the temperature change residual signal. Its calculation is mainly affected by the absolute value of the correlation coefficient. The smaller the absolute value of the correlation coefficient, that is, the less correlated the trend, the larger the correlation weighting coefficient, reflecting that the temperature change residual is highly likely to originate from an independent fire source. It is amplified by high weighting, thereby highlighting the early weak fire characteristics. Conversely, the larger the absolute value of the correlation coefficient, that is, the more synchronized the trend, the smaller the correlation weighting coefficient, reflecting that the residual is most likely a passive temperature rise residual error caused by the change in light. It is suppressed by low weighting, thereby eliminating high-intensity light interference.

[0049] Furthermore, in this embodiment, the product of the temperature change residual of each pixel block in the vehicle image and the correlation weighting coefficient is used as the abnormal temperature change index of each pixel block in the vehicle image.

[0050] The abnormal temperature change index can be understood as a characterization of the intensity of the final abnormal thermal characteristics after environmental thermal decoupling and signal enhancement, reflecting the comprehensive fire hazard of the vehicle area after eliminating light interference. Its calculation is jointly affected by the temperature change residual and the correlation weighting coefficient. The larger the temperature change residual and the correlation weighting coefficient are, the larger the abnormal temperature change index is, reflecting that the vehicle area corresponding to the pixel block has both a significant temperature rise deviation and the temporal characteristics of an independent fire source, belonging to a fire source area with a very high probability, which is very easy to trigger an alarm. Conversely, the smaller the abnormal temperature change index is, the more likely the area has a weak temperature rise or the temperature rise is completely driven by ambient light, belonging to a safe area or an interference area, which will not trigger an alarm.

[0051] Thus, this embodiment utilizes the correlation between vehicle and environmental temperature change trends to construct a correlation weighting coefficient, performs nonlinear enhancement processing on the temperature change residual, and obtains an abnormal temperature change index. This method effectively suppresses background interference that is highly synchronized with ambient light, while significantly amplifying the abnormal temperature rise signal with independent heat source characteristics, achieving high-confidence extraction of early weak fire characteristics.

[0052] Step S5: Perform connected component detection and feature verification on the vehicle image based on the abnormal temperature change index to determine the fire situation of the vehicle.

[0053] First, this embodiment obtains an abnormal temperature change index map based on the abnormal temperature change index, specifically: In this embodiment, the pixel values ​​of all pixels in each pixel block of the vehicle image are replaced with the abnormal temperature change index of the corresponding pixel block, and the replaced image is recorded as the abnormal temperature change index map.

[0054] Furthermore, the abnormal temperature change index map is binarized, and the connected component labeling algorithm is used to obtain candidate abnormal high temperature regions in the binarized image. That is, the connected component labeling algorithm is used to extract all connected components in the binarized image and calculate their areas. Connected components with areas greater than or equal to a preset area threshold are used as candidate abnormal high temperature regions.

[0055] It should be noted that there are many commonly used connected component labeling algorithms. In this embodiment, a two-pass scanning method is used to extract connected components from a binary image. In practical applications, as other implementation methods, implementers may also use other connected component extraction algorithms according to specific circumstances. This embodiment does not impose any special restrictions on the selection of connected component labeling algorithms.

[0056] The image binarization process, the process of extracting connectivity using the two-pass scanning method, and the process of calculating the area of ​​the connected region are all well-known techniques and will not be elaborated further.

[0057] It should be noted that the preset area threshold is set manually. In this embodiment, the preset area threshold is the total area of ​​four pixel blocks. In actual applications, as other implementation methods, implementers can also set it according to specific circumstances. This embodiment does not impose any special restrictions.

[0058] Furthermore, in this embodiment, the average abnormal temperature change index of all pixel blocks in each candidate abnormal high temperature region is calculated, and the average correlation coefficient between all pixel blocks and their best environmental reference block on the instantaneous temperature change rate is recorded as the average correlation value. Based on the average abnormal temperature change index and the mean correlation, the fire situation of vehicles in the candidate abnormal high temperature area is determined. That is, if the average abnormal temperature change index of the current candidate abnormal high temperature area is greater than the preset fire alarm trigger threshold and the mean correlation is less than the preset independence threshold, then the current candidate abnormal high temperature area is determined to be a suspected fire source area; otherwise, the current candidate abnormal high temperature area is determined to be a non-fire source area.

[0059] It should be noted that the preset fire alarm trigger threshold and the preset independence threshold are both manually set. In this embodiment, the preset fire alarm trigger threshold is set to 5.0, which is significantly higher than the maximum residual error value (usually <1.0) caused by normal light interference. This ensures that only fire sources with a strong heat release rate are responded to, avoiding triggering alarms from sporadic noise. The preset independence threshold is set to 0.8, which is based on the interval characteristics of the Pearson correlation coefficient. A value greater than 0.8 usually represents a high linear correlation. This threshold serves as the boundary for the "homogeneity" decision and is used to eliminate passive high-temperature areas that, although have a high abnormal temperature change index (such as dark metals absorbing heat very quickly, resulting in a large residual), still have a temperature change trend that is highly synchronized with light (correlation >0.8). The combination of the two constitutes a dual decision logic of "high intensity + low correlation". The implementer can fine-tune these two thresholds according to the tolerance of the false alarm rate and the missed alarm rate in the actual scenario.

[0060] If the current candidate abnormal high temperature area is identified as a suspected fire source area in N consecutive vehicle images, and the spatial overlap (IOU) is greater than a preset ratio, then the current candidate abnormal high temperature area is confirmed as a real fire source area; otherwise, it is not a real fire source area. The preset ratio is set manually. In this embodiment, the preset ratio is 0.5. In actual application, as other implementation methods, implementers can also set it according to specific circumstances. This embodiment does not impose any special restrictions.

[0061] In this embodiment, N is set to 5 frames, which is sufficient to filter out momentary false signals caused by camera shake, insect obstruction, and strong light flashing, while ensuring a millisecond-level rapid response capability to rapidly developing vehicle fires (such as battery thermal runaway). If N is too small, it will be difficult to resist random pulse interference; if N is too large, it will significantly increase the response delay, causing the best time to extinguish the fire to be missed. The implementer can adjust the value according to the interference frequency of the monitoring scene and the specific requirements for response speed. The calculation process of spatial overlap is a well-known technology and will not be described in detail here.

[0062] Thus, this embodiment constructs a temperature difference map based on the abnormal temperature change index, uses connected component detection to screen candidate regions, and combines the average abnormal temperature change index with the mean correlation value, average temperature difference intensity, and temperature change independence for dual feature verification and time series persistence verification. This method effectively eliminates random noise and passive high temperature interference, improving the accuracy and reliability of vehicle fire information.

[0063] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of this specification have been described above. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.

[0064] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0065] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them; modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions of some of the technical features, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A machine vision method for vehicle fire identification based on deep learning, characterized in that, The method includes the following steps: S1: Real-time acquisition of visible light images of the fire environment containing vehicles and the temperature at each pixel. S2: Segment the visible light image into multiple pixel blocks, use a semantic segmentation algorithm to divide the visible light image into vehicle image and environment image, analyze the correlation between each pixel block in the vehicle image and each pixel block in the environment image in terms of instantaneous temperature change rate, and select the best environment reference block for each pixel block in the vehicle image from all pixel blocks in the environment image. S3: Based on the instantaneous temperature change rate of each pixel block in the vehicle image and its best environmental reference block, use linear regression to calculate the temperature rise ratio, and combine it with the instantaneous temperature change rate of each pixel block in the vehicle image to calculate the temperature change residual of each pixel block in the vehicle image. S4: Based on the correlation between each pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate, the temperature change residual is weighted to obtain the abnormal temperature change index of each pixel block in the vehicle image, which is used to characterize the comprehensive fire hazard of the vehicle area corresponding to the pixel block. S5: Based on the abnormal temperature change index, perform connected component detection and feature verification on vehicle images to determine the fire situation of the vehicle.

2. The machine vision recognition method for vehicle fires based on deep learning as described in claim 1, characterized in that, Before segmenting the visible light image into multiple pixel blocks, the process also includes steps for determining the vehicle's motion state in the fire environment and controlling the vehicle fire identification process, specifically: Calculate the absolute difference in grayscale values ​​of pixels at the same location between a visible light image and its temporally adjacent previous visible light image. The percentage of pixels with an absolute difference greater than a preset brightness change threshold in the visible light image is calculated. If the percentage is greater than a preset stationary threshold, the fire environment is determined to be in motion, and vehicle fire identification is not performed. Otherwise, the fire environment is determined to be in a stationary state, and steps S2-S5 are performed on the visible light image to identify the vehicle fire.

3. The machine vision recognition method for vehicle fires based on deep learning as described in claim 2, characterized in that, The step of selecting the optimal environmental reference block for each pixel block in the vehicle image from all pixel blocks in the environmental image includes: Calculate the correlation coefficient between each pixel block in the vehicle image and all pixel blocks in the environment image on the instantaneous rate of temperature change. The pixel block in the environment image corresponding to the largest correlation coefficient is taken as the best environment reference block for each pixel block in the vehicle image.

4. The machine vision recognition method for vehicle fires based on deep learning as described in claim 2, characterized in that, The calculation process for the temperature rise rate ratio is as follows: If the correlation coefficient between the i-th pixel block in the vehicle image and its best environmental reference block in terms of instantaneous temperature change rate is less than a preset correlation threshold, then the temperature rise rate ratio of the i-th pixel block is set to 1. Conversely, the instantaneous temperature change rate of all pixels in the i-th pixel block of the vehicle image and the instantaneous temperature change rate of all pixels in the best environmental reference block of the i-th pixel block are used as the dependent and independent variables in the fitting algorithm, respectively. The slope of the fitted line is used as the temperature rise rate of the i-th pixel block in the vehicle image. The temperature rise rate of each pixel block is obtained by traversing all pixel blocks in the vehicle image.

5. The machine vision recognition method for vehicle fires based on deep learning as described in claim 2, characterized in that, The calculation process for the temperature variation residual of each pixel block in the vehicle image is as follows: The theoretical passive temperature rise value is the result of multiplying the temperature rise rate of each pixel block in the vehicle image by the average instantaneous temperature change rate of all pixels in the corresponding optimal environment reference block. Calculate the difference between the mean of the instantaneous temperature change rate of all pixels in each pixel block of the vehicle image and the theoretical passive temperature rise value. If the difference is greater than or equal to the preset noise floor threshold, the difference is used as the temperature change residual of each pixel block in the vehicle image; otherwise, the temperature change residual of each pixel block in the vehicle image is set to 0.

6. The machine vision recognition method for vehicle fires based on deep learning as described in claim 2, characterized in that, The method for obtaining the abnormal temperature change index is as follows: Based on the correlation between each pixel block in the vehicle image and its best environmental reference block in terms of the instantaneous rate of temperature change, the correlation weighting coefficient of each pixel block in the vehicle image is determined. The product of the temperature variation residual of each pixel block in the vehicle image and the correlation weighting coefficient is used as the abnormal temperature variation index of each pixel block in the vehicle image.

7. The machine vision recognition method for vehicle fires based on deep learning as described in claim 6, characterized in that, The expression for the correlation weighting coefficient of each pixel block in the vehicle image is: In the formula, Represents the correlation weighting coefficient of pixel block i in the vehicle image; This represents the correlation coefficient between pixel block i in the vehicle image and its optimal environmental reference block in terms of the instantaneous rate of temperature change. This represents a very small constant that is pre-defined as being greater than 0; This indicates the preset penalty index; max() represents the maximum value function.

8. The machine vision recognition method for vehicle fires based on deep learning as described in claim 2, characterized in that, The process of performing connected component detection and feature verification on vehicle images based on abnormal temperature change index to determine the vehicle fire situation specifically includes: Replace the pixel values ​​of all pixels in each pixel block of the vehicle image with the abnormal temperature change index of the corresponding pixel block. Record the replaced image as the abnormal temperature change index map. Perform binarization on the abnormal temperature change index map. Use the connected component labeling algorithm on the binarized image to obtain candidate abnormal high temperature regions. Calculate the average abnormal temperature change index of all pixel blocks in each candidate abnormal high temperature region, and record the average correlation coefficient between all pixel blocks and their best environmental reference block on the instantaneous rate of temperature change as the correlation mean. Based on the average abnormal temperature change index and the mean correlation, the fire situation of vehicles in candidate abnormal high temperature areas is determined.

9. The machine vision recognition method for vehicle fires based on deep learning as described in claim 8, characterized in that, The process of obtaining candidate abnormal high-temperature regions by using a connected component labeling algorithm on the binarized image is as follows: A connected component labeling algorithm is used to extract all connected components in the binarized image and calculate their areas. Connected components with areas greater than or equal to a preset area threshold are selected as candidate abnormal high temperature regions.

10. The machine vision recognition method for vehicle fires based on deep learning as described in claim 8, characterized in that, The determination of vehicle fire conditions in candidate abnormally high temperature areas further includes: If the average abnormal temperature change index of the current candidate abnormal high temperature area is greater than the preset fire alarm trigger threshold and the average correlation value is less than the preset independence threshold, then the current candidate abnormal high temperature area is determined to be a suspected fire source area; otherwise, the current candidate abnormal high temperature area is determined to be a non-fire source area.