Smoke detection system and smoke detection method

The present disclosure discloses a smoke detection system and a smoke detection method. The smoke detection system includes a camera, a storage unit, and a processor. The camera acquires a current image and a previous image. The storage unit stores a plurality of modules. The processor is coupled with the camera and executes the plurality of modules. The processor generates a difference image based on the current image and the previous image. The processor inputs the current image and the difference image to a semantic segmentation model so that the semantic segmentation model outputs a smoke confidence map. The smoke confidence map is generated based on whether a current environment is a dark environment or a bright environment. The processor analyzes the smoke confidence map to determine whether a smoke event occurs in the current image. Therefore, a reliable smoke detection function can be achieved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the priority benefit of Taiwan application serial no. 110145827, filed on Dec. 8, 2021. The entirety of the above-mentioned patent applications are hereby incorporated by reference herein and made a part of this specification.

TECHNICAL FIELD

The present disclosure relates to a detection technology, and particularly to a smoke detection system and a smoke detection method.

BACKGROUND

According to a conventional smoke detection system, generally, a camera is provided to monitor a scene where the leakage of flammable and volatile substances may occur in a pipeline, so that the camera can send back a current scene image to an observer, and monitoring is carried out by the observer through judgment by eyes. However, the monitored scene may be influenced by the weather or illumination changes, and thus, when smoke is under influences by factors such as different color temperature changes of different environment light or smoke density changes, the smoke may be imperceptible for human eyes. Even more, based on the influences of factors such as that the shape of the smoke may be unsteady, the color of the smoke may be transparent or semitransparent, and the shape of the smoke may change dynamically, a conventional human eye detection method has problems of poor accuracy and detection efficiency.

SUMMARY

The present disclosure provides a smoke detection system and a smoke detection method, which can achieve a reliable smoke detection function.

The smoke detection system provided by the present disclosure includes a camera, a storage unit, and a processor. The camera acquires a current image and a previous image. The storage unit stores a plurality of modules. The processor is coupled with the camera and executes the plurality of modules to carry out the following operations: the processor generating a difference image based on the current image and the previous image; the processor inputting the current image and the difference image to a semantic segmentation model so that the semantic segmentation model outputs a smoke confidence map, wherein the smoke confidence map is generated based on whether a current environment is a dark environment or a bright environment; and the processor analyzing the smoke confidence map to determine whether a smoke event occurs in the current image.

The smoke detection method provided by the present disclosure includes steps of: acquiring a current image and a previous image by a camera; generating a difference image by a processor based on the current image and the previous image; inputting the current image and the difference image to a semantic segmentation model by the processor so that the semantic segmentation model outputs a smoke confidence map, wherein the smoke confidence map is generated based on whether a current environment is a dark environment or a bright environment; and analyzing the smoke confidence map by the processor to determine whether a smoke event occurs in the current image.

Based on the above, according to the smoke detection system and the smoke detection method provided by the present disclosure, it can be detected whether the smoke event occurs in a current scene with image analysis.

In order to make the features and advantages of the present disclosure clearer and easier to understand, embodiments are given below and illustrated in detail as follows in combination with the accompanying drawings.

DETAILED DESCRIPTION

In order to make the content of the present disclosure easier and clearer, embodiments are given below as examples by which the present disclosure can be implemented. In addition, wherever possible, elements/components/steps using the same numerical references in the drawings and the implementations represent the same or similar parts.

FIG.1is a circuit diagram of a smoke detection system according to an embodiment of the present disclosure. With reference toFIG.1, the smoke detection system100includes a processor110, a storage unit120, and a camera130. The processor110is coupled with the storage unit120and the camera130. In this embodiment, the smoke detection system100is adapted to be provided in a factory so as to, for example, carry out instant image monitoring on a pipeline for conveying a flammable or volatile substance in the factory, but the application of the present disclosure is not limited thereto. In this embodiment, the camera130can sequentially acquire images, and provide the images to the processor110for image processing and image analysis so as to determine whether a smoke event occurs in a current scene. In this embodiment, the processor110and the storage unit120may be provided at a cloud server, and the camera130may provide the images to this cloud server through a communication module. However, in an embodiment, the processor110, the storage unit120, and the camera130may also be integrated in a single device.

