Flame detection method, apparatus and electronic device

By using image acquisition and detection models with different exposure times and resolutions, the detection difficulties caused by flame overexposure were solved, and the accuracy of flame detection was improved.

CN122448843APending Publication Date: 2026-07-24HANGZHOU HIKFIRE TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU HIKFIRE TECH LTD
Filing Date
2026-05-26
Publication Date
2026-07-24

Smart Images

  • Figure CN122448843A_ABST
    Figure CN122448843A_ABST
Patent Text Reader

Abstract

The present application provides a flame detection method, device and electronic equipment. In the case that there is a suspected flame in a first image with a long exposure time, but there is no suspected flame in a second image with a short exposure time, the second exposure time of the second image is adjusted so that the suspected flame can be normally displayed in the second image. In the case that the suspected flame is detected in the second image, target flame detection is performed based on the detected suspected flame in the second image to detect whether there is a real flame in the current scene, thereby reducing overexposure and improving the accuracy of flame detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a flame detection method, apparatus, and electronic device. Background Technology

[0002] In practical applications, to detect whether a flame exists in the current scene, image sensors typically perform target detection on images of the current scene to determine if a flame exists in the environment. However, because the light emitted by a flame is brighter than most objects in a normal environment, the flame in the image captured by the image sensor is often overexposed. In this case, only a bright mass can be seen in the image, and the outline of the flame cannot be identified, making target detection difficult. Summary of the Invention

[0003] In view of this, this application provides a flame detection method, apparatus and electronic equipment to improve the accuracy of flame detection.

[0004] The technical solution provided in this application is as follows: According to an embodiment of the first aspect of this application, a flame detection method is provided, the method comprising: First and second images of the current scene are acquired based on different exposure times, wherein the first exposure time of the first image is greater than the second exposure time of the second image; Preliminary flame detection is performed on the first image and the second image; If a suspected flame is detected in the first image and no suspected flame is detected in the second image, the second exposure time is adjusted, and the first and second images of the current scene are re-acquired based on the first exposure time and the adjusted second exposure time. Then, the operation of performing preliminary flame detection on the first and second images is returned. If a suspected flame is detected in the second image, target flame detection is performed based on the suspected flame detected in the second image to determine whether a real flame exists in the current scene.

[0005] According to an embodiment of a second aspect of this application, a flame detection device is provided, the device comprising: An image acquisition unit is used to acquire a first image and a second image of the current scene based on different exposure times, wherein the first exposure time of the first image is greater than the second exposure time of the second image; A preliminary detection unit is used to perform preliminary flame detection on the first image and the second image; The parameter adjustment unit is used to adjust the second exposure time when a suspected flame is detected in the first image and no suspected flame is detected in the second image, and to trigger the re-acquisition of the first image and the second image in the current scene based on the first exposure time and the adjusted second exposure time, and to return to the operation of performing preliminary flame detection on the first image and the second image. The target detection unit is used to perform target flame detection based on the suspected flame detected in the second image when a suspected flame is detected in the second image, so as to determine whether a real flame exists in the current scene.

[0006] According to an embodiment of a third aspect of this application, an electronic device is provided, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor being configured to execute the machine-executable instructions to implement the method as described in the first aspect.

[0007] As can be seen from the above technical solutions, the proposed solution adjusts the second exposure time of the second image when a suspected flame exists in the first image with a longer exposure time, but no suspected flame exists in the second image with a shorter exposure time, so that the suspected flame can be displayed normally in the second image. Furthermore, when a suspected flame is detected in the second image, target flame detection is performed based on the detected suspected flame in the second image to detect whether there is a real flame in the current scene, thereby reducing overexposure and improving the accuracy of flame detection. Attached Figure Description

[0008] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the principles of this application.

[0009] Figure 1 This is a flowchart of a flame detection method provided in an embodiment of this application; Figure 2 A first image schematic diagram provided for an embodiment of this application; Figure 3 A second image schematic diagram provided for an embodiment of this application; Figure 4 This is a schematic diagram of the overall process of the flame detection method provided in the embodiments of this application; Figure 5 This is a structural diagram of the flame detection device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0010] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0011] In practical applications, in order to detect whether there is a flame in the current scene, the image of the current scene captured by the image sensor is usually used for target detection to determine whether there is a flame in the current environment.

[0012] However, because the light emitted by a flame is brighter than most objects in a normal environment, flames often appear overexposed in images captured by image sensors. In such cases, only a bright object can be seen in the image, and the outline of the flame cannot be identified, making it difficult to detect the target.

[0013] Based on this, this application proposes a flame detection method to improve the accuracy of flame detection.

