Detection Method, Device and Electronic Device for Colored Gas

By target detection and classification of the monitoring screen, the problem of low accuracy of non-ferrous gas emission detection is solved, and efficient control is achieved around the clock, reducing the risk of factory tampering with data.

CN113537212BActive Publication Date: 2025-07-25ZHEJIANG DAHUA TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110719888.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-28
Publication Date
2025-07-25
Estimated Expiration
2041-06-28

AI Technical Summary

Technical Problem

The detection accuracy of non-ferrous gas emissions in the prior art is low, and there is a risk that factories tamper with data or exploit loopholes, so it is impossible to achieve effective 24/7 control.

Method used

By performing object detection on the monitoring screen, gas areas and equipment areas are obtained, equipment areas are expanded, equipment areas are bounded to form pre-check areas, and motion target detection and classification are carried out in these areas. The trained object detection and classification model is used to determine whether there is colored gas emissions.

Benefits of technology

It improves the detection accuracy of non-ferrous gas emissions, reduces the possibility of factories tampering with data, and achieves effective control around the clock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113537212B_ABST
    Figure CN113537212B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, electronic device, and storage medium for detecting a colored gas. The method includes: performing target detection on a monitoring screen to obtain a gas region and an equipment region of a gas emission device in the monitoring screen, where the gas emission device includes a device that emits gas; performing boundary expansion processing on the equipment region to obtain a pre-inspection region; respectively performing moving target detection in the pre-inspection region and the gas region; classifying the detected moving targets, and determining whether there is a colored gas in the monitoring screen according to the category information of the moving targets. Through the present application, the problem of low detection accuracy for the emission of colored gas in the related art is solved, and the technical effect of improving the detection accuracy for the emission of colored gas is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and particularly to a method, device, electronic device, and storage medium for detecting colored gases. Background Art

[0002] With the continuous progress and development of society, the environmental protection requirements for factories at home and abroad are increasing day by day. The gas components and dust concentration of the colored gases discharged from factory chimneys have a great impact on the surrounding environment. Due to the weak environmental protection awareness of many factories, harmful gas components are often directly discharged into the atmosphere. In addition, many factories do not regularly maintain the dust collection equipment, resulting in a large dust emission concentration, deteriorating the natural environment around the factories and seriously affecting people's health and life. Therefore, it is necessary to control the emissions of industrial colored gases to prevent unpredictable losses caused by unauthorized emissions of industrial colored gases.

[0003] At the same time, the behavior of unauthorized emissions of industrial colored gases is unpredictable. Therefore, the detection of colored gas emissions needs to be carried out all day long. Therefore, how to continuously control the emissions of colored gases for a long time has become an urgent problem to be solved.

[0004] In the related art, chimney emission detection devices such as smoke sensors are often used to detect and alarm industrial colored gases. However, in such technical solutions, when the staff uses the chimney emission detection device to detect the chimney emissions of the factory, the factory can choose to temporarily reduce production or stop production for maintenance, etc. to ensure passing the environmental protection inspection; or the factory itself can tamper with the data information in the chimney emission detection device. Using chimney emission detection devices such as smoke sensors to detect and alarm industrial colored gases cannot control the emissions of colored gases all day long, providing opportunities for factories to take advantage of loopholes or tamper with data, resulting in a low detection accuracy rate for colored gas emissions.

[0005] Currently, no effective solution has been proposed for the problem of low detection accuracy rate for colored gas emissions in the related art. Summary of the Invention

[0006] Embodiments of the present application provide a method, device, electronic device, and storage medium for detecting colored gases to at least solve the problem of low detection accuracy rate for colored gas emissions in the related art.

[0007] In a first aspect, an embodiment of the present application provides a method for detecting a colored gas. The method includes: performing target detection on a monitoring image to obtain a gas region and an equipment region of a gas emission device in the monitoring image, where the gas emission device includes a device that emits the gas; performing boundary expansion processing on the equipment region to obtain a pre-inspection region; respectively performing moving target detection in the pre-inspection region and the gas region; classifying the detected moving targets, and determining whether there is a colored gas in the monitoring image according to the category information of the moving targets.