In this embodiment, the processor110may be, for example, a processing circuit or a control circuit, such as a Central Processing Unit (CPU), a Microprocessor Control Unit (MCU) or a Field Programmable Gate Array (FPGA), and the present disclosure is not limited thereto. In this embodiment, the storage unit120may be, for example, a memory, and is used for storing related modules, image data and related software programs or algorithms for the processor110to access and execute. The camera130may be a camera of a Complementary Metal Oxide Semiconductor (CMOS) Image Sensor (CIS) or a Charge Coupled Device (CCD).

FIG.2is a flow chart of a smoke detection method according to an embodiment of the present disclosure.FIG.3is a schematic diagram of image processing according to an embodiment of the present disclosure. With reference toFIG.1toFIG.3, the smoke detection system100may perform the steps S210to S240to achieve a smoke detection function. In this embodiment, the storage unit120may store a difference image generation module121, a semantic segmentation model122, a pixel confidence value determination module123, and a smoke alarm determination module124as shown inFIG.3. In the step S210, the smoke detection system100may acquire a current image302and a previous image301by the camera130. As shown inFIG.3, assume that a smoke event occurs in the current scene at a time point of the current image302, a smoke image3021may be included in the current image302. In the step S220, the smoke detection system100may generate a difference image303by the processor110based on the current image302and the previous image301. In this embodiment, the processor110may execute the difference image generation module121, and input the current image302and the previous image301to the difference image generation module121so that the difference image generation module121outputs the difference image303. The difference image generation module121may, for example, subtract a plurality of pixel values of the previous image301from a plurality of pixel values of the current image302so as to generate the difference image303with an image difference region3031(corresponding to a smoke occurrence region), but the present disclosure is not limited thereto, and the present disclosure will be illustrated in detail below by an embodiment inFIG.4. It should be noted that the difference image303is a gray-scale image.

In the step S230, the smoke detection system100may input the current image302and the difference image303to the semantic segmentation model122by the processor110so that the semantic segmentation model122outputs a smoke confidence map304. In this embodiment, the smoke confidence map304may be generated based on whether a current environment is a dark environment or a bright environment; and the smoke confidence map304output by the semantic segmentation model122may be a confidence value distribution map with two categories of normal (i.e. non-smoke) and smoke, wherein the smoke confidence map304may be a gray-scale image. In this embodiment, the semantic segmentation model122uses color channels of red (R) pixels, green (G) pixels, and a blue (B) pixels in the current image302and a gray-scale pixel channel of the difference image303as four channels of input data in a training phase or an execution phase, so as to learn to determine spatial information of an image and determine dynamic difference change information of the image changing over time. In this embodiment, the semantic segmentation model122may be, for example, modified and expanded based on a BiSeNetV2 semantic segmentation model, but the present disclosure is not limited thereto.

In the step S240, the smoke detection system100may analyze the smoke confidence map304by the processor110to determine whether a smoke event occurs in the current image302. In this embodiment, the processor110may execute the pixel confidence value determination module123to determine a number of smoke pixels each having a confidence value greater than a pixel confidence threshold in the smoke confidence map304based on the pixel confidence threshold, wherein each pixel in a region3041of the smoke confidence map304is a smoke pixel. As such, the processor110may determine whether the number of smoke pixels is greater than a smoke pixel threshold so as to determine whether a smoke event occurs in the current image302. In addition, in an embodiment, the processor110may also determine a smoke pixel distribution in the smoke confidence map304in combination, so as to determine whether the smoke event occurs in the current image302by determining whether an area of the smoke pixel region is greater than an area threshold.

Therefore, the processor110may in turn execute the smoke alarm determination module124so as to instantly detect whether a smoke event occurs in the current scene and correspondingly give an alarm. In this embodiment, the smoke detection system100may output a current image305marked with a smoke region3051to an external display device to instantly display a current scene image in which the smoke event occurs to a scene monitoring personnel through the external display device, so that the scene monitoring personnel can be efficiently notified of the smoke situation.

FIG.4is a flow chart of determining a current environment according to an embodiment of the present disclosure. With reference toFIG.1toFIG.4, the step S220inFIG.2and the approach of generating the difference image303by the difference image generation module121may also be implemented in a determination by the steps S410to S440inFIG.4. In the step S410, the smoke detection system100may subtract, by the processor110, a blue pixel average value (AVG_B) from a green pixel average value (AVG_G) for the current image302or the previous image301to obtain a pixel difference value (AVG_G−AVG_B). In the step S420, the smoke detection system100may determine whether the pixel difference value (AVG_G−AVG_B) is greater than or equal to a pixel threshold (AVG_TH) by the processor110.