[0014] Please refer to Figure 1 , Figure 1 This is a flowchart of a flame detection method provided in an embodiment of this application.

[0015] like Figure 1 As shown, the method may include the following steps: Step 101: Acquire the first and second images of the current scene based on different exposure times.

[0016] In this embodiment, the first exposure time of the first image is greater than the second exposure time of the second image. For ease of description, the first image can be referred to as a long frame, and the second image as a short frame.

[0017] Please refer to Figure 2 , Figure 2 This is a first image schematic diagram provided for an embodiment of this application.

[0018] like Figure 2 As shown, in the first image, due to the long exposure time, the flame area is overexposed, making it impossible to identify the outline of the flame. Therefore, the target detection model cannot be used to identify the flame in the first image.

[0019] Please refer to Figure 3 , Figure 3 This is a second schematic diagram provided for an embodiment of this application.

[0020] like Figure 3 As shown, in the second image, due to the shorter exposure time, the overall image brightness is lower. Therefore, the brighter flame areas are not overexposed, making it easier to identify the flame areas through the second image.

[0021] As one example, the first image and the second image are acquired alternately by the same image sensor; Alternatively, the first image is acquired by a first image sensor, and the second image is acquired by a second image sensor; wherein the second image sensor is equipped with an infrared filter to perform infrared filtering on the second image.

[0022] In this embodiment, the first image and the second image can be obtained in the following two ways: (1) Alternating acquisition using a single image sensor In this embodiment, a first image and a second image can be acquired alternately using an image sensor. For example, within one acquisition cycle, the first image can be acquired first, followed by the second image (or the second image can be acquired first, followed by the first image; this application does not limit this).

[0023] (2) Acquire data using dual image sensors. In this embodiment, a dual-image sensor scheme can also be used, such as a first image sensor acquiring a first image and a second image sensor acquiring a second image.

[0024] It should be noted that the first image sensor and the second image sensor can be controlled to acquire images synchronously to ensure that the first image and the second image can reflect the current scene at the same moment.

[0025] In this embodiment, the second image sensor may be equipped with an infrared filter to filter the second image with infrared light and prevent the flame from being overexposed.

[0026] In this embodiment, initial acquisition parameters can be set before acquiring the first and second images. These acquisition parameters may include gain and exposure time. Here, the acquisition parameters for the long frame, i.e., the first image, are automatically adapted by the camera based on the ambient brightness. The acquisition parameters for the second image have a preset initial value, which can be adjusted according to the ambient brightness.

[0027] Specifically, the current environment can be determined as a strong light environment or a weak light environment based on the gain in the first acquisition parameter. If the current environment is a bright light environment, the exposure time in the second acquisition parameter is set to the specified exposure time, and the gain included in the second acquisition parameter is set to the specified gain; if the current environment is a low light environment, the initial second acquisition parameter remains unchanged.

[0028] As an example, because lighting conditions differ between day and night, and between indoor and outdoor lighting conditions, environments can be categorized into high-light environments and low-light environments.

[0029] Specifically, the current environment can be determined as either strong light or weak light based on the gain in the first acquisition parameters of the first image that the camera adapts to automatically. If the first gain corresponding to the first image is 0, the current environment is determined to be strong light; otherwise, the current environment is determined to be weak light.

[0030] When the current environment is detected to be a low-light environment, for example, when the first gain of the first image is detected to be greater than 0, the second exposure time of the second image can be adjusted to 1 / 1000 second and the second gain can be adjusted to 0. The adjustment values ​​here are only illustrative examples, and the specific values ​​can be determined according to the actual use scenario. This application does not impose any restrictions on this.

[0031] This concludes the description of step 101. We will now proceed to step 102.

[0032] Step 102: Perform preliminary flame detection on the first and second images.

[0033] In this embodiment, after obtaining the first image and the second image, preliminary flame detection can be performed on the first image and the second image to detect whether there is a suspected flame in the first image and the second image respectively.

[0034] Specifically, the method for preliminary flame detection on the first and second images may include: The brightness of the first image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame; the adjusted first image is input into a pre-trained preliminary flame detection model, and the presence of a suspected flame in the first image is determined based on the output preliminary flame detection results; The brightness of the second image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted second image is then input into a pre-trained preliminary flame detection model, and the presence of a suspected flame in the second image is determined based on the output preliminary flame detection results.

[0035] As an example, the brightest 10% or 20% of the image can be used as a benchmark for calculation, since flames are usually the brightest areas in the image. The specified pixel area here can be the brightest 10% or 20% of the image. The brightness value of the brightest 10% or 20% of the image is adjusted to the brightness range that the human eye can normally observe, that is, the brightness value is adjusted to be lower than the brightness range of the flame, so as to remove the interference source in the image.

