CN115861898A - Flame smoke identification method applied to gas field station - Google Patents

Flame smoke identification method applied to gas field station Download PDF

Info

Publication number
CN115861898A
CN115861898A CN202211687237.2A CN202211687237A CN115861898A CN 115861898 A CN115861898 A CN 115861898A CN 202211687237 A CN202211687237 A CN 202211687237A CN 115861898 A CN115861898 A CN 115861898A
Authority
CN
China
Prior art keywords
frame
current frame
detection
flame
smoke
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211687237.2A
Other languages
Chinese (zh)
Inventor
范黄晔
谢玉琪
郑书潺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Chuangyecheng Technology Co ltd
Original Assignee
Zhejiang Chuangyecheng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Chuangyecheng Technology Co ltd filed Critical Zhejiang Chuangyecheng Technology Co ltd
Priority to CN202211687237.2A priority Critical patent/CN115861898A/en
Publication of CN115861898A publication Critical patent/CN115861898A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Fire-Detection Mechanisms (AREA)

Abstract

The invention relates to the technical field of picture processing, and discloses a flame smoke identification method applied to a gas field station, which comprises the following steps: acquiring a real-time video stream; acquiring a current frame and a previous frame of a video stream; judging whether the camera rotates or not; judging whether the current frame is a first frame or a multiple frame of N; sending the current frame to a preset flame smoke model for detection to obtain a current frame containing a detection frame; carrying out false alarm elimination on the detection frame of the error circle mark according to a preset false alarm elimination algorithm; taking the rest detection frames as real flame smoke detection results; judging whether the current frame is the last frame or not, so, adopting the rotation of the camera to improve the monitoring range, ensuring that the detection and early warning of flame and smoke are automatically carried out when the camera stops rotating, eliminating false alarms possibly caused by street lamps, sun or foggy weather through a preset false alarm elimination algorithm, and comprehensively improving the safety management efficiency and quality of the gas station.

Description