[0008] In some embodiments, the monitoring image includes a plurality of monitoring images collected at preset time intervals. Respectively performing moving target detection in the pre-inspection region and the gas region includes: performing moving target detection in the pre-inspection region; respectively matching the gas data to be detected in the gas region corresponding to each monitoring image with preset colored gas data, and counting the number of gas data to be detected that match the preset colored gas data successfully; and performing moving target detection in the gas region when it is determined that the number of gas data to be detected that match the preset colored gas data successfully is greater than a first preset threshold.

[0009] In some embodiments, the gas data to be detected includes position data of the gas to be detected; the preset colored gas data includes position data of the preset colored gas. Respective matching of the gas data to be detected in the gas region corresponding to each monitoring image with the preset colored gas data includes: calculating the intersection-over-union ratio of the gas to be detected and the preset colored gas, and the distance between the center position of the gas to be detected and the center position of the preset colored gas according to the position data of the gas to be detected and the position data of the preset colored gas; calculating a matching value of the gas to be detected and the preset colored gas according to the intersection-over-union ratio of the gas to be detected and the preset colored gas, and the distance between the center position of the gas to be detected and the center position of the preset colored gas; and determining that the gas data to be detected matches the preset colored gas data successfully when it is determined that the matching value is less than a second preset threshold.

[0010] In some embodiments, the method further includes: the preset colored gas data is obtained from a preset gas database; the method further includes: when it is determined that the number of gas data to be detected that match the preset colored gas data successfully is less than the first preset threshold, storing the gas data to be detected in the gas region corresponding to each monitoring image into the gas database.

[0011] In some of these embodiments, performing object detection on a surveillance image to obtain the gas region and the equipment region of the gas emission equipment in the surveillance image includes: processing the surveillance image using a trained object detection model to obtain the gas region and the equipment region of the gas emission equipment output by the trained object detection model. Among them, the trained object detection model is obtained by training a deep learning model with image samples as the input and the gas region and the equipment region of the gas emission equipment in the image samples as the supervision.

[0012] In some of these embodiments, performing moving object detection in the pre-inspection region and the gas region respectively includes: using the frame difference method to obtain the difference images of the pre-inspection region and the gas region respectively; performing filtering processing on the difference images of the pre-inspection region and the gas region respectively, and performing image binarization processing on the filtered difference images to obtain the binary images of the pre-inspection region and the gas region; performing connectivity analysis on the binary images of the pre-inspection region and the gas region respectively to determine the outer rectangle of the moving object, and obtaining the moving objects in the pre-inspection region and the gas region.

[0013] In some of these embodiments, performing object classification on the detected moving objects includes: processing the moving objects using a trained object classification model to obtain the category information of the moving objects output by the trained object classification model. Among them, the trained object classification model is obtained by training a deep learning model.

[0014] In a second aspect, an embodiment of the present application provides a detection device for colored gas. The device includes: a first detection module for performing object detection on a surveillance image to obtain the gas region and the equipment region of the gas emission equipment in the surveillance image, where the gas emission equipment includes the equipment that emits the gas; an expansion module for performing boundary expansion processing on the equipment region to obtain a pre-inspection region; a second detection module for performing moving object detection in the pre-inspection region and the gas region respectively; a classification module for performing object classification on the detected moving objects and determining whether there is colored gas in the surveillance image according to the category information of the moving objects.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the detection method for colored gas as described in the first aspect above.

[0016] Fourthly, an embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, the detection method of colored gas as described in the first aspect above is implemented.