[0036] In this embodiment, the preliminary flame detection model can be a high-resolution detection model to locate suspected flame areas from the first or second image. For example, the image resolution required by the preliminary flame detection model can be 1920×1440 pixels to obtain richer image details and avoid missing tiny suspected flames.

[0037] This concludes the description of step 102. We will now proceed to step 103.

[0038] Step 103: If a suspected flame is detected in the first image and no suspected flame is detected in the second image, adjust the second exposure time, trigger the re-acquisition of the first and second images in the current scene based on the first exposure time and the adjusted second exposure time, and return to the operation of performing preliminary flame detection on the first and second images.

[0039] In this embodiment, preliminary flame detection can be performed in step 102 to obtain preliminary flame detection results, which may include the detection of a suspected flame or the absence of a suspected flame.

[0040] If a suspected flame is detected in the first image but not in the second image, the second exposure time of the second image can be adjusted so that the suspected flame is clearly displayed in the second image.

[0041] Specifically, the second exposure time can be adjusted in an increasing manner, where the adjusted second exposure time is shorter than the first exposure time.

[0042] Considering that the exposure time cannot be increased indefinitely, after adjusting the second exposure time, and before triggering the re-acquisition of the first and second images of the current scene based on the first exposure time and the adjusted second exposure time, the method may further include: Determine whether the adjusted second exposure time is greater than the preset upper limit of the second exposure time. If not, continue to trigger the operation of re-collecting the current scene under the first exposure time and the adjusted second exposure time. If so, adjust the second gain to trigger the operation of re-capturing the current scene to obtain a second image under the second exposure time before adjustment and the second gain after adjustment.

[0043] In this embodiment, after each adjustment of the second exposure time, it can be further determined whether the adjusted second exposure time is greater than the preset upper limit of the second exposure time, which is less than the first exposure time.

[0044] If it is found that the adjusted second exposure time is not greater than the upper limit of the second exposure time, the step of re-collecting the current scene under the first exposure time and the adjusted second exposure time can be triggered.

[0045] If the adjusted second exposure time is found to be greater than the upper limit of the second exposure time, it indicates that it is no longer possible to make the image display a suspected flame by adjusting the exposure time. In this case, the second gain of the second image can be adjusted, and the current scene can be re-captured at the second exposure time before adjustment and the second gain after adjustment to obtain the second image.

[0046] The second gain can also be adjusted incrementally, and this application does not impose any restrictions on this.

[0047] As an example, after the first image and the second image are respectively sent to the preliminary flame detection model, the suspected flames in the picture are detected by the image with higher resolution. The preliminary flame detection model has a high tolerance for targets and may also detect some non-flame areas, such as lights, as suspected flames.

[0048] If a suspected flame is detected in the first image but not in the second image, the exposure time and gain of the second image can be dynamically adjusted. The exposure time can be adjusted first, for example, from 1 / 1000 second to 1 / 500 second. If the second image still fails to detect a suspected flame after adjusting the exposure time to the maximum, the second gain can be incrementally adjusted to the highest threshold of 40. This threshold can be adjusted according to the environment; for example, a threshold of 20 in a no-light environment and a threshold of 40 in a light-lit environment. This application does not impose any restrictions on this.

[0049] This concludes the description of step 103. We will now proceed to step 104.

[0050] Step 104: If a suspected flame is detected in the second image, target flame detection is performed based on the suspected flame detected in the second image to determine whether a real flame exists in the current scene.

[0051] In this embodiment, if a suspected flame is detected in the second image, a more refined target flame detection model can be used for further detection to determine whether a real flame exists in the current scene.

[0052] In this embodiment, to avoid false detections of suspected flames in the second image, a detection confirmation mechanism can be introduced. For example, if a suspected flame is detected in the same location in multiple consecutive frames (e.g., 6 consecutive frames) of the second image by a preliminary detection model, or if a suspected flame is detected in multiple consecutive frames within a specified time period (e.g., 1.5 seconds) of the second image, it can be determined that a suspected flame has been detected in the second image. At this time, the step of detecting a target flame based on the suspected flame detected in the second image can continue to be performed to determine whether there is a real flame in the current scene.

[0053] As one embodiment, a specific method for detecting a target flame based on a suspected flame detected in the second image to determine whether a real flame exists in the current scene may include: Based on the position coordinates of the suspected flame in the second image, a first partial image is cropped from the second image according to a preset size; wherein, the first partial image includes the suspected flame; For multiple consecutive frames of the second image acquired after the second image, corresponding local images are cropped according to the position coordinates and the preset size to obtain a local image sequence; The local image sequence is input into a trained target flame detection model to determine whether a real flame exists in the current scene based on the output target flame detection results.