If the pixel difference value is greater than or equal to the pixel threshold (AVG_G−AVG_B≥AVG_TH), in the step S430, the processor110determines that the current environment is the dark environment. The processor110may carry out an sRGB color space difference operation on the current image302and the previous image301and may obtain the difference image303. In addition, the processor110may correspondingly provide neural network parameters corresponding to the dark environment, e.g., the weight and the like, to the semantic segmentation model122, so that the semantic segmentation model122can effectively analyze the difference image303corresponding to the dark environment. In addition, in one embodiment, after the sRGB color space difference operation is carried out on the current image302and the previous image301, the processor110can also carry out at least one of an image erosion process and an image dilation process on the difference image303, so that needless bright and small noise points in the difference image303can be removed.

In this embodiment, the processor110may, for example, perform the sRGB color space difference operation of the following Formula (1) and Formula (2) on each pixel in the current image302and a corresponding pixel of the previous image301to obtain a pixel value (gray-scale value) of a corresponding pixel in the difference image303. In the following Formula (1), a parameter ΔC represents a pixel value (gray-scale value) of a pixel in the difference image303. A parameter ΔR2represents a square of a pixel difference value between a red sub-pixel of a pixel in the current image302and a corresponding red sub-pixel in the previous image301. A parameter ΔG2represents a square of a pixel difference value between a green sub-pixel of a pixel in the current image302and a corresponding green sub-pixel in the previous image301. A parameter ΔB2represents a square of a pixel difference value between a blue sub-pixel of a pixel in the current image302and a corresponding blue sub-pixel in the previous image301. A parameter R1 represents a pixel value of a red sub-pixel of a pixel in the current image302. A parameter R2 represents a pixel value of a red sub-pixel of a pixel in the previous image301.

On the contrary, if the pixel difference value is less than the pixel threshold (AVG_G−AVG_B<AVG_TH), in the step S440, the processor110determines that the current environment is the bright environment. The processor110may carry out an image dark channel calculation on the current image302and the previous image301respectively to generate a current dark channel image and a previous dark channel image. It should be noted that dark channel calculation in this embodiment refers to selecting the minimum value of the red sub-pixel, the green sub-pixel, and the blue sub-pixel of each pixel in the current image302and the previous image301respectively, and storing them respectively into the corresponding pixels in the current dark channel image and those in the previous dark channel image. Then, the processor110may subtract a plurality of pixel values of the previous dark channel image from a plurality of corresponding pixel values of the current dark channel image and filter out the portions of negative values to generate the difference image303. In addition, the processor110can correspondingly provide neural network parameters corresponding to the bright environment, e.g., the weight and the like, to the semantic segmentation model122, so that the semantic segmentation model122can effectively analyze the difference image303corresponding to the bright environment. Besides, in an embodiment, the processor110may carry out image erosion processes on the current dark channel image and the previous dark channel image respectively, and then subtract a plurality of pixel values of the previous dark channel image after the image erosion process from a plurality of corresponding pixel values of the current dark channel image after the image erosion process, so that the needless bright and small noise points and fine structures in the difference image303can be removed.

Therefore, in this embodiment, the smoke detection system100may respectively generate the difference image303by different ways based on different environmental illumination conditions. Therefore, the smoke detection system100can be adapted to various environments of variable illuminations and can provide an effective and reliable smoke detection function. In addition, in one embodiment, the processor110of the smoke detection system100may perform the environment determination in the above steps S410to S440in, e.g., an interval of every ten images during sequential acquisitions of the images by the camera130, so that smoke detection can be effectively carried out for long time. In other embodiments, the processor110may also subtract the blue pixel average value (AVG_B) from the red pixel average value (AVG_R) to obtain a pixel difference value (AVG_R−AVG_B), and determine that the current environment is the dark environment when the pixel difference value (AVG_R−AVG_B) is greater than or equal to the pixel threshold AVG_TH, and determine that the current environment is the bright environment when the pixel difference value (AVG_R−AVG_B) is not greater than or equal to the pixel threshold AVG_TH. In another embodiment, the processor110may also determine whether the current environment is the dark environment or the bright environment based on other methods; for example, determining based on a luminance value L* of a CIELAB color space. For example, when the luminance value L* is less than a luminance threshold, the processor110determines that the current environment is the dark environment, and if not, the processor110determines that the current environment is the bright environment. In yet another embodiment, the processor110may also determine other parameters correspondingly (such as the pixel confidence threshold and the smoke pixel threshold) based on whether the current environment is the dark environment or the bright environment; for example, the pixel confidence threshold of the dark environment and the pixel confidence threshold of the bright environment may be of different values.

FIG.5is a schematic diagram of calculating a smoke score according to an embodiment of the present disclosure. With reference toFIG.1andFIG.5, the step S240inFIG.2and the generation of the smoke alarm of the smoke alarm determination module124may be implemented by calculating a smoke score. In this embodiment, the processor110of the smoke detection system100can perform a smoke alarm fuzzy logic, and the smoke alarm fuzzy logic may be an algorithm and be stored in the storage unit120. In this embodiment, the smoke detection system100may sequentially acquire a plurality of images through the camera130. Then, the smoke detection system100may analyze these images by the processor110to generate a plurality of smoke confidence maps (the smoke confidence map304as shown inFIG.3). In this embodiment, the processor110may determine whether the smoke event occurs according to these smoke confidence maps and the smoke alarm fuzzy logic.

As shown inFIG.5, for the timings T1to T10, the processor110may respectively analyze a plurality of current images from T1to T10to generate a plurality of smoke confidence maps, and carry out pixel confidence value determinations on the plurality of smoke confidence maps to respectively calculate smoke scores Yn1to Yn10for the timings T1to T10. For example, at the timing T1, Yn1=0, so a smoke alarm is not given, and if the processor110determines that the number of smoke pixels each having a confidence value greater than the pixel confidence threshold in the smoke confidence map is increased from the timing T1to the timing T2, that is, the number of smoke pixels in the smoke confidence map for an image corresponding to the timing T2(the current image) is more than that for an image corresponding to the timing T1(the previous image), the processor110increases the smoke score Yn1to the smoke score Yn2, but at the moment, Yn2does not reach a smoke score threshold Ys, so the smoke alarm is not given. When the smoke score has increased to the smoke score threshold Ys (for example, at the timing T3), the processor110gives the smoke alarm and may not further increase the score (the smoke score is kept at the smoke score threshold Ys, e.g., at the timings T4and T5). On the contrary, for another example, if the processor110determines that the number of smoke pixels is reduced from the timing T5to the timing T6, that is, the number of smoke pixels each having a confidence value greater than the pixel confidence threshold in the smoke confidence map for an image corresponding to the time T6(the current image) is less than that for an image corresponding to the time T5(the previous image), the processor110reduces the smoke score Yn5to the smoke score Yn6, but at the moment, Yn6has not been reduced to 0, so the smoke alarm is still given, and the smoke alarm is not stopped until the timing T10when Yn10is reduced to 0.

Therefore, the processor110can define that, in case of no smoke alarm, the smoke alarm determination module124only gives the smoke alarm when the smoke score increases to the smoke score threshold Ys; and in case of the smoke alarm, the smoke alarm determination module124may not cancel the smoke alarm until the smoke score reduces to 0. Therefore, the smoke detection system100can achieve the reliable, smooth, and stable smoke detection function, and can effectively avoid misjudgment or frequent switching of the smoke alarm state.

From the above, according to the smoke detection system and the smoke detection method provided by the present disclosure, it can be effectively determined whether the smoke event occurs in the current scene shot by the camera in a manner of real-time image monitoring. In addition, according to the smoke detection system and the smoke detection method provided by the present disclosure, it also can be automatically determined whether the current scene is the bright environment or the dark environment, so that the semantic segmentation model can carry out proper analysis and processing, and the adaptive smoke detection function for different illumination environments can be achieved.

The foregoing embodiments are merely preferred embodiments of the present disclosure, but not intended to define the scope of the present disclosure. Those skilled in the art, without departure from the spirit and the scope of the present disclosure, may further make improvements and variations on such basis, and thus, the scope of protection of the present disclosure should be defined by the scope of the claims of the present disclosure.