Image fire detector detection method and system based on yolo3 network model and medium

The image-based fire detector detection method based on the YOLO3 network model solves the problems of poor recognition capability and complex positioning of traditional fire detection methods, and achieves fast and accurate flame recognition and three-dimensional positioning, meeting national standards.

CN122493384APending Publication Date: 2026-07-31GUANGZHOU CITY UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU CITY UNIV OF TECH
Filing Date
2026-04-24
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional smoke detectors suffer from alarm delays, lack of visualization, and high costs. Fire detection methods based on traditional image processing have poor ability to identify distant and small flames, are easily affected by lighting and vehicle lights, and have a high false alarm rate. Furthermore, existing YOLO series fire detection solutions have high model training thresholds, require code modification for secondary optimization, and have poor field adaptability, making it difficult to meet the response speed, positioning accuracy, and small target detection requirements of the national standard GB 15631-2008.

Method used

A fire detector detection method based on the YOLO3 network model is adopted. By acquiring binocular raw image data, pairing and encapsulating it, processing and labeling the image data, configuring the YOLO3 network model, and cross-compiling it, real-time flame detection and three-dimensional spatial positioning are achieved. The three-dimensional coordinates of the flame are calculated in combination with hardware parameters.

Benefits of technology

It achieves code-free secondary optimization, enabling rapid identification of flames of different sizes and precise spatial positioning, meeting national standard requirements for response speed and positioning accuracy, and reducing false alarm rate and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493384A_ABST
    Figure CN122493384A_ABST
Patent Text Reader

Abstract

This application provides a method, system, and medium for image fire detectors based on a YOLOv3 network model. The method includes: acquiring and pairing binocular raw image data; obtaining and processing a binocular raw image dataset; obtaining a standardized labeled dataset; acquiring a YOLOv3 network model configuration file for network model configuration; obtaining and initializing an executable detection model file; obtaining flame detection results and performing calculations based on the binocular raw image dataset; obtaining three-dimensional spatial coordinates and performing validity judgment; and obtaining the three-dimensional spatial coordinates of the flame. Through binocular raw image data acquisition, data preprocessing and labeling, YOLOv3 network model training, real-time flame target detection, and binocular parallax spatial positioning, the method achieves code-free secondary optimization, recognition of flames of varying sizes, and rapid spatial positioning, meeting national standard requirements for response speed and positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of image recognition technology and fire detection technology, specifically to a detection method, system and medium for image fire detectors based on the YOLOv3 network model. Background Technology

[0002] Traditional smoke detectors suffer from drawbacks such as alarm delay, lack of visualization, and high cost. Traditional image processing-based fire detection methods are poor at recognizing long-distance, small-sized flames, are easily affected by lighting conditions and vehicle headlights, and have a high false alarm rate. Existing YOLO series fire detection solutions generally suffer from high model training thresholds, require code modifications for secondary optimization, have poor field adaptability, and are complex in fire spatial positioning, making it difficult to meet the requirements of the national standard GB 15631-2008 "Special Fire Detectors" for response speed, positioning accuracy, and small target detection. Summary of the Invention

[0003] The purpose of this application is to provide an image fire detector detection method, system, and medium based on the YOLO3 network model, which can achieve code-free secondary optimization, identification of both large and small flames, and rapid spatial positioning, meeting the national standard requirements for response speed and positioning accuracy.

[0004] This application also provides an image fire detector detection method based on a YOLOv3 network model, including the following steps: Acquire the original stereo image data and pair them to obtain time-aligned stereo image pairs, then encapsulate them to obtain the original stereo image dataset. The binocular raw image dataset is processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. Obtain the YOLO3 network model configuration file to configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file; The executable detection model file is initialized to obtain standardized real-time image data to be detected and then detected to obtain flame detection results. The flame detection results are combined with the binocular original image dataset to calculate and obtain the three-dimensional spatial coordinates of the flame, and the validity is judged to obtain the three-dimensional spatial coordinates of the flame.

[0005] Optionally, in the image fire detector detection method based on the YOLO3 network model described in this application embodiment, the step of acquiring binocular raw image data and pairing it to obtain time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset includes: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

[0006] Optionally, in the image fire detector detection method based on the YOLO3 network model described in this application embodiment, the step of processing the binocular original image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

[0007] Optionally, in the image fire detector detection method based on the YOLO3 network model described in this application embodiment, the step of obtaining the YOLO3 network model configuration file for network model configuration, obtaining the optimal basic prediction model file, and cross-compiling it with the YOLO3 network model to obtain an executable detection model file includes: Obtain the YOLO3 network model configuration file and solidify the YOLO3 network model parameters. The YOLO3 network model is trained using the standardized labeled dataset to obtain the optimal base prediction model file; The optimal basic prediction model file is cross-compiled with the YOLO3 network model to obtain an executable detection model file.

[0008] Optionally, in the image fire detector detection method based on the YOLO3 network model described in this application embodiment, the step of initializing according to the executable detection model file, obtaining standardized real-time image data to be detected, and performing detection to obtain flame detection results includes: Initialize according to the executable detection model file; The real-time image to be detected is acquired and standardized to obtain standardized real-time image data to be detected. The detection model is used to detect standardized real-time image data to obtain the optimal detection box. The flame detection result is obtained by calculating based on the optimal detection frame.

[0009] Optionally, in the image fire detector detection method based on the YOLO3 network model described in this application embodiment, the step of calculating and obtaining the three-dimensional spatial coordinates of the flame based on the flame detection result and the binocular original image dataset, and then performing a validity judgment, to obtain the three-dimensional spatial coordinates of the flame, includes: The pixel disparity is calculated based on the flame detection results and the binocular original image dataset. Acquire detector hardware parameter data, including the baseline distance of the binocular cameras, the equivalent focal length of the cameras, and the physical size of a single pixel of the sensor; The depth distance is calculated based on the pixel parallax and the hardware parameter data. The three-dimensional spatial coordinates are obtained by combining the depth and distance. The validity of the flame is determined based on the three-dimensional spatial coordinates, and the three-dimensional spatial coordinates of the flame are obtained.

[0010] Secondly, embodiments of this application provide an image fire detector detection system based on a YOLOv3 network model. The system includes a memory and a processor. The memory includes a program for an image fire detector detection method based on a YOLOv3 network model. When the program for the image fire detector detection method based on a YOLOv3 network model is executed by the processor, it implements the following steps: Acquire the original stereo image data and pair them to obtain time-aligned stereo image pairs, then encapsulate them to obtain the original stereo image dataset. The binocular raw image dataset is processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. Obtain the YOLO3 network model configuration file to configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file; The executable detection model file is initialized to obtain standardized real-time image data to be detected and then detected to obtain flame detection results. The flame detection results are combined with the binocular original image dataset to calculate and obtain the three-dimensional spatial coordinates of the flame, and the validity is judged to obtain the three-dimensional spatial coordinates of the flame.

[0011] Optionally, in the image fire detector detection system based on the YOLO3 network model described in this application embodiment, the step of acquiring binocular raw image data and pairing it to obtain time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset includes: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

[0012] Optionally, in the image fire detector detection system based on the YOLO3 network model described in this application embodiment, the step of processing the binocular original image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

[0013] Thirdly, embodiments of this application also provide a computer-readable storage medium, which includes a program for detecting an image fire detector based on a YOLO3 network model. When the program for detecting an image fire detector based on a YOLO3 network model is executed by a processor, it implements the steps of the image fire detector detection method based on a YOLO3 network model as described in any of the preceding claims.