[0054] In this embodiment, when a suspected flame is detected in the second image, regardless of whether a suspected flame is detected in the first image, further target flame detection can be performed based on the suspected flame detected in the second image. That is, multiple consecutive frames of the second image are used to verify the above preliminary detection results to determine whether a real flame exists.

[0055] Specifically, based on the precise location information of the suspected flame in the second image (such as the coordinates of the center point of the bounding box of the suspected flame area), an image region can be cropped from the second image containing the detected suspected flame at a preset size (such as 960 pixels × 540 pixels), and denoted as the first partial image. This first partial image completely includes the suspected flame target and the background image within a certain range around it.

[0056] The preset size here can be set according to actual needs. For example, the preset size can be set to be consistent with the input image size required by the target flame detection model that has been trained in subsequent steps to ensure data input compatibility.

[0057] After obtaining the first partial image corresponding to the second image that detected the suspected flame, multiple subsequent frames of second images (i.e., subsequent frames) can be acquired and the same cropping operation performed. That is, for each subsequent frame, cropping is performed based on the same center coordinates and preset size as the first partial image.

[0058] In other words, in this embodiment, the suspected flame location is not re-detected in every subsequently acquired second image. Instead, based on the initial detection of the suspected flame location, the same area is observed at the same spatial location in subsequent frames. This results in a sequence of local images composed of a first local image and local images from multiple subsequent frames arranged chronologically.

[0059] Furthermore, the constructed local image sequence can be input as a whole into a pre-trained target flame detection model. This target flame detection model can be a machine learning model (such as a convolutional neural network model) used to identify real flames from the local image sequence, and then determine whether a real flame exists in the current scene based on the target flame detection result output by the target flame detection model.

[0060] In this embodiment, the internal processing of the target flame detection model may include: Analyze each frame of the local image sequence to determine if flame features are present within the local image. If flame features are not present in the local images of subsequent consecutive frames, it indicates that the flame is not a real flame.

[0061] By analyzing the temporal feature changes of each local image in a local image sequence, the persistence and stability of the flame target can be evaluated. For example, considering that the position of a real flame usually does not fluctuate significantly within consecutive frames, if the position of the flame feature fluctuates greatly in a local image sequence, it indicates that the flame in that local image sequence may be a source of interference such as car headlights, rather than a real flame.

[0062] Furthermore, the model can integrate the detection of the entire local image sequence to ultimately output the target flame detection result. This result is based on the fusion judgment of multi-frame information, which significantly improves its anti-interference ability and reliability compared to single-frame judgment.

[0063] In this embodiment, the specific internal processing flow of the target detection model will be combined with Figure 4 Detailed descriptions will not be repeated here.

[0064] In this embodiment, to avoid false alarms, when the target flame detection model shows that there is a real flame in the local image sequence, the brightness of the images in consecutive historical frames (i.e., multiple consecutive frames included in the local image sequence) can be used for verification.

[0065] Specifically, if the target flame detection result indicates the presence of a real flame within the local image sequence, then the brightness statistics of the suspected flame in each local image within the local image sequence are obtained. Based on the brightness statistics of the suspected flames in each local image within the local image sequence, the amount of brightness change is determined; If the change in brightness is greater than a preset change threshold, then it is determined that a real flame exists in the current scene; If the change in brightness is not greater than the preset change threshold, then it is determined that there is no real flame in the current scene.

[0066] In this embodiment, if the target flame detection result indicates that a real flame exists in the local image sequence, the brightness statistics of the last N local images in the local image sequence can be obtained. The brightness statistics can be the average brightness value of all pixels in the region, the brightness median that reflects the concentration trend of brightness distribution, or the brightness variance that reflects the brightness fluctuation, etc. This application does not impose any restrictions on this.

[0067] Furthermore, the brightness variation of the suspected flame in N consecutive local images can be determined based on the brightness statistics of the last N local images in the local image sequence. For example, the standard deviation of the brightness statistics of the N local images can be calculated. Here, the brightness variation is used to characterize the brightness fluctuation intensity of the suspected flame area in consecutive frames.

[0068] Since the brightness of a flame usually changes continuously during combustion (such as flickering), a threshold value for the amount of change can be preset to distinguish between a real flame with significant flickering characteristics and an interference source with stable brightness.

[0069] If the determined brightness change is found to be greater than the preset change threshold, it indicates that the brightness fluctuation characteristics in the N local images conform to the physical characteristics of a real flame, and are more likely to be a real flame rather than a light source such as a car headlight or street light with relatively stable brightness. In this case, it can be considered that a real flame exists in the current scene.