Flame smoke identification method applied to gas field station
Technical Field
The invention relates to the technical field of picture processing, in particular to a flame smoke identification method applied to a gas field station.
Background
There are many dangerous sources in the construction and production process of a gas station, wherein flames are the main factors causing safety accidents. The fire frequently occurs in daily life of people and has great harm, and when the fire occurs, if the fire can be found and alarmed in time, the loss can be reduced to the greatest extent. The existing fire detection methods mainly comprise a sensor detection method and an image detection method.
The sensor detection method mainly utilizes a sensor to monitor the temperature of a detection area, but the installation process and the detection range of the sensor are all limited by space, when indoor detection is carried out, multiple points are needed, the sensor is arranged in the whole range to ensure that any corner is not omitted, even when flame forms a certain scale, the detection can be carried out, the monitoring is not timely, the arrangement is troublesome, the installation requirement is higher and the cost is higher, when outdoor detection is carried out, the measurement accuracy of the sensor is influenced by the distance of fire points, the reliability is low, meanwhile, the possibility of misjudgment and alarm exists, for example, a high-temperature automobile engine and a tire which runs at high speed in summer cause overhigh temperature, although the temperature reaches the ignition temperature, fire disasters do not occur, and the alarm cannot generate practical value at the moment.
At present, the flame in the gas field station is mostly inspected by a manual inspection mode, but the mode is labor-consuming and low in efficiency, and the flame cannot be found at the first time. Although some gas field stations can use an artificial intelligence mode to detect flame smoke, some false alarms generally exist, and the false alarms are difficult to eliminate.
Disclosure of Invention
The invention aims to provide a flame smoke identification method applied to a gas field station, which solves the following technical problems:
how to provide a method for automatically identifying and alarming flame or smoke of a large-area gas field station reliably and timely.
The purpose of the invention can be realized by the following technical scheme:
a flame smoke identification method applied to a gas field station comprises the following steps:
step S01, acquiring a real-time video stream;
s02, acquiring a current frame and a previous frame of a video stream;
step S03, judging whether the camera rotates or not; if yes, returning to the step S02, otherwise, entering the step S04;
step S04, judging whether the current frame is a first frame or a multiple frame of N; if not, returning to the step S02, otherwise, entering the step S05;
step S05, sending a preset flame smoke model to the current frame for detection to obtain the current frame containing a detection frame;
s06, carrying out false alarm elimination on the detection frame of the error label according to a preset false alarm elimination algorithm;
s07, taking the residual detection frames as real flame smoke detection results;
step S08, judging whether the current frame is the last frame; if not, returning to the step S02, otherwise, ending;
and N is an integer greater than 1, the detection frame is used for marking the position of suspected flame or smoke in the current frame, and the flame smoke model is a trained neural network model.
As a further scheme of the invention: the step S03 includes:
step S031, selecting four decision regions from the same positions in the current frame and the previous frame, respectively;
step S032, calculating chi-square distance of each judgment region of the current frame and each corresponding judgment region of the previous frame respectively;
and if the distance between three or more than three chi-squared vehicles exceeds a pre-threshold value, judging that the camera is in a rotating state, otherwise, judging that the camera is in a static state.
As a further scheme of the invention: the positions of the judging areas of the current frame are four corners of the current frame, and the sizes of the judging areas are 100 × 100;
the chi-square distance is calculated by the following formula:
Figure BDA0004019734410000031
wherein A represents an image histogram of the decision region of the previous frame, A i An observation frequency of A at level i, n being 256 represents a pixel value of 0-255; e i An expected frequency of E at a level i, E representing an image histogram of a decision region of the current frame; k is the total frequency number, 256; p is a radical of i The desired frequency at level i.
As a further scheme of the invention: the step S06 includes:
step S061, judging whether the current frame is the first frame containing the detection frame; if yes, go to step S062, otherwise go to step S063 directly;
step S062, regard detection frame that the current frame includes as the historical detection frame;
step S063, comparing the number of the detection frames contained in the current frame with the number of the historical detection frames, if the number is consistent, entering step S064, otherwise returning to step S062;
step S064, calculating the IOU values of the detection frame contained in the current frame and the historical detection frame;
step S065, judging whether the IOU value is larger than a preset value, if so, eliminating a corresponding detection frame in the current frame, and entering step S062, otherwise, entering step S066;
and step S066, taking the detection frame in the current frame as the residual detection frame.
As a further scheme of the invention: the IOU value obtaining method comprises the following steps:
Figure BDA0004019734410000041
wherein S is Making a business Is the overlapping area of the detection frame contained in the current frame and the historical detection frame, S And are combined The total area of the detection frame included in the current frame and the historical detection frame is obtained.
As a further scheme of the invention: the step S01 comprises the following steps:
step S011, setting a camera group;
step S012, setting a rotation rule for each camera in the imaging group;
step S013, starting the camera group according to the rotation rule;
step S014, obtaining RTSP video stream sent by the camera group;
the camera group comprises four cameras which are distributed in the centers of four directional enclosing walls of the gas station; the rotation rule includes:
each camera is provided with 4 rotation point positions, each point position stays for 3 minutes and then rotates to the next point position, and the rotation time from point position to point position is 1 second; the rotation direction of the camera is clockwise.
As a further scheme of the invention: the training method of the flame smoke model comprises the following steps:
acquiring image data of RTSP video streams of the four cameras, and preprocessing and marking to obtain a data set;
and inputting the training samples in the data set into yolov5 for training to obtain the flame smoke model.
As a further scheme of the invention: the preprocessing comprises data enhancement of pictures in the data set, wherein the data enhancement comprises blurring, brightness change and mosaic enhancement;
the marking processing comprises the step of carrying out label setting on pictures in the data set according to real identification classification, wherein the labels comprise fire representing flame and smoke representing smoke.
The invention has the beneficial effects that: the invention adopts a plurality of cameras and respective rotation to improve the monitoring range, and ensures that the detection and early warning of flame and smoke are automatically carried out based on AI technology when the cameras stop rotating, thereby comprehensively improving the safety management efficiency and quality of the gas field station; in addition, due to the fact that the occurrence scene, the combustion form, the form of smoke generated along with the occurrence scene and the combustion form of flame and the like are diverse and are easily influenced by the environment, the method and the device eliminate false alarms possibly caused by street lamps, sun or heavy fog weather through a preset false alarm elimination algorithm, avoid complicated and time-consuming feature extraction processes through an image processing and recognition technology, and improve the accuracy of fire detection.
Drawings
The invention will be further described with reference to the accompanying drawings.
FIG. 1 is a schematic flow chart of the method for identifying flame smoke according to the present invention;
FIG. 2 is a schematic view of a gas station flame smoke system of the present invention;
FIG. 3 is a schematic view of the cruise and rotation modes of the gas station camera of the present invention;
FIG. 4 is a schematic flowchart illustrating a method for determining whether a camera is rotated according to the present invention;
FIG. 5 is a chi-squared distance calculation effect diagram of determining whether a camera is rotating according to the present invention;
FIG. 6 is a flow chart of a false alarm cancellation algorithm of the present invention;
FIG. 7 is a diagram of the effect of flame smoke model detection in the present invention;
fig. 8 is a diagram illustrating the effect of eliminating false alarms in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention is a method for identifying flame smoke applied to a gas field station, including:
step S01, acquiring a real-time video stream;
s02, acquiring a current frame and a previous frame of a video stream;
step S03, judging whether the camera rotates or not; if yes, returning to the step S02, otherwise, entering the step S04;
step S04, judging whether the current frame is a first frame or a multiple frame of N; if not, returning to the step S02, otherwise, entering the step S05;
step S05, sending a preset flame smoke model to the current frame for detection to obtain the current frame containing a detection frame;
s06, carrying out false alarm elimination on the detection frame of the error label according to a preset false alarm elimination algorithm;
s07, taking the residual detection frames as real flame smoke detection results;
step S08, judging whether the current frame is the last frame; if not, returning to the step S02, otherwise, ending;
and N is an integer greater than 1, the detection frame is used for marking the position of suspected flame or smoke in the current frame, and the flame smoke model is a trained neural network model.
In the present embodiment of the present invention, step S01 includes:
step S011, setting a camera group;
step S012, setting a rotation rule for each camera in the imaging group;
step S013, starting a camera group according to a rotation rule;
step S014, acquiring RTSP video stream sent by the camera group;
as shown in fig. 2 and 3, the camera group comprises four cameras distributed in the centers of four directional walls of the gas station; the camera is connected with the upper computer through a server internally provided with a flame smoke model, and the upper computer displays a video picture with a real flame smoke detection result in real time so as to remind workers.
In this embodiment, N may be selected as 5, and the rotation rule may include: each camera is provided with 4 rotation point positions, each point position stays for 3 minutes and then rotates to the next point position, and the rotation time from point position to point position is 1 second; the rotation direction of the camera is clockwise. So design, can carry out real-time comprehensive control to whole gas field station through four rotatable cameras of dispersion all around, promote the monitoring range, carry out the detection early warning of flame and smog automatically when the camera stall, eliminate the wrong report alarm that probably leads to because of street lamp, sun or heavy fog weather through the wrong report elimination algorithm of predetermineeing simultaneously, synthesize the safety control efficiency and the quality that promote the gas field station.
In the present embodiment of the present invention, as shown in fig. 4, step S03 includes:
step S031, selecting four decision regions from the same position in the current frame and the previous frame, respectively; the positions of the judging areas of the current frame are four corners of the current frame, and the sizes of the judging areas are 100 × 100;
step S032, respectively carrying out image histogram statistics and chi-square distance calculation on each judgment region of the current frame and each corresponding judgment region of the previous frame;
if the distance between three or more chi-squared points exceeds a pre-threshold value, the camera is judged to be in a rotating state, otherwise, the camera is in a static state.
As shown in fig. 5, the chi-squared distance is calculated by the formula:
Figure BDA0004019734410000071
wherein A represents the image histogram of the decision region of the previous frame, A i The observation frequency of A at the level i, and n is 256 to represent the pixel value of 0-255; e i The expected frequency of E at the level i represents the image histogram of the judgment area of the current frame; k is the total frequency number, 256; p is a radical of formula i The desired frequency at level i.
As a further aspect of the present invention, as shown in fig. 6, step S06 includes:
step S061, judging whether the current frame is the first frame containing the detection frame; if yes, go to step S062, otherwise go to step S063 directly;
step S062, regard detection frame that the current frame includes as the historical detection frame; the first frame corresponding to the detection frame detected by the flame smoke model is not directly used as a result, but is stored as a historical detection frame;
step S063, comparing the number of the detection frames contained in the current frame with the number of the historical detection frames, if the number is consistent, entering step S064, otherwise returning to step S062;
step S064, calculating IOU values of detection frames and historical detection frames contained in the current frame;
step S065, judging whether the IOU value is larger than a preset value, if so, eliminating a corresponding detection frame in the current frame, and entering step S062, otherwise, entering step S066; in the present invention, the preset value may be selected to be 0.83.
And step S066, taking the detection frame in the current frame as a residual detection frame.
Specifically, in this embodiment, the method for obtaining the IOU value includes:
Figure BDA0004019734410000081
wherein S is Making a cross Is the overlapping area of the detection frame and the historical detection frame contained in the current frame, S And are The total area of the detection frame and the historical detection frame contained in the current frame.
In the embodiment of the invention, the training method of the flame smoke model comprises the following steps:
carrying out image data acquisition on RTSP video streams of the four cameras, and carrying out pretreatment and marking treatment to obtain a data set;
in the preprocessing process, the picture can be reduced from 1920 × 1080 to 640 × 640, training samples in the data set are input into yolov5 to be trained to obtain a model 1, the model is named as a flame smoke model, namely, fire-smoke.
The preprocessing also comprises data enhancement of the pictures in the data set, wherein the data enhancement comprises blurring, brightness change and mosaic enhancement;
the marking process comprises the step of setting labels for the pictures in the data set according to the real identification classification, wherein the data set can be named fire-cookie. The tag includes a fire representative of a flame and a smoke representative of smoke.
While one embodiment of the present invention has been described in detail, the description is only a preferred embodiment of the present invention and should not be taken as limiting the scope of the invention. All equivalent changes and modifications made within the scope of the present invention shall fall within the scope of the present invention.