[0014] As can be seen from the above, the image fire detector detection method, system, and medium based on the YOLO3 network model provided in this application acquires binocular raw image data and pairs it to obtain time-aligned binocular image pairs and encapsulates them to obtain a binocular raw image dataset. The binocular raw image dataset is then processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. A YOLO3 network model configuration file is acquired and configured to obtain the optimal basic prediction model file, which is then cross-compiled with the YOLO3 network model to obtain an executable detection model file. The executable detection model file is initialized to obtain standardized real-time image data to be detected and detected, resulting in flame detection results. Based on the flame detection results and the binocular raw image dataset, calculations are performed to obtain three-dimensional spatial coordinates and determine their validity, ultimately obtaining the three-dimensional spatial coordinates of the flame. Through binocular raw image data acquisition, data preprocessing and labeling, YOLO3 network model training, real-time flame target detection, and binocular disparity spatial positioning, the system achieves code-free secondary optimization, recognition of flames of varying sizes, and rapid spatial positioning, meeting national standard requirements for response speed and positioning accuracy.

[0015] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating the image fire detector detection method based on the YOLO3 network model provided in this application embodiment; Figure 2 A flowchart of binocular raw image data acquisition for an image fire detector detection method based on a YOLO3 network model provided in this application embodiment; Figure 3 A high-level flowchart of the image fire detector detection method based on the YOLO3 network model provided in the embodiments of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0020] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating image fire detector detection based on a YOLOv3 network model in some embodiments of this application. This image fire detector detection method based on a YOLOv3 network model is used in terminal devices, such as mobile phones and computers. The image fire detector detection method based on a YOLOv3 network model includes the following steps: S11. Obtain the original binocular image data and pair them to obtain time-aligned binocular image pairs and encapsulate them to obtain the original binocular image dataset. S12. Process the original binocular image dataset to obtain labeled image data and divide it to obtain a standardized labeled dataset. S13. Obtain the YOLO3 network model configuration file, configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file. S14. Initialize according to the executable detection model file, obtain standardized real-time image data to be detected and perform detection to obtain flame detection results; S15. Based on the flame detection results and the binocular original image dataset, calculate to obtain the three-dimensional spatial coordinates and make a validity judgment to obtain the three-dimensional spatial coordinates of the flame.

[0021] The process involves acquiring and pairing binocular raw image data, obtaining time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset. This dataset is then processed to obtain labeled image data, which is segmented to obtain a standardized labeled dataset. A YOLO3 network model configuration file is acquired and configured. An optimal base prediction model file is obtained and cross-compiled with the YOLO3 network model to obtain an executable detection model file. Initialization is performed based on the executable detection model file. Standardized real-time image data to be detected is obtained and detected, resulting in flame detection results. These results are then combined with the binocular raw image dataset to calculate and obtain three-dimensional spatial coordinates, which are then validated. Finally, the three-dimensional spatial coordinates of the flame are obtained. Through binocular raw image data acquisition, data preprocessing and labeling, YOLO3 network model training, real-time flame target detection, and binocular disparity spatial localization, the system achieves code-free secondary optimization, recognition of flames of varying sizes, and rapid spatial localization, meeting national standard requirements for response speed and positioning accuracy.

[0022] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the binocular raw image data acquisition process of an image fire detector detection method based on a YOLO3 network model in some embodiments of this application. According to embodiments of the present invention, the step of acquiring binocular raw image data and pairing it to obtain time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset specifically involves: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

[0023] The process involves initializing the working mode configuration of an image-type fire detector equipped with binocular cameras. This includes setting uniform image resolution, frame rate, exposure time, gain, and white balance parameters for both the left and right cameras to ensure consistent imaging conditions. Pre-calibration and solidification of the binocular cameras' baseline distance (B), focal length (f), pixel size (Npixel), intrinsic and extrinsic parameters are performed to provide fixed parameters for subsequent spatial positioning. Raw binocular image data is acquired, including raw image data from the left and right views. Hardware synchronous trigger signals simultaneously drive the left and right cameras to expose and image. The same trigger pulse corresponds to one frame of the left view and one frame of the right view at the same time, ensuring strict temporal alignment and no time offset between the left and right views. Based on the binocular... The original image data is paired. A single frame of the left-view original image data output by the left camera is denoted as Frame_L(t), and a single frame of the right-view original image data output by the right camera is denoted as Frame_R(t). t represents the same timestamp, indicating the same acquisition time. Each pair of simultaneously acquired left-view and right-view image data is assigned a completely identical timestamp t, forming a one-to-one corresponding binocular image pair. Image_Pair(t) = {Frame_L(t), Frame_R(t)}. Missing single-view frames, misaligned timestamps, and inconsistent frame rates are prohibited. Images are continuously and synchronously acquired at a preset frame rate, and timestamps are paired to obtain temporally continuous and one-to-one corresponding binocular image pairs. , , ... The data is encapsulated based on time-aligned stereo images. Stereo image pairs are written sequentially into a circular buffer, and the output is uniformly in RGB raw image format. Compression distortion is removed, and flame and smoke textures and brightness details are preserved. All stereo image pairs are encapsulated in timestamp order to obtain the stereo raw image dataset. At any time t in the dataset, there exists one and only one set of left and right view image data, with a strict one-to-one correspondence in time sequence.

[0024] According to an embodiment of the present invention, the step of processing the original stereo image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset specifically includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

[0025] The process involves scaling, deduplication, and denoising of the original binocular image dataset. Each left and right view image in the dataset is then scaled using bilinear interpolation to uniformly scale all images to 608×608 pixels, maintaining the target aspect ratio during scaling. Edge regions are padded with pixels to ensure the geometric features of flames, smoke, and flame reflections are not distorted. The resulting 608×608 uniform-scale binocular images are then compared frame-by-frame using a global image hashing algorithm. Pixel similarity between consecutive frames is calculated, and when the similarity exceeds a preset threshold... At 96% accuracy, image frames are identified as duplicates. The frame with the earliest timestamp is retained, and subsequent duplicate frames are deleted to avoid redundant data interfering with model training. A unique 608×608 stereo image sequence is output. A 3×3 median filtering algorithm is used to denoise the deduplicated images. A 3×3 pixel filtering template is created centered on each pixel in the image. The grayscale or RGB channel values ​​of 9 pixels within the template area are extracted and sorted in ascending / descending order. The median pixel value of the sorted template is used to replace the original pixel value at the center of the template. This process is repeated row-by-row across the entire image to complete full-image denoising. After denoising, the edges and textures of the flames and smoke are preserved. The process involves removing environmental noise, camera thermal noise, and particle interference to output clear, denoised stereo images, resulting in a standardized stereo image dataset. Based on this dataset, target bounding boxes are labeled on the denoised 608×608 stereo images. The labeled targets are categorized into three types: flame, non-flame smoke (flame_reflection), and smoke. Each target region is completely enclosed by a minimum bounding box, and the coordinates of the top-left corner (x_min, y_min) and bottom-right corner (x_max, y_max) of the bounding box are recorded. Each bounding box is then assigned a category. Labels and corresponding image filenames form annotation information. The left and right view images are labeled independently to ensure a one-to-one correspondence between the two object labels, resulting in labeled image data with category labels and bounding box coordinates. The labeled image data is then divided into three files: a training set (training.txt) containing image paths and annotation information for model iteration training, a validation set (val.txt) containing image paths and annotation information for performance evaluation during training, and a test set (test.txt).The `.txt` file stores the image paths and annotation information used for final model accuracy testing. It ensures that all three datasets contain both left and right eye images with a balanced class distribution. Each line in the `.txt` file corresponds to one data point. The standardized stereo image dataset (scale-unified, deduplicated, and denoised) along with the annotation information and three text index files are integrated and encapsulated to obtain a standardized annotation dataset, including 608×608 denoised images, object annotation information files, the training set `train.txt`, the validation set `val.txt`, and the test set `test.txt`.