[0070] If the change in brightness is not greater than a preset threshold, it indicates that although the suspected flame area may resemble a flame in shape, its brightness remains almost unchanged, which does not conform to the dynamic characteristics of flame combustion. In this case, it is determined that the flame is more likely a light source with relatively stable brightness, such as car headlights or streetlights, and it can be concluded that there is no real flame in the current scene.

[0071] As an example, considering that the flame detection method proposed in this application is usually applied to resource-constrained edge devices (such as network cameras, IoT terminals, etc.), if the model with high-resolution image input is used throughout the detection process (i.e., the high-resolution model), the computational overhead of performing full-frame inference on high-resolution images is huge and the power consumption is high, and the computing power of edge devices is difficult to meet the requirements. Therefore, this application proposes a collaborative processing architecture consisting of a preliminary flame detection model (i.e., the high-resolution model) and a target flame detection model (i.e., the low-resolution model).

[0072] Specifically, the preliminary flame detection is performed by a preliminary flame detection model, the input image resolution required by the preliminary flame detection model is a first resolution, and the input image resolution required by the target flame detection model is a second resolution; wherein, the first resolution is greater than the second resolution.

[0073] In this embodiment, to reliably detect suspected flames in complex scenes, a high-resolution model is chosen as the initial detection model to extract rich detailed features, enabling the initial flame detection model to detect tiny bright spots or subtle texture changes. Although the high-resolution model is computationally complex and resource-intensive, the goal at this stage is to quickly filter out suspected flames in the current scene, tolerating a relatively low frame rate.

[0074] After identifying the suspected flame region in the second image through initial detection, the task shifts to continuous verification and tracking of this specific region across multiple frames. At this point, the target region is known and relatively small, and the verification focuses more on the region's dynamic characteristics (such as flickering and motion) and fine-grained classification over time. Therefore, the resolution of the input image can be reduced, and the low-resolution image can be fed into a low-resolution detection model (i.e., the target flame detection model). Because the low-resolution model has a more streamlined structure, it can continuously analyze, track, and classify the local regions (suspected flame regions) corresponding to consecutive frames at a higher frame rate, achieving real-time and stable monitoring with low power consumption.

[0075] In this embodiment, the first resolution can be a high-definition resolution of 1920×1440 pixels or higher to meet the fine scanning requirements under wide-field monitoring. The second resolution can be a low-resolution resolution of 960×540 pixels or similar.

[0076] In this embodiment, when performing step 104, the state of detecting subsequent frames through the target flame detection model is not maintained permanently. Instead, the current low-resolution detection process is terminated when specific conditions are met, and the process is switched back to the initial preliminary flame detection process.

[0077] Specifically, the aforementioned specific conditions may include the following: (1) Target continues to be lost In this embodiment, during the target flame detection process, each local image in the local image sequence is continuously analyzed. If the target flame detection model fails to detect any flame target in the local image within a consecutive preset time period (e.g., 20 seconds), it indicates that the initially identified suspected flame target has completely disappeared. This suggests that the suspected flame may have been a transient disturbance (e.g., a flying insect, a momentary reflection) rather than a real flame, or that the real flame has extinguished itself.

[0078] At this point, it is pointless to continue using computing resources to verify the area. We can switch back to the high-resolution model and rescan the current scene at high resolution to restore overall monitoring of the current scene.

[0079] (2) Abnormal target behavior In this embodiment, even if the target flame detection model can continuously detect the target, if it finds that the characteristics of the detected target do not clearly conform to the physical laws of flame, it can be determined as an invalid target and the model can be switched.

[0080] Specifically, during the detection of local images in a local image sequence, if the target's motion trajectory between local images exhibits physical characteristics inconsistent with real flames—for example, large, discontinuous jumps between consecutive frames; or if the movement speed and direction change patterns are completely inconsistent with the dynamics of burning and drifting flames—then the target may be vehicle headlights or reflected light spots rather than a real flame. Once this anomaly persists for a certain period, it can be determined that no real flame exists, and at this point, the detection can be switched back to high resolution.

[0081] (3) The target detection features are unstable In this embodiment, for unstable suspected flames, the proportion of frames where the low-resolution model successfully detects the target within a certain time window can be statistically analyzed. For example, if the proportion of frames successfully detecting the target is lower than a preset threshold (e.g., 20%) within a consecutive 5-second window; or if the proportion of frames matching the physical characteristics of a real flame's movement is lower than another threshold (e.g., 30%) within a consecutive 10-second window, this low detection rate indicates that the target signal is extremely weak or unstable, and is likely noise or a flickering light source. In this case, it is advisable to switch back to high-resolution detection.