[0017] Compared with the related art, the detection method, device, electronic device and storage medium of colored gas provided by the embodiments of the present application perform target detection on the monitoring screen to obtain the gas area and the device area of the gas emission device in the monitoring screen, perform boundary expansion processing on the device area to obtain a pre-inspection area, perform moving target detection in the pre-inspection area and the gas area respectively, classify the detected moving targets, and determine whether there is colored gas in the monitoring screen according to the category information of the moving targets, which solves the problem of low detection accuracy of colored gas emissions in the related art and realizes the technical effect of improving the detection accuracy of colored gas emissions.

[0018] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0020] Figure 1 is a flowchart of the detection method of colored gas according to an embodiment of the present application;

[0021] Figure 2 is a flowchart of the detection method of colored gas according to a preferred embodiment of the present application;

[0022] Figure 3 is a structural block diagram of the detection device of colored gas according to an embodiment of the present application;

[0023] Figure 4 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be described and explained below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts belong to the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as insufficient disclosure of the content of the present application.

[0025] Reference to "embodiment" in the present application means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in the present application can be combined with other embodiments without conflict.

[0026] Unless otherwise defined, the technical terms or scientific terms involved in the present application shall have the ordinary meaning understood by those of ordinary skill in the technical field to which the present application belongs. The terms "a", "one", "kind", "the" and other similar words involved in the present application do not indicate a limitation in quantity and can represent a singular or plural number. The terms "including", "comprising", "having" and any variations thereof involved in the present application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The terms "connected", "coupled" and other similar words involved in the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" involved in the present application means greater than or equal to two. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The terms "first", "second", "third", etc. involved in the present application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0027] This embodiment provides a method for detecting a colored gas. Figure 1is a flowchart of a method for detecting colored gas according to an embodiment of the present application. As Figure 1 shown, the method includes:

[0028] Step S101, perform object detection on the monitoring screen to obtain the gas area and the equipment area of the gas emission equipment in the monitoring screen. Among them, the gas emission equipment includes equipment that emits gas.

[0029] Step S102, perform boundary expansion processing on the equipment area to obtain a pre-inspection area.

[0030] Step S103, perform moving object detection in the pre-inspection area and the gas area respectively.

[0031] Step S104, classify the detected moving objects, and determine whether there is colored gas in the monitoring screen according to the category information of the moving objects.

[0032] In this embodiment, the colored gas includes white gas, such as water vapor, etc., and also includes other colored industrial emission gases. The gas emission equipment may include emission equipment such as chimneys that can emit gas.

[0033] In this embodiment, one-to-many monitoring can be performed through a camera device, that is, one camera device can monitor the emissions of multiple gas emission equipment, and simultaneously monitor the colored gas emission behaviors of multiple gas emission equipment. The gas area and equipment area determined in the monitoring screen are obtained through object detection, and moving object detection is performed on the pre-inspection area and the gas area obtained after expanding the boundary of the equipment area. Furthermore, the moving objects existing in the pre-inspection area and the gas area are obtained, and the moving objects are classified. When it is determined that the moving object is colored gas, an alarm message is sent, and long-distance monitoring is performed from a visual perspective. At the same time, the size and position information of the colored gas emission can be monitored, solving the problem of low detection accuracy of colored gas emission in the related art, and achieving the technical effect of improving the detection accuracy of colored gas emission.

[0034] In some of these embodiments, the monitoring screen includes multiple monitoring screens collected at preset time intervals; performing moving object detection in the pre-inspection area and the gas area respectively is achieved through the following steps:

[0035] Step 1, perform moving object detection in the pre-inspection area.

[0036] Step 2, respectively match the gas data to be detected in the gas area corresponding to each monitoring screen with the preset colored gas data, and count the number of gas data to be detected that match the preset colored gas data successfully.

[0037] Step 3, when it is determined that the number of the to-be-detected gas data that matches the preset colored gas data successfully is greater than the first preset threshold, perform moving target detection within the gas area.

[0038] In this embodiment, since the camera device needs to monitor multiple gas emission devices that may emit colored gas from one position in some cases, but there may be situations where these gas emission devices are visually blocked to varying degrees, it is necessary to monitor the emission areas of potential gas emission devices.