[0026] According to an embodiment of the present invention, the step of obtaining the YOLO3 network model configuration file for network model configuration, obtaining the optimal basic prediction model file, and cross-compiling it with the YOLO3 network model to obtain an executable detection model file specifically involves: Obtain the YOLO3 network model configuration file and solidify the YOLO3 network model parameters. The YOLO3 network model is trained using the standardized labeled dataset to obtain the optimal base prediction model file; The optimal basic prediction model file is cross-compiled with the YOLO3 network model to obtain an executable detection model file.

[0027] The process involves obtaining the YOLO3 network model configuration file and fixing its parameters. The YOLO3 network model configuration file yolov3_608x608.cfg is loaded, the input image resolution is fixed at 608×608, the number of target categories is 3 (flame, flame reflection, and smoke), the default confidence threshold is conf_thresh=0.6, and a multi-scale detection branch is enabled. Three sets of predicted feature maps are configured with output dimensions of 19×19, 38×38, and 76×76, with three anchor boxes assigned to each scale, resulting in a total of 9 clustering anchors. The YOLOv3 network model is adapted to detect large, medium, and small flame targets. A 19×19 prediction feature map detects large flame / smoke targets in a 608×608 image, a 38×38 prediction feature map detects medium-sized flame / smoke targets, and a 76×76 prediction feature map detects small, distant flame points in a 608×608 image. Each scale corresponds to three sets of prior boxes, resulting in nine anchor boxes to ensure effective matching of targets of different sizes. The model is trained using a standardized labeled dataset. The paths to the training set (train.txt) and validation set (val.txt) are written into the YOLOv3 network model configuration, specifying the annotation format and class mapping. Training hyperparameters, including learning rate, batch size, momentum, and weight decay, are initialized. Pre-trained weights are loaded to accelerate convergence and ensure fast and stable training on small datasets. The standardized labeled dataset is input into the YOLOv3 network model for N forward propagation and backward gradient updates. In each iteration, the training set images and annotations are read to complete target box regression and class classification. Accuracy is evaluated in real time using a validation set, loss changes are monitored, optimal parameters are saved, and the optimal basic prediction model file best.weights is obtained. The optimal basic prediction model file is then cross-compiled with the YOLO3 network model. The optimal basic prediction model file best.weights and the YOLO3 network model inference framework are cross-compiled on an embedded platform. Instruction set optimization, memory pruning, and inference acceleration are performed using the HiSilicon processor hardware environment. The training branch is removed, and the forward inference computation graph is retained to obtain the binary executable detection model file flame_608_inst.wk adapted to the detector hardware.

[0028] According to an embodiment of the present invention, the step of initializing based on the executable detection model file, obtaining standardized real-time image data to be detected, and performing detection to obtain flame detection results specifically includes: Initialize according to the executable detection model file; The real-time image to be detected is acquired and standardized to obtain standardized real-time image data to be detected. The detection model is used to detect standardized real-time image data to obtain the optimal detection box. The flame detection result is obtained by calculating based on the optimal detection frame.

[0029] The process involves initialization based on the executable detection model file, loading the executable detection model file data, initializing the main control chip of the image-type fire detector, mounting the file system, locating the model storage path: / mnt / rec00000001 / exec / bin / , reading and loading the executable detection model file flame_608_inst.wk from the specified path into hardware memory, completing model parsing, weight initialization, and multi-scale detection branch configuration, and entering a standby inference state. The system acquires the real-time image to be detected and performs standardization processing. It acquires the left view real-time image of the current frame from the binocular camera, using the right view for localization, and only uses the left view for target detection. The real-time image is automatically scaled to 608×608 resolution, strictly consistent with the model input specifications. The image is normalized to remove noise interference, obtaining standardized real-time image data to be detected, maintaining the same standard as the training data. The detection model then detects the standardized real-time image data. In this embodiment, the system generates the standard inference command . / flame_detect. ` / mnt / rec00000001 / exec / bin / flame_608_inst.wk 608 3 Pc 0 40000`, `. / flame_detect / mnt / rec00000001 / exec / bin` is the path to the executable file, `608 3 0.6 0 40000` are the input parameters required for running the program, `608` indicates that the image dataset has an image resolution of 608×608, `3` indicates three types of objects to be detected, and `0` indicates the number of objects to be detected.6 represents the confidence threshold Pc. A higher confidence threshold reduces false negatives but increases false positives. The parameters 0 and 40000 remain fixed. The command initiates forward inference of the model. The detection model feeds the 608×608 image into three scale feature maps for parallel computation: a 19×19 feature map detects large flames, a 38×38 feature map detects medium-sized flames, and a 76×76 feature map detects small, distant flames. At each scale, target bounding box regression and category prediction are performed using three corresponding anchor boxes. The confidence scores of all detected boxes are compared with the confidence threshold Pc. Detected boxes with confidence scores greater than Pc are retained, while those with scores lower than Pc are considered interference and filtered. Non-maximum suppression is applied to repeated boxes of the same target to obtain the optimal detected box. The output valid targets include flame, flame_reflection (non-flame smoke), and smoke. Based on the optimal detected box, calculations are performed, taking the top-left corner coordinates (x_min, y_min) of the optimal detected box. The bottom-right corner coordinates (x_max, y_max) are used to calculate the target center pixel coordinates: x = (x_min + x_max) / 2, y = (y_min + y_max) / 2. This yields the flame detection result (x, y) with pixel coordinates. The system continuously assesses whether the detection performance meets expectations. If not, it extracts incorrectly identified image frames from the scene and directly appends this image data to the training set train.txt and the validation set val.txt. No code modification or recompilation is required; the system retrains directly. If the performance meets expectations, the current model continues to run and outputs detection results.

[0030] According to an embodiment of the present invention, after obtaining the flame detection result, the method further includes: performing temporal trajectory tracking based on the flame detection results of multiple consecutive frames, obtaining flame motion state information and the main direction of flame spread, and making predictions to obtain a flame spread trend prediction result, specifically: A pixel displacement vector sequence is obtained by calculating based on the flame detection results of the consecutive multiple frames; The motion state of the flame target is determined based on the pixel displacement vector sequence to obtain flame motion state information; The main direction of flame spread is obtained by calculating based on the pixel displacement vector sequence; Based on the flame motion state information and the main direction of flame spread, combined with the pre-set fire spread rate model, a prediction result of the flame spread trend is obtained.

[0031] The process involves calculating the flame target's center pixel coordinates from the current frame's flame detection results and storing the sequence of these coordinates along with the previous N frames' historical flame detection results in a sliding window buffer. The buffer window length N ranges from 8 to 16 frames, and is updated frame by frame, with the oldest frame automatically dequeued. The pixel displacement vector between adjacent frames is calculated based on the coordinate sequence, obtained from the difference in center coordinates between two adjacent frames. This results in a pixel displacement vector sequence composed of multiple displacement vectors. The motion state of the flame target is determined based on this sequence. A weighted average velocity vector is calculated, with weights using a time-decay strategy. Frames closer to the current frame are assigned greater weights to reflect the timeliness of the flame movement. The weights are set according to an exponential decay function with a decay coefficient ranging from 0.1 to 0.3, meaning more recent frames contribute more to the final velocity estimation. The magnitude of the weighted average velocity vector is compared to a preset velocity threshold. If the magnitude is less than the threshold, the flame is considered to be in a stable combustion state; if the magnitude is greater than or equal to the threshold, the flame is considered to be in an unstable combustion state. The propagation state and velocity threshold are determined based on the detector installation scene. For indoor scenes, the movement velocity is taken as 3 to 5 pixels per frame, and for outdoor scenes, it is taken as 8 to 12 pixels per frame. This obtains the flame movement state information. Simultaneously, the main direction angle is obtained by calculating the ratio of the sum of the vertical coordinate components to the sum of the horizontal coordinate components of all displacement vectors, taking the arctangent angle. Based on the flame movement state information and the main direction of flame propagation, a preset fire spread rate model is used to predict the spread area of ​​the flame in the next T seconds. T ranges from 5 to 30 seconds. The spread rate model sets different linear spread rates according to the flame type and scene material. The predicted spread radius is the product of the spread rate and time T. A fan-shaped spread prediction area is generated with the current flame center as the center and the predicted spread radius as the radius. Based on the spatial relationship between the predicted area and the preset safe area within the detector's monitoring range, the estimated time for the flame to reach the boundary of the safe area is calculated, which is the shortest distance from the flame center to the boundary of the safe area divided by the spread rate, to obtain the flame spread trend prediction result.

[0032] According to an embodiment of the present invention, the step of calculating and determining the three-dimensional spatial coordinates of the flame based on the flame detection result and the binocular original image dataset, and then performing a validity judgment, specifically to obtain the three-dimensional spatial coordinates of the flame, is as follows: The pixel disparity is calculated based on the flame detection results and the binocular original image dataset. Acquire detector hardware parameter data, including the baseline distance of the binocular cameras, the equivalent focal length of the cameras, and the physical size of a single pixel of the sensor; The depth distance is calculated based on the pixel parallax and the hardware parameter data. The three-dimensional spatial coordinates are obtained by combining the depth and distance. The validity of the flame is determined based on the three-dimensional spatial coordinates, and the three-dimensional spatial coordinates of the flame are obtained.

[0033] Specifically, the process is based on the flame detection results combined with the binocular original image dataset. The center pixel coordinates (x, y) of the flame target in the flame detection results are set as the center position of the flame in the left-eye image. The right-view image Frame_R(t) that is perfectly aligned with the timestamp of the frame is obtained from the binocular original image dataset to ensure strict temporal correspondence between the binocular images. The calculation benchmark Image_Pair(t) at the same time for the left-eye image Frame_L(t) and the right-eye image Frame_R(t) is determined. The projection coordinates of the flame target in the left-eye image are marked as... In the right-eye image, constrained by the row coordinate y, a corresponding point consistent with the flame center feature in the left-eye image is searched along the horizontal direction to obtain the right-eye projected coordinates. To ensure that the left and right projection points are aligned, at the same height, and share the same target center (i.e., both have the same y-coordinate, with only the x-coordinate differing), the pixel disparity is calculated using the formula based on the left and right projection coordinates. The unit is pixels (px). The fixed hardware parameter data of the detector, pre-calibrated at the factory, is obtained, including the baseline distance B of the binocular camera, the equivalent focal length f of the camera, and the physical size Npixel of a single sensor pixel. All parameters are constant and do not change with the scene. The depth distance is calculated based on the pixel parallax combined with the hardware parameter data. The binocular stereo vision depth formula is Z=(B×f) / (d×Npixel), where Z represents the horizontal depth distance from the flame target to the camera, in meters. In this embodiment, the baseline distance B of the binocular camera is 0.4m, the equivalent focal length f of the camera is 0.012m, and the physical size Npixel of a single sensor pixel is... And based on the detected flame object pixel parallax d=40px, the depth distance was calculated. The system combines depth and distance information, using the left eye image pixel coordinates (x, y) as the planar position and the calculated depth Z as the distance information, to output a three-dimensional spatial coordinate (x, y, Z), where x represents the horizontal pixel, y represents the vertical pixel, and Z represents the actual physical distance. The system then performs validity checks based on these three-dimensional spatial coordinates, determining if the pixel parallax d is within a reasonable range and if the depth distance Z is within the effective detection range (e.g., 0 to 50 meters), excluding outliers. If the checks pass, the location is considered a valid fire location, and the flame's three-dimensional spatial coordinates are obtained. If the checks fail, the location is marked as invalid, and no linkage is triggered. The flame's three-dimensional spatial coordinates are then sent to the monitoring platform and fire extinguishing controller, outputting a fire alarm signal, location information, confidence level information, and distance information. This triggers linkage devices such as water cannons, sprinklers, and audible and visual alarms to perform precise fire extinguishing operations. The flame's three-dimensional spatial coordinates (x, y, Z) and the alarm linkage commands are archived, completing the entire detection and positioning closed-loop process.

[0034] According to an embodiment of the present invention, after obtaining the three-dimensional spatial coordinates of the flame, the method further includes: calculating the flame volume change rate based on the three-dimensional spatial coordinates of the flame and classifying the intensity level in conjunction with a preset flame intensity discrimination model to obtain multi-dimensional fire situation information, specifically: The three-dimensional projected area sequence is obtained by calculating based on the three-dimensional spatial coordinates of the flame; The flame volume change rate is calculated based on the three-dimensional projected area sequence. The intensity level is classified according to the flame volume change rate and a preset flame intensity discrimination model to obtain flame intensity level information. The fire intensity level information, three-dimensional spatial coordinates of the flame, main direction of flame spread, and prediction results of flame spread trend are integrated to obtain multi-dimensional fire situation information and send it to the monitoring platform.

[0035] The calculation process involves using the three-dimensional spatial coordinates of flames from multiple consecutive frames. The sequence of three-dimensional spatial coordinates of flames detected in M ​​consecutive frames is stored in a three-dimensional trajectory buffer, where M ranges from 30 to 60 frames, corresponding to 1 to 2 seconds of real-time data. Simultaneously, the detection box area is extracted from each frame's flame detection result; this is the product of the differences between the lower right and upper left corner coordinates of the detection box in both the horizontal and vertical directions. Combined with the depth distance of that frame, the projected area of ​​the flame in three-dimensional space is calculated. The projected area is the detection box area multiplied by the square of the ratio of the depth distance to the calibrated reference distance (set to 10 meters). This yields a sequence of three-dimensional projected areas for M consecutive frames. The area sequence is calculated by dividing the difference between the 3D projected area of ​​the last frame and the 3D projected area of ​​the first frame by the time difference between the last and first frames, and then multiplying by the estimated vertical rise velocity of the flame. The estimated vertical rise velocity of the flame is obtained from a table based on the flame type: 0.3 m / s to 0.5 m / s for candle flames, 0.8 m / s to 1.5 m / s for solid combustion flames, and 0.5 m / s to 1.0 m / s for liquid combustion flames. This yields the flame volume change rate. Based on the flame volume change rate and a preset flame intensity discrimination model, the intensity level is classified. The flame intensity level is determined according to the numerical range of the flame volume change rate. A change rate of less than 0.01 cubic meters per second is classified as Level 1, a weak flame corresponding to the initial smoldering stage; a change rate between 0.01 and 0.05 cubic meters per second is classified as Level 2, a moderate flame corresponding to the open flame development stage; a change rate between 0.05 and 0.2 cubic meters per second is classified as Level 3, a fierce flame corresponding to the rapid spread stage; and a change rate of 0.2 cubic meters per second or higher is classified as Level 4, an extreme flame corresponding to the deflagration or large-scale fire stage. Based on the obtained flame intensity level information, each flame intensity level corresponds to a different fire extinguishing resource allocation strategy. Level 1, a weak flame, initiates monitoring and recording mode; Level 2, a moderate flame, triggers an audible and visual alarm and notifies on-duty personnel; Level 3, a strong flame, and a large-scale fire are all classified as Level 4. When a level 1 intense flame is detected, automatic sprinklers and water cannons are activated in conjunction to extinguish the fire. When a level 4 extreme flame is detected, an emergency fire hazard signal is triggered across the entire area and reported to the fire command center. The system integrates information on flame intensity level, three-dimensional spatial coordinates of the flame, main direction of flame spread, and predicted flame spread trend to obtain multi-dimensional fire situation information. This information is then encapsulated according to a preset communication protocol and sent to the monitoring platform via TCP / IP or MQTT. The monitoring platform visualizes the multi-dimensional fire situation information on a three-dimensional spatial model, including flame location markings, intensity level color blocks, arrows indicating the direction of spread, and heat maps of safe areas, providing real-time data support for fire-fighting decisions.