[0082] Finally, after determining whether a real flame exists in the current scene, an alarm can be output based on the final detection results. For example, after confirming that a real flame exists in the current scene, an alarm can be issued based on the location of the detected real flame, so that relevant personnel can carry out subsequent processing.

[0083] This concludes the discussion on... Figure 1 The description.

[0084] The proposed solution adjusts the second exposure time of the second image when a suspected flame is present in the first image with a longer exposure time, but not in the second image with a shorter exposure time, so that the suspected flame can be displayed normally in the second image. Furthermore, if a suspected flame is detected in the second image, target detection is performed based on the detected suspected flame to detect whether a real flame exists in the current scene, thereby reducing overexposure and improving the accuracy of flame detection.

[0085] The following is based on Figure 4 The specific process of the flame detection method proposed in this application is described in detail.

[0086] Please refer to Figure 4 , Figure 4 This is a schematic diagram of the overall process of the flame detection method provided in the embodiments of this application.

[0087] like Figure 4 As shown, the method includes the following steps: First, it can be determined whether the current environment is a strong light environment or a weak light environment. Methods for determining whether the current environment is a strong light environment or a weak light environment can include: Based on the gain in the first acquisition parameters of the first image adapted by the camera, the system determines whether the current environment is bright light or low light. If the first gain corresponding to the first image is 0, the current environment is determined to be bright light; otherwise, the current environment is determined to be low light.

[0088] Alternatively, an initial image frame of the current environment can be acquired using an image sensor, and its average brightness value can be calculated to assess the current lighting conditions. The measured ambient brightness value can then be compared with a preset strong light threshold to determine whether the current environment is a strong light environment or a weak light environment.

[0089] After determining the current environment, you can further select the acquisition parameters for the current environment, and acquire the second image (short frame) of the current environment based on the acquisition parameters.

[0090] Simultaneously, the first image (long frame) of the current environment can be acquired, and both the first and second images can be input into the preliminary detection model (high-resolution model) to extract features based on the high-resolution model, ensuring that no small or early-stage suspected flames are missed.

[0091] If a suspected flame is detected in the first image but not in the second image, the parameters for acquiring the second image are adjusted to re-acquire the second image.

[0092] If a suspected flame is detected in the second image, the initial detection model's detection step is paused, and the subsequent suspected flame verification step is initiated.

[0093] Specifically, the coordinates of the suspected flame in the second image can be extracted. Using the coordinates of the suspected flame as the center and the input image resolution required by the target flame detection model as the target size, the second image can be cropped to obtain a local image.

[0094] The system acquires multiple consecutive frames, including the current second image, and performs the same cropping operation on each frame, ultimately stitching them together to form a local image sequence. This sequence preserves the dynamic changes of the target in the spatiotemporal dimensions.

[0095] Furthermore, the generated local image sequence is input into the target flame detection model. This target flame detection model can be a processing unit integrating multiple sub-modules, which performs the following operations in sequence: The target detection module detects flame targets in each local image of the local image sequence.

[0096] The tracking module associates and tracks detected flame targets to ensure their continuity and stability.

[0097] The analysis and processing module analyzes the temporal characteristics of the flame (such as flicker frequency, area change rate, edge jitter characteristics, etc.) to determine whether there is a real flame in the local image sequence.

[0098] The classification module categorizes the identified real flames to determine whether they are flames or smoke.

[0099] The target flame detection model integrates the processing results of all the above sub-modules and outputs the final detection result. If it is confirmed to be a real flame, an alarm mechanism can be triggered. If it is determined to be interference or a false alarm, no alarm will be triggered.

[0100] This concludes the discussion on... Figure 4 Description of flame detection methods.

[0101] Please refer to Figure 5 , Figure 5 This is a structural diagram of the flame detection device proposed in an embodiment of this application. Figure 4 As shown, the device may include an image acquisition unit 501, a preliminary detection unit 502, a parameter adjustment unit 503, and a target detection unit 504. Specifically, the device includes: Image acquisition unit 501 is used to acquire a first image and a second image of the current scene based on different exposure times, wherein the first exposure time of the first image is greater than the second exposure time of the second image; The preliminary detection unit 502 is used to perform preliminary flame detection on the first image and the second image; The parameter adjustment unit 503 is used to adjust the second exposure time when a suspected flame is detected in the first image and no suspected flame is detected in the second image, and to trigger the re-acquisition of the first image and the second image in the current scene based on the first exposure time and the adjusted second exposure time, and to return to the operation of performing preliminary flame detection on the first image and the second image. The target detection unit 504 is used to perform target flame detection based on the suspected flame detected in the second image when a suspected flame is detected in the second image, so as to determine whether there is a real flame in the current scene.