Claims (8)

1. A flame smoke identification method applied to a gas field station is characterized by comprising the following steps:
step S01, acquiring a real-time video stream;
s02, acquiring a current frame and a previous frame of a video stream;
step S03, judging whether the camera rotates or not; if yes, returning to the step S02, otherwise, entering the step S04;
step S04, judging whether the current frame is a first frame or a multiple frame of N; if not, returning to the step S02, otherwise, entering the step S05;
step S05, sending a preset flame smoke model to the current frame for detection to obtain the current frame containing a detection frame;
s06, carrying out false alarm elimination on the detection frame of the error label according to a preset false alarm elimination algorithm;
s07, taking the rest detection frames as a real flame and smoke detection result;
step S08, judging whether the current frame is the last frame; if not, returning to the step S02, otherwise, ending;
and N is an integer greater than 1, the detection frame is used for marking the position of suspected flame or smoke in the current frame, and the flame smoke model is a trained neural network model.
2. The method for identifying flame smoke of a gas field station as claimed in claim 1, wherein said step S03 comprises:
step S031, selecting four decision regions from the same positions in the current frame and the previous frame, respectively;
step S032, calculating chi-square distance of each judgment region of the current frame and each corresponding judgment region of the previous frame respectively;
and if the distance between three or more than three chi-squared vehicles exceeds a pre-threshold value, judging that the camera is in a rotating state, otherwise, judging that the camera is in a static state.
3. The flame smoke identification method applied to the gas field station as claimed in claim 2, wherein the positions of the judgment regions of the current frame are four corners of the current frame, and the sizes of the judgment regions are 100 x 100;
the chi-square distance is calculated by the following formula:
Figure FDA0004019734400000021
wherein A represents an image histogram of the decision region of the previous frame, A i An observation frequency of A at level i, n being 256 represents a pixel value of 0-255; e i An expected frequency of E at a level i, E representing an image histogram of a decision region of the current frame; k is the total frequency number, 256; p is a radical of formula i The desired frequency at level i.
4. The method for identifying flame smoke of a gas field station as claimed in claim 1, wherein said step S06 comprises:
step S061, judging whether the current frame is the first frame containing the detection frame; if yes, go to step S062, otherwise go to step S063 directly;
step S062, regard detection frame that the current frame includes as the historical detection frame;
step S063, comparing the number of the detection frames contained in the current frame with the number of the historical detection frames, if the number is consistent, entering step S064, otherwise returning to step S062;
step S064, calculating the IOU values of the detection frame contained in the current frame and the historical detection frame;
step S065, judging whether the IOU value is larger than a preset value, if so, eliminating a corresponding detection frame in the current frame, and entering step S062, otherwise, entering step S066;
and step S066, taking the detection frame in the current frame as the residual detection frame.
5. The flame smoke identification method applied to the gas field station as claimed in claim 4, wherein the IOU value obtaining method comprises:
Figure FDA0004019734400000031
wherein S is Making a cross Is the overlapping area of the detection frame contained in the current frame and the historical detection frame, S And are combined The total area of the detection frame included in the current frame and the historical detection frame is obtained.
6. The method for identifying flame smoke of a gas field station as claimed in claim 1, wherein said step S01 comprises:
step S011, setting a camera group;
step S012 of setting a rotation rule for each camera in the imaging group;
step S013, starting the camera group according to the rotation rule;
step S014, obtaining RTSP video stream sent by the camera group;
the camera group comprises four cameras which are distributed at the centers of four directional enclosing walls of the gas station; the rotation rule includes:
each camera is provided with 4 rotation point positions, each point position stays for 3 minutes and then rotates to the next point position, and the rotation time from point position to point position is 1 second; the rotation direction of the camera is clockwise.
7. The method for identifying flame smoke of a gas station as claimed in claim 2, wherein the method for training the flame smoke model comprises:
acquiring image data of RTSP video streams of the four cameras, and preprocessing and marking the RTSP video streams to obtain a data set;
inputting the training samples in the data set into yolov5 for training to obtain the flame smoke model.
8. The method of claim 7, wherein said preprocessing comprises data enhancement of pictures in said data set, said data enhancement comprising blurring, brightness variation, mosaic enhancement;
the marking processing comprises the step of carrying out label setting on pictures in the data set according to real identification classification, wherein the labels comprise fire representing flame and smoke representing smoke.
CN202211687237.2A 2022-12-27 2022-12-27 Flame smoke identification method applied to gas field station Pending CN115861898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211687237.2A CN115861898A (en) 2022-12-27 2022-12-27 Flame smoke identification method applied to gas field station

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211687237.2A CN115861898A (en) 2022-12-27 2022-12-27 Flame smoke identification method applied to gas field station