[0036] Please refer to Figure 3 , Figure 3 This is a high-level flowchart of an image fire detector detection method based on a YOLO3 network model in some embodiments of this application.

[0037] This invention also discloses an image fire detector detection system based on the YOLOv3 network model, comprising a memory and a processor. The memory includes a program for an image fire detector detection method based on the YOLOv3 network model. When the processor executes the program for the image fire detector detection method based on the YOLOv3 network model, it performs the following steps: Acquire the original stereo image data and pair them to obtain time-aligned stereo image pairs, then encapsulate them to obtain the original stereo image dataset. The binocular raw image dataset is processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. Obtain the YOLO3 network model configuration file to configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file; The executable detection model file is initialized to obtain standardized real-time image data to be detected and then detected to obtain flame detection results. The flame detection results are combined with the binocular original image dataset to calculate and obtain the three-dimensional spatial coordinates of the flame, and the validity is judged to obtain the three-dimensional spatial coordinates of the flame.

[0038] The process involves acquiring and pairing binocular raw image data, obtaining time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset. This dataset is then processed to obtain labeled image data, which is segmented to obtain a standardized labeled dataset. A YOLO3 network model configuration file is acquired and configured. An optimal base prediction model file is obtained and cross-compiled with the YOLO3 network model to obtain an executable detection model file. Initialization is performed based on the executable detection model file. Standardized real-time image data to be detected is obtained and detected, resulting in flame detection results. These results are then combined with the binocular raw image dataset to calculate and obtain three-dimensional spatial coordinates, which are then validated. Finally, the three-dimensional spatial coordinates of the flame are obtained. Through binocular raw image data acquisition, data preprocessing and labeling, YOLO3 network model training, real-time flame target detection, and binocular disparity spatial localization, the system achieves code-free secondary optimization, recognition of flames of varying sizes, and rapid spatial localization, meeting national standard requirements for response speed and positioning accuracy.

[0039] According to an embodiment of the present invention, the step of acquiring and pairing binocular raw image data to obtain temporally aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset specifically involves: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

[0040] The process involves initializing the working mode configuration of an image-type fire detector equipped with binocular cameras. This includes setting uniform image resolution, frame rate, exposure time, gain, and white balance parameters for both the left and right cameras to ensure consistent imaging conditions. Pre-calibration and solidification of the binocular cameras' baseline distance (B), focal length (f), pixel size (Npixel), intrinsic and extrinsic parameters are performed to provide fixed parameters for subsequent spatial positioning. Raw binocular image data is acquired, including raw image data from the left and right views. Hardware synchronous trigger signals simultaneously drive the left and right cameras to expose and image. The same trigger pulse corresponds to one frame of the left view and one frame of the right view at the same time, ensuring strict temporal alignment and no time offset between the left and right views. Based on the binocular... The original image data is paired. A single frame of the left-view original image data output by the left camera is denoted as Frame_L(t), and a single frame of the right-view original image data output by the right camera is denoted as Frame_R(t). t represents the same timestamp, indicating the same acquisition time. Each pair of simultaneously acquired left-view and right-view image data is assigned a completely identical timestamp t, forming a one-to-one corresponding binocular image pair. Image_Pair(t) = {Frame_L(t), Frame_R(t)}. Missing single-view frames, misaligned timestamps, and inconsistent frame rates are prohibited. Images are continuously and synchronously acquired at a preset frame rate, and timestamps are paired to obtain temporally continuous and one-to-one corresponding binocular image pairs. ... The data is encapsulated based on time-aligned stereo images. Stereo image pairs are written sequentially into a circular buffer, and the output is uniformly in RGB raw image format. Compression distortion is removed, and flame and smoke textures and brightness details are preserved. All stereo image pairs are encapsulated in timestamp order to obtain the stereo raw image dataset. At any time t in the dataset, there exists one and only one set of left and right view image data, with a strict one-to-one correspondence in time sequence.

[0041] According to an embodiment of the present invention, the step of processing the original stereo image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset specifically includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

[0042] The process involves scaling, deduplication, and denoising of the original binocular image dataset. Each left and right view image in the dataset is then scaled using bilinear interpolation to uniformly scale all images to 608×608 pixels, maintaining the target aspect ratio during scaling. Edge regions are padded with pixels to ensure the geometric features of flames, smoke, and flame reflections are not distorted. The resulting 608×608 uniform-scale binocular images are then compared frame-by-frame using a global image hashing algorithm. Pixel similarity between consecutive frames is calculated, and when the similarity exceeds a preset threshold... At 96% accuracy, image frames are identified as duplicates. The frame with the earliest timestamp is retained, and subsequent duplicate frames are deleted to avoid redundant data interfering with model training. A unique 608×608 stereo image sequence is output. A 3×3 median filtering algorithm is used to denoise the deduplicated images. A 3×3 pixel filtering template is created centered on each pixel in the image. The grayscale or RGB channel values ​​of 9 pixels within the template area are extracted and sorted in ascending / descending order. The median pixel value of the sorted template is used to replace the original pixel value at the center of the template. This process is repeated row-by-row across the entire image to complete full-image denoising. After denoising, the edges and textures of the flames and smoke are preserved. The process involves removing environmental noise, camera thermal noise, and particle interference to output clear, denoised stereo images, resulting in a standardized stereo image dataset. Based on this dataset, target bounding boxes are labeled on the denoised 608×608 stereo images. The labeled targets are categorized into three types: flame, non-flame smoke (flame_reflection), and smoke. Each target region is completely enclosed by a minimum bounding box, and the coordinates of the top-left corner (x_min, y_min) and bottom-right corner (x_max, y_max) of the bounding box are recorded. Each bounding box is then assigned a category. Labels and corresponding image filenames form annotation information. The left and right view images are labeled independently to ensure a one-to-one correspondence between the two object labels, resulting in labeled image data with category labels and bounding box coordinates. The labeled image data is then divided into three files: a training set (training.txt) containing image paths and annotation information for model iteration training, a validation set (val.txt) containing image paths and annotation information for performance evaluation during training, and a test set (test.txt).The `.txt` file stores the image paths and annotation information used for final model accuracy testing. It ensures that all three datasets contain both left and right eye images with a balanced class distribution. Each line in the `.txt` file corresponds to one data point. The standardized stereo image dataset (scale-unified, deduplicated, and denoised) along with the annotation information and three text index files are integrated and encapsulated to obtain a standardized annotation dataset, including 608×608 denoised images, object annotation information files, the training set `train.txt`, the validation set `val.txt`, and the test set `test.txt`.

[0043] According to an embodiment of the present invention, the step of obtaining the YOLO3 network model configuration file for network model configuration, obtaining the optimal basic prediction model file, and cross-compiling it with the YOLO3 network model to obtain an executable detection model file specifically involves: Obtain the YOLO3 network model configuration file and solidify the YOLO3 network model parameters. The YOLO3 network model is trained using the standardized labeled dataset to obtain the optimal base prediction model file; The optimal basic prediction model file is cross-compiled with the YOLO3 network model to obtain an executable detection model file.

[0044] The process involves obtaining the YOLO3 network model configuration file and fixing its parameters. The YOLO3 network model configuration file yolov3_608x608.cfg is loaded, the input image resolution is fixed at 608×608, the number of target categories is 3 (flame, flame reflection, and smoke), the default confidence threshold is conf_thresh=0.6, and a multi-scale detection branch is enabled. Three sets of predicted feature maps are configured with output dimensions of 19×19, 38×38, and 76×76, with three anchor boxes assigned to each scale, resulting in a total of 9 clustering anchors. The YOLOv3 network model is adapted to detect large, medium, and small flame targets. A 19×19 prediction feature map detects large flame / smoke targets in a 608×608 image, a 38×38 prediction feature map detects medium-sized flame / smoke targets, and a 76×76 prediction feature map detects small, distant flame points in a 608×608 image. Each scale corresponds to three sets of prior boxes, resulting in nine anchor boxes to ensure effective matching of targets of different sizes. The model is trained using a standardized labeled dataset. The paths to the training set (train.txt) and validation set (val.txt) are written into the YOLOv3 network model configuration, specifying the annotation format and class mapping. Training hyperparameters, including learning rate, batch size, momentum, and weight decay, are initialized. Pre-trained weights are loaded to accelerate convergence and ensure fast and stable training on small datasets. The standardized labeled dataset is input into the YOLOv3 network model for N forward propagation and backward gradient updates. In each iteration, the training set images and annotations are read to complete target box regression and class classification. Accuracy is evaluated in real time using a validation set, loss changes are monitored, optimal parameters are saved, and the optimal basic prediction model file best.weights is obtained. The optimal basic prediction model file is then cross-compiled with the YOLO3 network model. The optimal basic prediction model file best.weights and the YOLO3 network model inference framework are cross-compiled on an embedded platform. Instruction set optimization, memory pruning, and inference acceleration are performed using the HiSilicon processor hardware environment. The training branch is removed, and the forward inference computation graph is retained to obtain the binary executable detection model file flame_608_inst.wk adapted to the detector hardware.

[0045] According to an embodiment of the present invention, the step of initializing based on the executable detection model file, obtaining standardized real-time image data to be detected, and performing detection to obtain flame detection results specifically includes: Initialize according to the executable detection model file; The real-time image to be detected is acquired and standardized to obtain standardized real-time image data to be detected. The detection model is used to detect standardized real-time image data to obtain the optimal detection box. The flame detection result is obtained by calculating based on the optimal detection frame.

[0046] The process involves initialization based on the executable detection model file, loading the executable detection model file data, initializing the main control chip of the image-type fire detector, mounting the file system, locating the model storage path: / mnt / rec00000001 / exec / bin / , reading and loading the executable detection model file flame_608_inst.wk from the specified path into hardware memory, completing model parsing, weight initialization, and multi-scale detection branch configuration, and entering a standby inference state. The system acquires the real-time image to be detected and performs standardization processing. It acquires the left view real-time image of the current frame from the binocular camera, using the right view for localization, and only uses the left view for target detection. The real-time image is automatically scaled to 608×608 resolution, strictly consistent with the model input specifications. The image is normalized to remove noise interference, obtaining standardized real-time image data to be detected, maintaining the same standard as the training data. The detection model then detects the standardized real-time image data. In this embodiment, the system generates the standard inference command . / flame_detect. ` / mnt / rec00000001 / exec / bin / flame_608_inst.wk 608 3 Pc 0 40000`, `. / flame_detect / mnt / rec00000001 / exec / bin` is the path to the executable file, `608 3 0.6 0 40000` are the input parameters required for running the program, `608` indicates that the image dataset has an image resolution of 608×608, `3` indicates three types of objects to be detected, and `0` indicates the number of objects to be detected.6 represents the confidence threshold Pc. A higher confidence threshold reduces false negatives but increases false positives. The parameters 0 and 40000 remain fixed. The command initiates forward inference of the model. The detection model feeds the 608×608 image into three scale feature maps for parallel computation: a 19×19 feature map detects large flames, a 38×38 feature map detects medium-sized flames, and a 76×76 feature map detects small, distant flames. At each scale, target bounding box regression and category prediction are performed using three corresponding anchor boxes. The confidence scores of all detected boxes are compared with the confidence threshold Pc. Detected boxes with confidence scores greater than Pc are retained, while those with scores lower than Pc are considered interference and filtered. Non-maximum suppression is applied to repeated boxes of the same target to obtain the optimal detected box. The output valid targets include flame, flame_reflection (non-flame smoke), and smoke. Based on the optimal detected box, calculations are performed, taking the top-left corner coordinates (x_min, y_min) of the optimal detected box. The bottom-right corner coordinates (x_max, y_max) are used to calculate the target center pixel coordinates: x = (x_min + x_max) / 2, y = (y_min + y_max) / 2. This yields the flame detection result (x, y) with pixel coordinates. The system continuously assesses whether the detection performance meets expectations. If not, it extracts incorrectly identified image frames from the scene and directly appends this image data to the training set train.txt and the validation set val.txt. No code modification or recompilation is required; the system retrains directly. If the performance meets expectations, the current model continues to run and outputs detection results.

[0047] According to an embodiment of the present invention, after obtaining the flame detection result, the method further includes: performing temporal trajectory tracking based on the flame detection results of multiple consecutive frames, obtaining flame motion state information and the main direction of flame spread, and making predictions to obtain a flame spread trend prediction result, specifically: A pixel displacement vector sequence is obtained by calculating based on the flame detection results of the consecutive multiple frames; The motion state of the flame target is determined based on the pixel displacement vector sequence to obtain flame motion state information; The main direction of flame spread is obtained by calculating based on the pixel displacement vector sequence; Based on the flame motion state information and the main direction of flame spread, combined with the pre-set fire spread rate model, a prediction result of the flame spread trend is obtained.

[0048] The process involves calculating the flame target's center pixel coordinates from the current frame's flame detection results and storing the sequence of these coordinates along with the previous N frames' historical flame detection results in a sliding window buffer. The buffer window length N ranges from 8 to 16 frames, and is updated frame by frame, with the oldest frame automatically dequeued. The pixel displacement vector between adjacent frames is calculated based on the coordinate sequence, obtained from the difference in center coordinates between two adjacent frames. This results in a pixel displacement vector sequence composed of multiple displacement vectors. The motion state of the flame target is determined based on this sequence. A weighted average velocity vector is calculated, with weights using a time-decay strategy. Frames closer to the current frame are assigned greater weights to reflect the timeliness of the flame movement. The weights are set according to an exponential decay function with a decay coefficient ranging from 0.1 to 0.3, meaning more recent frames contribute more to the final velocity estimation. The magnitude of the weighted average velocity vector is compared to a preset velocity threshold. If the magnitude is less than the threshold, the flame is considered to be in a stable combustion state; if the magnitude is greater than or equal to the threshold, the flame is considered to be in an unstable combustion state. The propagation state and velocity threshold are determined based on the detector installation scene. For indoor scenes, the movement velocity is taken as 3 to 5 pixels per frame, and for outdoor scenes, it is taken as 8 to 12 pixels per frame. This obtains the flame movement state information. Simultaneously, the main direction angle is obtained by calculating the ratio of the sum of the vertical coordinate components to the sum of the horizontal coordinate components of all displacement vectors, taking the arctangent angle. Based on the flame movement state information and the main direction of flame propagation, a preset fire spread rate model is used to predict the spread area of ​​the flame in the next T seconds. T ranges from 5 to 30 seconds. The spread rate model sets different linear spread rates according to the flame type and scene material. The predicted spread radius is the product of the spread rate and time T. A fan-shaped spread prediction area is generated with the current flame center as the center and the predicted spread radius as the radius. Based on the spatial relationship between the predicted area and the preset safe area within the detector's monitoring range, the estimated time for the flame to reach the boundary of the safe area is calculated, which is the shortest distance from the flame center to the boundary of the safe area divided by the spread rate, to obtain the flame spread trend prediction result.

[0049] According to an embodiment of the present invention, the step of calculating and determining the three-dimensional spatial coordinates of the flame based on the flame detection result and the binocular original image dataset, and then performing a validity judgment, specifically to obtain the three-dimensional spatial coordinates of the flame, is as follows: The pixel disparity is calculated based on the flame detection results and the binocular original image dataset. Acquire detector hardware parameter data, including the baseline distance of the binocular cameras, the equivalent focal length of the cameras, and the physical size of a single pixel of the sensor; The depth distance is calculated based on the pixel parallax and the hardware parameter data. The three-dimensional spatial coordinates are obtained by combining the depth and distance. The validity of the flame is determined based on the three-dimensional spatial coordinates, and the three-dimensional spatial coordinates of the flame are obtained.

[0050] Specifically, the process is based on the flame detection results combined with the binocular original image dataset. The center pixel coordinates (x, y) of the flame target in the flame detection results are set as the center position of the flame in the left-eye image. The right-view image Frame_R(t) that is perfectly aligned with the timestamp of the frame is obtained from the binocular original image dataset to ensure strict temporal correspondence between the binocular images. The calculation benchmark Image_Pair(t) at the same time for the left-eye image Frame_L(t) and the right-eye image Frame_R(t) is determined. The projection coordinates of the flame target in the left-eye image are marked as... In the right-eye image, constrained by the row coordinate y, a corresponding point consistent with the flame center feature in the left-eye image is searched along the horizontal direction to obtain the right-eye projected coordinates. To ensure that the left and right projection points are aligned, at the same height, and share the same target center (i.e., both have the same y-coordinate, with only the x-coordinate differing), the pixel disparity is calculated using the formula based on the left and right projection coordinates. The unit is pixels (px). The fixed hardware parameter data of the detector, pre-calibrated at the factory, is obtained, including the baseline distance B of the binocular camera, the equivalent focal length f of the camera, and the physical size Npixel of a single sensor pixel. All parameters are constant and do not change with the scene. The depth distance is calculated based on the pixel parallax combined with the hardware parameter data. The binocular stereo vision depth formula is Z=(B×f) / (d×Npixel), where Z represents the horizontal depth distance from the flame target to the camera, in meters. In this embodiment, the baseline distance B of the binocular camera is 0.4m, the equivalent focal length f of the camera is 0.012m, and the physical size Npixel of a single sensor pixel is... And based on the detected flame object pixel parallax d=40px, the depth distance was calculated. The system combines depth and distance information, using the left eye image pixel coordinates (x, y) as the planar position and the calculated depth Z as the distance information, to output a three-dimensional spatial coordinate (x, y, Z), where x represents the horizontal pixel, y represents the vertical pixel, and Z represents the actual physical distance. The system then performs validity checks based on these three-dimensional spatial coordinates, determining if the pixel parallax d is within a reasonable range and if the depth distance Z is within the effective detection range (e.g., 0 to 50 meters), excluding outliers. If the checks pass, the location is considered a valid fire location, and the flame's three-dimensional spatial coordinates are obtained. If the checks fail, the location is marked as invalid, and no linkage is triggered. The flame's three-dimensional spatial coordinates are then sent to the monitoring platform and fire extinguishing controller, outputting a fire alarm signal, location information, confidence level information, and distance information. This triggers linkage devices such as water cannons, sprinklers, and audible and visual alarms to perform precise fire extinguishing operations. The flame's three-dimensional spatial coordinates (x, y, Z) and the alarm linkage commands are archived, completing the entire detection and positioning closed-loop process.

[0051] According to an embodiment of the present invention, after obtaining the three-dimensional spatial coordinates of the flame, the method further includes: calculating the flame volume change rate based on the three-dimensional spatial coordinates of the flame and classifying the intensity level in conjunction with a preset flame intensity discrimination model to obtain multi-dimensional fire situation information, specifically: The three-dimensional projected area sequence is obtained by calculating based on the three-dimensional spatial coordinates of the flame; The flame volume change rate is calculated based on the three-dimensional projected area sequence. The intensity level is classified according to the flame volume change rate and a preset flame intensity discrimination model to obtain flame intensity level information. The fire intensity level information, three-dimensional spatial coordinates of the flame, main direction of flame spread, and prediction results of flame spread trend are integrated to obtain multi-dimensional fire situation information and send it to the monitoring platform.

[0052] The calculation process involves using the three-dimensional spatial coordinates of flames from multiple consecutive frames. The sequence of three-dimensional spatial coordinates of flames detected in M ​​consecutive frames is stored in a three-dimensional trajectory buffer, where M ranges from 30 to 60 frames, corresponding to 1 to 2 seconds of real-time data. Simultaneously, the detection box area is extracted from each frame's flame detection result; this is the product of the differences between the lower right and upper left corner coordinates of the detection box in both the horizontal and vertical directions. Combined with the depth distance of that frame, the projected area of ​​the flame in three-dimensional space is calculated. The projected area is the detection box area multiplied by the square of the ratio of the depth distance to the calibrated reference distance (set to 10 meters). This yields a sequence of three-dimensional projected areas for M consecutive frames. The area sequence is calculated by dividing the difference between the 3D projected area of ​​the last frame and the 3D projected area of ​​the first frame by the time difference between the last and first frames, and then multiplying by the estimated vertical rise velocity of the flame. The estimated vertical rise velocity of the flame is obtained from a table based on the flame type: 0.3 m / s to 0.5 m / s for candle flames, 0.8 m / s to 1.5 m / s for solid combustion flames, and 0.5 m / s to 1.0 m / s for liquid combustion flames. This yields the flame volume change rate. Based on the flame volume change rate and a preset flame intensity discrimination model, the intensity level is classified. The flame intensity level is determined according to the numerical range of the flame volume change rate. A change rate of less than 0.01 cubic meters per second is classified as Level 1, a weak flame corresponding to the initial smoldering stage; a change rate between 0.01 and 0.05 cubic meters per second is classified as Level 2, a moderate flame corresponding to the open flame development stage; a change rate between 0.05 and 0.2 cubic meters per second is classified as Level 3, a fierce flame corresponding to the rapid spread stage; and a change rate of 0.2 cubic meters per second or higher is classified as Level 4, an extreme flame corresponding to the deflagration or large-scale fire stage. Based on the obtained flame intensity level information, each flame intensity level corresponds to a different fire extinguishing resource allocation strategy. Level 1, a weak flame, initiates monitoring and recording mode; Level 2, a moderate flame, triggers an audible and visual alarm and notifies on-duty personnel; Level 3, a strong flame, and a large-scale fire are all classified as Level 4. When a level 1 intense flame is detected, automatic sprinklers and water cannons are activated in conjunction to extinguish the fire. When a level 4 extreme flame is detected, an emergency fire hazard signal is triggered across the entire area and reported to the fire command center. The system integrates information on flame intensity level, three-dimensional spatial coordinates of the flame, main direction of flame spread, and predicted flame spread trend to obtain multi-dimensional fire situation information. This information is then encapsulated according to a preset communication protocol and sent to the monitoring platform via TCP / IP or MQTT. The monitoring platform visualizes the multi-dimensional fire situation information on a three-dimensional spatial model, including flame location markings, intensity level color blocks, arrows indicating the direction of spread, and heat maps of safe areas, providing real-time data support for fire-fighting decisions.

[0053] A third aspect of the present invention provides a readable storage medium comprising a program for an image fire detector detection method based on a YOLOv3 network model. When the program for an image fire detector detection method based on a YOLOv3 network model is executed by a processor, it implements the steps of the image fire detector detection method based on a YOLOv3 network model as described in any of the preceding claims.

[0054] This invention discloses an image fire detector detection method, system, and medium based on a YOLOv3 network model. It acquires and pairs binocular raw image data to obtain time-aligned binocular image pairs, encapsulates them, and obtains a binocular raw image dataset. The dataset is then processed to obtain labeled image data, which is segmented to obtain a standardized labeled dataset. A YOLOv3 network model configuration file is acquired and configured to obtain an optimal basic prediction model file, which is then cross-compiled with the YOLOv3 network model to obtain an executable detection model file. This executable detection model file is initialized, and standardized real-time image data to be detected is obtained and detected to obtain flame detection results. Based on the flame detection results and the binocular raw image dataset, calculations are performed to obtain three-dimensional spatial coordinates and determine their validity. The three-dimensional spatial coordinates of the flame are then obtained. Through binocular raw image data acquisition, data preprocessing and labeling, YOLOv3 network model training, real-time flame target detection, and binocular disparity spatial positioning, this invention achieves code-free secondary optimization, recognition of flames of varying sizes, and rapid spatial positioning, meeting national standard requirements for response speed and positioning accuracy.

[0055] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0056] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0057] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0058] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0059] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. An image fire detector detection method based on a YOLO3 network model, characterized in that, Includes the following steps: Acquire the original stereo image data and pair them to obtain time-aligned stereo image pairs, then encapsulate them to obtain the original stereo image dataset. The binocular raw image dataset is processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. Obtain the YOLO3 network model configuration file to configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file; The executable detection model file is initialized to obtain standardized real-time image data to be detected and then detected to obtain flame detection results. The flame detection results are combined with the binocular original image dataset to calculate and obtain the three-dimensional spatial coordinates of the flame, and the validity is judged to obtain the three-dimensional spatial coordinates of the flame.

2. The image fire detector detection method based on the YOLO3 network model according to claim 1, characterized in that, The process of acquiring and pairing binocular raw image data to obtain time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset includes: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

3. The image fire detector detection method based on the YOLO3 network model according to claim 2, characterized in that, The process of processing the original stereo image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

4. The image fire detector detection method based on the YOLO3 network model according to claim 1, characterized in that, The process of obtaining the YOLO3 network model configuration file, configuring the network model to obtain the optimal basic prediction model file, and cross-compiling it with the YOLO3 network model to obtain an executable detection model file includes: Obtain the YOLO3 network model configuration file and solidify the YOLO3 network model parameters. The YOLO3 network model is trained using the standardized labeled dataset to obtain the optimal base prediction model file; The optimal basic prediction model file is cross-compiled with the YOLO3 network model to obtain an executable detection model file.

5. The image fire detector detection method based on the YOLO3 network model according to claim 1, characterized in that, The process of initializing based on the executable detection model file, obtaining standardized real-time image data to be detected, and performing detection to obtain flame detection results includes: Initialize according to the executable detection model file; The real-time image to be detected is acquired and standardized to obtain standardized real-time image data to be detected. The detection model is used to detect standardized real-time image data to obtain the optimal detection box. The flame detection result is obtained by calculating based on the optimal detection frame.

6. The image fire detector detection method based on the YOLO3 network model according to claim 1, characterized in that, The step of calculating and determining the three-dimensional spatial coordinates of the flame based on the flame detection results and the binocular original image dataset, and then performing a validity judgment, includes: The pixel disparity is calculated based on the flame detection results and the binocular original image dataset. Acquire detector hardware parameter data, including the baseline distance of the binocular cameras, the equivalent focal length of the cameras, and the physical size of a single pixel of the sensor; The depth distance is calculated based on the pixel parallax and the hardware parameter data. The three-dimensional spatial coordinates are obtained by combining the depth and distance. The validity of the flame is determined based on the three-dimensional spatial coordinates, and the three-dimensional spatial coordinates of the flame are obtained.

7. The image fire detector detection system based on the yolo3 network model, characterized in that, The system includes a memory and a processor. The memory contains a program for an image fire detector detection method based on a YOLOv3 network model. When the program for the image fire detector detection method based on a YOLOv3 network model is executed by the processor, it performs the following steps: Acquire the original stereo image data and pair them to obtain time-aligned stereo image pairs, then encapsulate them to obtain the original stereo image dataset. The binocular raw image dataset is processed to obtain labeled image data, which is then divided to obtain a standardized labeled dataset. Obtain the YOLO3 network model configuration file to configure the network model, obtain the optimal basic prediction model file, and cross-compile it with the YOLO3 network model to obtain an executable detection model file; The executable detection model file is initialized to obtain standardized real-time image data to be detected and then detected to obtain flame detection results. The flame detection results are combined with the binocular original image dataset to calculate and obtain the three-dimensional spatial coordinates of the flame, and the validity is judged to obtain the three-dimensional spatial coordinates of the flame.

8. The image fire detector detection system based on the YOLO3 network model according to claim 7, characterized in that, The process of acquiring and pairing binocular raw image data to obtain time-aligned binocular image pairs and encapsulating them to obtain a binocular raw image dataset includes: Acquire the original image data from the binoculars, including the original image data from the left view and the original image data from the right view; Pairing is performed based on the original binocular image data to obtain time-aligned binocular image pairs; The data is encapsulated based on the time-aligned stereo images to obtain the original stereo image dataset.

9. The image fire detector detection system based on the YOLOv3 network model according to claim 8, characterized in that, The process of processing the original stereo image dataset to obtain labeled image data and dividing it to obtain a standardized labeled dataset includes: The binocular original image dataset is subjected to scale unification, deduplication and denoising processing to obtain a standardized binocular image dataset. Annotated image data is obtained by labeling the standardized binocular image dataset. The labeled image data is divided to obtain a standardized labeled dataset; The standardized annotation dataset includes 608×608 denoised images, target annotation information files, training set train.txt, validation set val.txt, and test set test.txt.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises an image fire detector detection method program based on a YOLO3 network model, and the image fire detector detection method program based on the YOLO3 network model is executed by the processor to realize the steps of the image fire detector detection method based on the YOLO3 network model in any one of claims 1 to 6.