[0102] Optionally, the preliminary detection unit 502 is specifically used for: The brightness of the first image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted first image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the first image is determined based on the output preliminary flame detection results. The brightness of the second image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted second image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the second image is determined based on the output preliminary flame detection results. And / or, the second image was acquired at the current second gain; after adjusting the second exposure time, and before triggering the re-acquisition of the first and second images of the current scene based on the first exposure time and the adjusted second exposure time, the parameter adjustment unit 503 is further configured to: Determine whether the adjusted second exposure time is greater than the preset upper limit of the second exposure time; If not, continue to trigger the operation of re-capturing the current scene at the first exposure time and the adjusted second exposure time; If so, adjust the second gain to trigger the operation of re-capturing the current scene to obtain a second image at the second exposure time before adjustment and the second gain after adjustment; And / or, the target detection unit 504 is specifically used for: Based on the position coordinates of the suspected flame in the second image, a first partial image is cropped from the second image according to a preset size; wherein, the first partial image includes the suspected flame; For multiple consecutive frames of the second image acquired after the second image, corresponding local images are cropped according to the position coordinates and the preset size to obtain a local image sequence; The local image sequence is input into a trained target flame detection model to determine whether a real flame exists in the current scene based on the output target flame detection results; And / or, the preliminary flame detection is performed by a preliminary flame detection model, the preliminary flame detection model requires an input image resolution of a first resolution, and the target flame detection model requires an input image resolution of a second resolution; wherein, the first resolution is greater than the second resolution; And / or, the target detection unit 504 is specifically used for: If the target flame detection result indicates that a real flame exists within the local image sequence, then the brightness statistics of the suspected flame in each local image within the local image sequence are obtained. Based on the brightness statistics of the suspected flames in each local image within the local image sequence, the amount of brightness change is determined; If the change in brightness is greater than a preset change threshold, then it is determined that a real flame exists in the current scene; If the change in brightness is not greater than the preset change threshold, then it is determined that there is no real flame in the current scene; And / or, the first image and the second image are acquired alternately by the same image sensor; Alternatively, the first image is acquired by a first image sensor, and the second image is acquired by a second image sensor; wherein the second image sensor is equipped with an infrared filter to perform infrared filtering on the second image.

[0103] This concludes the discussion on... Figure 5 Description of the device.

[0104] This application also provides embodiments that... Figure 5 Hardware structure description of the illustrated device. This hardware structure is... Figure 6 The structure in the illustrated electronic device. Please refer to [link / reference]. Figure 6 , Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Figure 6 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.

[0105] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.

[0106] For example, the aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, computer-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0107] The above are merely preferred embodiments of this application and are not intended to limit the application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A flame detection method, characterized in that, The method includes: First and second images of the current scene are acquired based on different exposure times, wherein the first exposure time of the first image is greater than the second exposure time of the second image; Preliminary flame detection is performed on the first image and the second image; If a suspected flame is detected in the first image and no suspected flame is detected in the second image, the second exposure time is adjusted, and the first and second images of the current scene are re-acquired based on the first exposure time and the adjusted second exposure time. Then, the operation of performing preliminary flame detection on the first and second images is returned. If a suspected flame is detected in the second image, target flame detection is performed based on the suspected flame detected in the second image to determine whether a real flame exists in the current scene.

2. The method according to claim 1, characterized in that, The preliminary flame detection of the first image and the second image includes: The brightness of the first image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted first image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the first image is determined based on the output preliminary flame detection results. The brightness of the second image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted second image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the second image is determined based on the output preliminary flame detection results.

3. The method according to claim 1, characterized in that, The second image is acquired at the current second gain; after adjusting the second exposure time, and before triggering the re-acquisition of the first and second images of the current scene based on the first exposure time and the adjusted second exposure time, the method further includes: Determine whether the adjusted second exposure time is greater than the preset upper limit of the second exposure time; If not, continue to trigger the operation of re-capturing the current scene at the first exposure time and the adjusted second exposure time; If so, adjust the second gain to trigger the operation of re-capturing the current scene to obtain a second image at the second exposure time before adjustment and the second gain after adjustment.

4. The method according to claim 1, characterized in that, The step of detecting a target flame based on the suspected flame detected in the second image to determine whether a real flame exists in the current scene includes: Based on the position coordinates of the suspected flame in the second image, a first partial image is cropped from the second image according to a preset size; wherein, the first partial image includes the suspected flame; For multiple consecutive frames of the second image acquired after the second image, corresponding local images are cropped according to the position coordinates and the preset size to obtain a local image sequence; The local image sequence is input into a trained target flame detection model to determine whether a real flame exists in the current scene based on the output target flame detection results.

5. The method according to claim 4, characterized in that, The preliminary flame detection is performed by a preliminary flame detection model. The preliminary flame detection model requires a first resolution for the input image, and the target flame detection model requires a second resolution for the input image; wherein the first resolution is greater than the second resolution.

6. The method according to claim 4, characterized in that, The determination of whether a real flame exists in the current scene based on the output target flame detection result includes: If the target flame detection result indicates that a real flame exists within the local image sequence, then the brightness statistics of the suspected flame in each local image within the local image sequence are obtained. Based on the brightness statistics of the suspected flames in each local image within the local image sequence, the amount of brightness change is determined; If the change in brightness is greater than a preset change threshold, then it is determined that a real flame exists in the current scene; If the change in brightness is not greater than the preset change threshold, then it is determined that there is no real flame in the current scene.

7. The method according to claim 1, characterized in that, The first image and the second image were acquired alternately by the same image sensor; Alternatively, the first image is acquired by a first image sensor, and the second image is acquired by a second image sensor; wherein the second image sensor is equipped with an infrared filter to perform infrared filtering on the second image.

8. A flame detection device, characterized in that, The device includes: An image acquisition unit is used to acquire a first image and a second image of the current scene based on different exposure times, wherein the first exposure time of the first image is greater than the second exposure time of the second image; A preliminary detection unit is used to perform preliminary flame detection on the first image and the second image; The parameter adjustment unit is used to adjust the second exposure time when a suspected flame is detected in the first image and no suspected flame is detected in the second image, and to trigger the re-acquisition of the first image and the second image in the current scene based on the first exposure time and the adjusted second exposure time, and to return to the operation of performing preliminary flame detection on the first image and the second image. The target detection unit is used to perform target flame detection based on the suspected flame detected in the second image when a suspected flame is detected in the second image, so as to determine whether a real flame exists in the current scene.

9. The apparatus according to claim 8, characterized in that, The preliminary detection unit is specifically used for: The brightness of the first image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted first image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the first image is determined based on the output preliminary flame detection results. The brightness of the second image is adaptively adjusted so that the brightness value of a specified pixel area in the image is lower than the brightness range of the flame. The adjusted second image is input into the trained preliminary flame detection model, and the presence of a suspected flame in the second image is determined based on the output preliminary flame detection results. And / or, the second image was acquired at the current second gain; After adjusting the second exposure time, and before triggering the re-acquisition of the first and second images of the current scene based on the first exposure time and the adjusted second exposure time, the parameter adjustment unit is further configured to: Determine whether the adjusted second exposure time is greater than the preset upper limit of the second exposure time; If not, continue to trigger the operation of re-capturing the current scene at the first exposure time and the adjusted second exposure time; If so, adjust the second gain to trigger the operation of re-capturing the current scene to obtain a second image at the second exposure time before adjustment and the second gain after adjustment; And / or, the target detection unit is specifically used for: Based on the position coordinates of the suspected flame in the second image, a first partial image is cropped from the second image according to a preset size; wherein, the first partial image includes the suspected flame; For multiple consecutive frames of the second image acquired after the second image, corresponding local images are cropped according to the position coordinates and the preset size to obtain a local image sequence; The local image sequence is input into a trained target flame detection model to determine whether a real flame exists in the current scene based on the output target flame detection results; And / or, the preliminary flame detection is performed by a preliminary flame detection model, the preliminary flame detection model requires an input image resolution of a first resolution, and the target flame detection model requires an input image resolution of a second resolution; wherein, the first resolution is greater than the second resolution; And / or, the target detection unit is specifically used for: If the target flame detection result indicates that a real flame exists within the local image sequence, then the brightness statistics of the suspected flame in each local image within the local image sequence are obtained. Based on the brightness statistics of the suspected flames in each local image within the local image sequence, the amount of brightness change is determined; If the change in brightness is greater than a preset change threshold, then it is determined that a real flame exists in the current scene; If the change in brightness is not greater than the preset change threshold, then it is determined that there is no real flame in the current scene; And / or, the first image and the second image are acquired alternately by the same image sensor; Alternatively, the first image is acquired by a first image sensor, and the second image is acquired by a second image sensor; wherein the second image sensor is equipped with an infrared filter to perform infrared filtering on the second image.

10. An electronic device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute the machine-executable instructions to implement the method as described in any one of claims 1 to 7.