Publications (1)

Publication Number Publication Date
CN115861898A true CN115861898A (en) 2023-03-28

Family

ID=85655168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211687237.2A Pending CN115861898A (en) 2022-12-27 2022-12-27 Flame smoke identification method applied to gas field station

Country Status (1)

Country Link
CN (1) CN115861898A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140028803A1 (en) * 2012-07-26 2014-01-30 Robert Bosch Gmbh Fire monitoring system
CN108830161A (en) * 2018-05-18 2018-11-16 武汉倍特威视系统有限公司 Smog recognition methods based on video stream data
US20190279478A1 (en) * 2016-12-21 2019-09-12 Hochiki Corporation Fire monitoring system
CN112052797A (en) * 2020-09-07 2020-12-08 合肥科大立安安全技术有限责任公司 MaskRCNN-based video fire identification method and system
CN112598071A (en) * 2020-12-28 2021-04-02 北京市商汤科技开发有限公司 Open fire identification method, device, equipment and storage medium
CN113225461A (en) * 2021-02-04 2021-08-06 江西方兴科技有限公司 System and method for detecting video monitoring scene switching

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140028803A1 (en) * 2012-07-26 2014-01-30 Robert Bosch Gmbh Fire monitoring system
US20190279478A1 (en) * 2016-12-21 2019-09-12 Hochiki Corporation Fire monitoring system
CN108830161A (en) * 2018-05-18 2018-11-16 武汉倍特威视系统有限公司 Smog recognition methods based on video stream data
CN112052797A (en) * 2020-09-07 2020-12-08 合肥科大立安安全技术有限责任公司 MaskRCNN-based video fire identification method and system
CN112598071A (en) * 2020-12-28 2021-04-02 北京市商汤科技开发有限公司 Open fire identification method, device, equipment and storage medium
CN113225461A (en) * 2021-02-04 2021-08-06 江西方兴科技有限公司 System and method for detecting video monitoring scene switching