[0039] In the above embodiment, the preset colored gas data is obtained from a preset gas database. Since the monitoring images are obtained from the camera device at preset time intervals, the to-be-detected gas data is data collected at different time points. The to-be-detected gas data collected at different time points is respectively matched with each preset colored gas data in the preset gas database. By monitoring whether repeated colored gas data appears at the position of the same gas emission device, the emission area of the gas emission device in the blocked situation can be detected effectively, ensuring that the detection of colored gas will not be missed or misreported, and further improving the accuracy of controlling colored gas.

[0040] In the above embodiment, the preset time can be 1 second, 5 seconds or other values, and the first preset threshold can be 10 times, 50 times or other values. The present application does not limit this here.

[0041] In some of the embodiments, the method further implements the following steps: when it is determined that the number of the to-be-detected gas data that matches the preset colored gas data successfully is less than the first preset threshold, store the to-be-detected gas data in the gas area corresponding to each monitoring image into the gas database.

[0042] In some of the embodiments, the to-be-detected gas data includes the position data of the to-be-detected gas; the preset colored gas data includes the position data of the preset colored gas; the matching of the to-be-detected gas data in the gas area corresponding to each monitoring image with the preset colored gas data is realized through the following steps:

[0043] Step 1, according to the position data of the to-be-detected gas and the position data of the preset colored gas, calculate the intersection-over-union ratio of the to-be-detected gas and the preset colored gas, and the distance between the center position of the to-be-detected gas and the center position of the preset colored gas.

[0044] Step 2, according to the intersection-over-union ratio of the to-be-detected gas and the preset colored gas, and the distance between the center position of the to-be-detected gas and the center position of the preset colored gas, calculate the matching value of the to-be-detected gas and the preset colored gas.

[0045] Step 3, when it is determined that the matching value is less than the second preset threshold, it is determined that the gas data to be detected matches the preset colored gas data successfully.

[0046] In this embodiment, the position data of the gas a to be detected may be (x1, y1, x2, y2), and the position data of the preset colored gas b in the gas database may be (x3, y3, x4, y4). Then, the intersection over union (IOU) of the gas a to be detected and the preset colored gas b can be obtained by the following formula:

[0047]

[0048] In the above formula, IOU(a, b) is the intersection over union of the gas a to be detected and the preset colored gas b.

[0049] The distance between the center position of the gas a to be detected and the center position of the preset colored gas b can be obtained by the following formula:

[0050]

[0051] In the above formula, D(a, b) is the distance between the center position of the gas a to be detected and the center position of the preset colored gas b.

[0052] After obtaining the intersection over union IOU(a, b) of the gas a to be detected and the preset colored gas b, and the distance D(a, b) between the center position of the gas a to be detected and the center position of the preset colored gas b, the matching value of the gas a to be detected and the preset colored gas b can be obtained by the following formula:

[0053]

[0054] In the above formula, M(a, b) is the matching value of the gas a to be detected and the preset colored gas b, and the second preset threshold T can be set m , when M(a, b) is less than T m then it is determined that the gas a to be detected matches the preset colored gas b successfully; otherwise, it is determined that the gas a to be detected does not match the preset colored gas b.

[0055] In some of these embodiments, performing object detection on the monitoring screen to obtain the gas area in the monitoring screen and the equipment area of the gas emission equipment includes: processing the monitoring screen using the trained object detection model to obtain the gas area in the monitoring screen and the equipment area of the gas emission equipment output by the trained object detection model, where the trained object detection model is trained by using image samples as inputs and the gas area and the equipment area of the gas emission equipment in the image samples as supervision for the deep learning model.

[0056] In this embodiment, the deep learning model can be a convolutional neural network model.

[0057] Convolutional Neural Networks (abbreviated as CNN) are a class of feedforward neural networks (abbreviated as FNN) that contain convolutional calculations and have a deep structure, and are one of the representative algorithms of deep learning. Convolutional neural networks have connectivity and representation learning capabilities, so they can well learn corresponding features from a large number of samples.

[0058] In this embodiment, a neural network with multiple convolutional layers, downsampling layers, and pooling layers can be constructed. The multiple convolutional layers can be used to extract different features in the monitoring screen. The pooling layer can be used to sample the data, learn and classify multi-scale data features, improve the classification recognition rate of the model, and provide non-linearity, reduce the number of model parameters, and reduce the overfitting problem.

[0059] In the above embodiment, image samples including a gas area and a device area can be collected to update the gradient of the neural network through backpropagation, and then the target detection model is trained. After the target detection model is trained, the trained target detection model is used to perform forward inference on the monitoring screen, and the obtained result is transformed using the softmax function to obtain a classification result. Then, logistic regression is used to obtain the size and position of the gas area and the device area, and redundant detection results are filtered out through non-maximum suppression. Finally, the gas area and the device area in the monitoring screen are obtained.

[0060] In this embodiment, the tensorflow deep learning development framework can be used to implement the construction of the convolutional neural network model, or frameworks such as keras, caffe, and pytorch can be used to implement the construction of the convolutional neural network model.

[0061] In some of these embodiments, moving target detection is performed in the pre-inspection area and the gas area respectively through the following steps:

[0062] Step 1, use the frame difference method to obtain the difference images of the pre-inspection area and the gas area respectively.

[0063] Step 2, filter the difference images of the pre-inspection area and the gas area respectively, and perform image binarization on the filtered difference images to obtain the binarized images of the pre-inspection area and the gas area.

[0064] Step 3, perform connectivity analysis on the binarized images of the pre-inspection area and the gas area respectively to determine the outer rectangle of the moving target, and obtain the moving targets in the pre-inspection area and the gas area.

[0065] In this embodiment, the pre-inspection area and the gas area can be stored in the pre-inspection database, and motion target detection is respectively performed on the pre-inspection area in the pre-inspection database and the gas area obtained through the monitoring screen. The frame difference method is used to respectively obtain the difference image of two frames of images in the pre-inspection area and the difference image of two frames of images in the gas area. A threshold is used to filter the difference image and perform image binarization processing. Connectivity analysis is performed on the binary image to obtain the outer rectangle of the motion target, and then the motion targets in the pre-inspection area and the gas area are obtained, improving the accuracy of motion target detection.

[0066] In some of these embodiments, target classification of the detected motion targets includes: using the trained target classification model to process the motion targets, and obtaining the category information of the motion targets output by the trained target classification model. Among them, the trained target classification model is obtained by training a deep learning model.

[0067] In this embodiment, the deep learning model can be a convolutional neural network model. The target classification model can include a convolutional module, a batch normalization processing module, a residual connection module, a pooling module, and an activation module, and a fully connected layer is used to output to a linear classifier to obtain the classification result.

[0068] In the above embodiment, the convolutional module is used to extract different features of the motion target in the image. The low convolutional layer may only be able to extract some low-level features such as edges, lines, and corners, etc. More layers of the network can iteratively extract more complex features from the low-level features.

[0069] The batch normalization processing module is used to force the input distribution that gradually approaches the limit saturation area of the value range after mapping to a non-linear function back to a relatively standard normal distribution with a mean of 0 and a variance of 1, so that the input value of the non-linear transformation function falls into the area sensitive to the input, thereby avoiding the problem of gradient disappearance.

[0070] The pooling module is used to sample the data, learn and classify multi-scale data features, improve the classification recognition rate of the model, and provide non-linearity, reduce the number of model parameters, and reduce the overfitting problem.

[0071] Through the above steps S101 to S104, the determined gas area and the equipment area in the monitoring screen are obtained through target detection, and motion target detection is performed on the pre-inspection area and the gas area obtained after expanding the boundary of the equipment area, and then the motion targets existing in the pre-inspection area and the gas area are obtained, and target classification is performed on the motion targets to determine whether there is a colored gas in the monitoring screen. Through this application, the problem of low detection accuracy of colored gas emissions in the related art is solved, and the technical effect of improving the detection accuracy of colored gas emissions is achieved.

[0072] Figure 2 is a flowchart of a method for detecting a colored gas according to a preferred embodiment of the present application. As Figure 2 shown, in some embodiments, the method includes:

[0073] Step S201, collect monitoring images at intervals of time T.

[0074] Step S202, perform target detection on the monitoring images.

[0075] Step S203, perform boundary expansion processing on the equipment area to obtain a pre-inspection area.

[0076] Step S204, match the gas data to be detected in the gas area with the preset colored gas data in the gas database.

[0077] Step S205, determine whether the number of successful matches is greater than the first preset threshold N; if the number of successful matches is greater than the first preset threshold N, proceed to step S206; otherwise, proceed to step S207.

[0078] Step S206, store the pre-inspection area and / or the gas area in the pre-inspection database.

[0079] Step S207, store the gas data to be detected in the gas database.

[0080] Step S208, perform moving target detection on the pre-inspection area and the gas area in the pre-inspection database respectively.

[0081] Step S209, classify the moving targets obtained by the moving target detection.

[0082] Step S210, determine whether the category information of the moving target is a colored gas; if the moving target is a colored gas, proceed to step S211; otherwise, proceed to step S212.

[0083] Step S211, send an alarm message.

[0084] Step S212, do not send an alarm message.

[0085] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.

[0086] This embodiment provides a device for detecting a colored gas, Figure 3 is a structural block diagram of a device for detecting a colored gas according to an embodiment of the present application. As Figure 3As shown, the device includes: a first detection module 30, configured to perform target detection on a monitoring screen to obtain a gas area and an equipment area of a gas emission device in the monitoring screen, where the gas emission device includes a device for emitting gas; an expansion module 31, configured to perform boundary expansion processing on the equipment area to obtain a pre-inspection area; a second detection module 32, configured to perform moving target detection in the pre-inspection area and the gas area respectively; a classification module 33, configured to classify the detected moving targets and determine whether there is a colored gas in the monitoring screen according to the category information of the moving targets.

[0087] In some embodiments, the monitoring screen includes a plurality of monitoring screens collected at preset time intervals; the second detection module 32 is further configured to perform moving target detection in the pre-inspection area; match the to-be-detected gas data in the gas area corresponding to each monitoring screen with the pre-set colored gas data respectively, and count the number of to-be-detected gas data that match the pre-set colored gas data successfully; and perform moving target detection in the gas area when it is determined that the number of to-be-detected gas data that match the pre-set colored gas data successfully is greater than a first preset threshold.

[0088] In some embodiments, the to-be-detected gas data includes the position data of the to-be-detected gas; the pre-set colored gas data includes the position data of the pre-set colored gas; the second detection module 32 is further configured to calculate the intersection-over-union ratio of the to-be-detected gas and the pre-set colored gas, and the distance between the center position of the to-be-detected gas and the center position of the pre-set colored gas according to the position data of the to-be-detected gas and the position data of the pre-set colored gas; calculate the matching value of the to-be-detected gas and the pre-set colored gas according to the intersection-over-union ratio of the to-be-detected gas and the pre-set colored gas, and the distance between the center position of the to-be-detected gas and the center position of the pre-set colored gas; and determine that the to-be-detected gas data matches the pre-set colored gas data successfully when it is determined that the matching value is less than a second preset threshold.

[0089] In some embodiments, the pre-set colored gas data is obtained from a pre-set gas database; the second detection module 32 is further configured to store the to-be-detected gas data in the gas area corresponding to each monitoring screen into the gas database when it is determined that the number of to-be-detected gas data that match the pre-set colored gas data successfully is less than the first preset threshold.

[0090] In some of these embodiments, the first detection module 30 is further configured to process the monitoring screen using the trained object detection model, and obtain the gas area and the equipment area of the gas emission equipment in the monitoring screen output by the trained object detection model. The trained object detection model is obtained by training a deep learning model with image samples as the input and the gas area and the equipment area of the gas emission equipment in the image samples as the supervision.

[0091] In some of these embodiments, the second detection module 32 is further configured to respectively obtain the differential images of the pre-inspection area and the gas area by using the frame difference method; respectively perform filtering processing on the differential images of the pre-inspection area and the gas area, and perform image binarization processing on the filtered differential images to obtain the binarized images of the pre-inspection area and the gas area; respectively perform connectivity analysis on the binarized images of the pre-inspection area and the gas area to determine the outer rectangles of the moving objects, and obtain the moving objects in the pre-inspection area and the gas area.

[0092] In some of these embodiments, the classification module 33 is further configured to process the moving objects using the trained object classification model, and obtain the category information of the moving objects output by the trained object classification model. The trained object classification model is obtained by training a deep learning model.

[0093] It should be noted that the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.

[0094] This embodiment also provides an electronic device. Figure 4 It is a schematic hardware structure diagram of the electronic device according to the embodiment of the present application. As Figure 4 shown, the electronic device includes a memory 404 and a processor 402. A computer program is stored in the memory 404, and the processor 402 is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0095] Specifically, the above-mentioned processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits implementing the embodiments of the present application.

[0096] Among them, the memory 404 may include a mass memory for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 404 may include a removable or non-removable (or fixed) medium. In a suitable case, the memory 404 may be inside or outside the detection device of the colored gas. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). In a suitable case, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory (FLASH), or a combination of two or more of these. In a suitable case, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), where the DRAM may be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0097] The memory 404 can be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402.

[0098] By reading and executing the computer program instructions stored in the memory 404, the processor 402 implements any one of the detection methods for colored gases in the above embodiments.

[0099] Optionally, the above electronic device may further include a transmission device 406 and an input / output device 408. Among them, the transmission device 406 is connected to the above processor 402, and the input / output device 408 is connected to the above processor 402.

[0100] Optionally, in this embodiment, the above processor 402 may be configured to execute the following steps through a computer program:

[0101] S1, perform target detection on the monitoring screen to obtain the gas area and the device area of the gas emission device in the monitoring screen, where the gas emission device includes a device that emits gas.

[0102] S2, perform boundary expansion processing on the device area to obtain a pre-inspection area.

[0103] S3, perform moving target detection in the pre-inspection area and the gas area respectively.

[0104] S4, classify the detected moving targets, and determine whether there is a colored gas in the monitoring screen according to the category information of the moving targets.

[0105] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated here.

[0106] In addition, in combination with the detection method for colored gases in the above embodiments, an embodiment of the present application can provide a storage medium to implement. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the detection methods for colored gases in the above embodiments is implemented.

[0107] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brief description, not all possible combinations of the technical features in the above embodiments are described. However, as long as these combinations of technical features do not conflict, they should be considered as the scope described in this specification.

[0108] The above embodiments only represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for detecting a colored gas, characterized in that, The method includes: Processing a surveillance video with a trained object detection model to obtain the gas region and the equipment region of the gas emission equipment in the surveillance video output by the trained object detection model, where the trained object detection model is obtained by training a deep learning model with image samples as inputs and the gas region and the equipment region of the gas emission equipment in the image samples as supervision; where the gas emission equipment includes equipment that emits the gas; Performing boundary expansion processing on the equipment region to obtain a pre-inspection region; Performing moving object detection in the pre-inspection region and the gas region respectively; the moving object includes colored gas; Classifying the detected moving objects and determining whether there is colored gas in the surveillance video according to the category information of the moving objects; The surveillance video includes multiple surveillance videos collected at preset time intervals; performing moving object detection in the pre-inspection region and the gas region respectively includes: Performing moving object detection in the pre-inspection region; Respectively matching the gas data to be detected in the gas region corresponding to each surveillance video with preset colored gas data and counting the number of gas data to be detected that match the preset colored gas data successfully; In the case where it is determined that the number of gas data to be detected that match the preset colored gas data successfully is greater than a first preset threshold, performing moving object detection in the gas region.

2. The detection method of the colored gas according to claim 1, characterized in that, The gas data to be detected includes the position data of the gas to be detected; the preset colored gas data includes the position data of the preset colored gas; Respectively matching the gas data to be detected in the gas region corresponding to each surveillance video with preset colored gas data includes: Calculating the intersection over union of the gas to be detected and the preset colored gas and the distance between the center position of the gas to be detected and the center position of the preset colored gas according to the position data of the gas to be detected and the position data of the preset colored gas; Calculating the matching value of the gas to be detected and the preset colored gas according to the intersection over union of the gas to be detected and the preset colored gas and the distance between the center position of the gas to be detected and the center position of the preset colored gas; In the case where it is determined that the matching value is less than a second preset threshold, determining that the gas data to be detected matches the preset colored gas data successfully.

3. The detection method of the colored gas according to claim 1, characterized in that, The preset colored gas data is obtained from a preset gas database; the method further includes: In the case where it is determined that the number of gas data to be detected that match the preset colored gas data successfully is less than the first preset threshold, storing the gas data to be detected in the gas region corresponding to each surveillance video into the gas database.

4. The detection method of the colored gas according to claim 1, characterized in that, Performing moving object detection in the pre-inspection region and the gas region respectively includes: Respectively obtaining the difference images of the pre-inspection region and the gas region by using the frame difference method; Filter the differential images of the pre-inspection area and the gas area respectively, and perform image binarization on the filtered differential images to obtain the binarized images of the pre-inspection area and the gas area; Perform connectivity analysis on the binarized images of the pre-inspection area and the gas area respectively, determine the external rectangles of the moving targets, and obtain the moving targets in the pre-inspection area and the gas area.

5. The detection method of the colored gas according to claim 1, characterized in that, Target classification of the detected moving targets includes: Use the trained target classification model to process the moving targets, and obtain the category information of the moving targets output by the trained target classification model. Among them, the trained target classification model is obtained by training a deep learning model.

6. A detection device for a colored gas, characterized in that, The device includes: A first detection module, configured to use a trained target detection model to process a monitoring screen, and obtain the gas area and the device area of the gas emission device in the monitoring screen output by the trained target detection model. Among them, the trained target detection model takes image samples as input, and takes the gas area and the device area of the gas emission device in the image samples as supervision, and is obtained by training a deep learning model; among them, the gas emission device includes a device that emits the gas; An expansion module, configured to perform boundary expansion processing on the device area to obtain a pre-inspection area; A second detection module, configured to perform moving target detection in the pre-inspection area and the gas area respectively; the moving target includes a colored gas; A classification module, configured to perform target classification on the detected moving targets, and determine whether there is a colored gas in the monitoring screen according to the category information of the moving targets; The monitoring screen includes a plurality of monitoring screens collected at preset time intervals; the second detection module is further configured to perform moving target detection in the pre-inspection area; match the gas data to be detected in the gas area corresponding to each monitoring screen with the preset colored gas data respectively, and count the number of gas data to be detected that match the preset colored gas data; in the case where the number of gas data to be detected that match the preset colored gas data is greater than a first preset threshold, perform moving target detection in the gas area.

7. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for detecting a colored gas according to any one of claims 1 to 5.

8. A storage medium, characterized in that, A computer program is stored in the storage medium, wherein the computer program, when executed by a processor, implements the method for detecting a colored gas according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Moving object detection method and device, computer equipment and storage medium

    CN109919008A

  • Image processing method and device, and terminal equipment

    CN110378218A

  • Small target detection method and device, computer equipment and storage medium

    CN111476064A

  • Multi-target tracking method and device, electronic equipment and storage medium

    CN111709975A