Similar Documents

Publication Publication Date Title
CN107437318B (en) Visible light intelligent recognition algorithm
CN111967393B (en) Safety helmet wearing detection method based on improved YOLOv4
CN107729850B (en) Internet of things outdoor advertisement monitoring and broadcasting system
CN112907522B (en) Intelligent infrared gas leakage monitoring device and monitoring method
CN103106766A (en) Forest fire identification method and forest fire identification system
CN111462451A (en) Straw burning detection alarm system based on video information
US20230005176A1 (en) Throwing position acquisition method and apparatus, computer device and storage medium
CN117037406B (en) Intelligent monitoring and early warning system for forest fire
CN111446920A (en) Photovoltaic power station monitoring method, device and system
CN111163294A (en) Building safety channel monitoring system and method for artificial intelligence target recognition
CN112270253A (en) High-altitude parabolic detection method and device
CN110703760A (en) Newly-increased suspicious object detection method for security inspection robot
CN112862150A (en) Forest fire early warning method based on image and video multi-model
CN115880231A (en) Power transmission line hidden danger detection method and system based on deep learning
CN113435278A (en) Crane safety detection method and system based on YOLO
CN109684982B (en) Flame detection method based on video analysis and combined with miscible target elimination
CN108898782A (en) The smoke detection method and system that infrared image temperature information for tunnel fire proofing identifies
CN116846059A (en) Edge detection system for power grid inspection and monitoring
CN109345787A (en) A kind of anti-outer damage monitoring and alarming system of the transmission line of electricity based on intelligent image identification technology
CN113361914B (en) Dangerous waste transportation risk management and control early warning method and system
CN113657233A (en) Unmanned aerial vehicle forest fire smoke detection method based on computer vision
CN113505704A (en) Image recognition personnel safety detection method, system, equipment and storage medium
CN113392706A (en) Device and method for detecting smoking and using mobile phone behaviors
CN112861676A (en) Smoke and fire identification marking method, system, terminal and storage medium
CN115861898A (en) Flame smoke identification method applied to gas field station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination