Refinery smoke flame identification method and device, electronic equipment and storage medium

Through the video surveillance system and YOLOv8 model, the problem that traditional fire alarm systems cannot detect smoke and fire in time in outdoor situations is solved, automatic identification and early warning of smoke and flames in the refinery are realized, and the accuracy and efficiency of fire early warning are improved. .

CN118609039APending Publication Date: 2024-09-06PETROCHINA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410319177.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional fire alarm systems cannot detect abnormal smoke and fire signs in time in outdoor situations, and cannot provide real-time video monitoring remotely. They are limited by environmental conditions and have poor adaptability.

Method used

Collect flame and smoke images through the video surveillance system, use computer vision and artificial intelligence technology for preprocessing and annotation, establish a smoke and flame sample library, and use the YOLOv8 target detection model for iterative training and optimization to achieve smoke and flame monitoring in the refinery surveillance video. Automatic identification and early warning.

Benefits of technology

It realizes automatic analysis and identification of smoke and flame in the refinery, quickly completes fire detection and alarm, improves the accuracy and efficiency of fire warning, has strong adaptability, and is suitable for various environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609039A
    Figure CN118609039A
Patent Text Reader

Abstract

The embodiment of the invention discloses a refinery smoke flame identification method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring flame and smoke images in a monitoring video, and preprocessing and marking the flame and smoke images in the monitoring video to obtain target flame and smoke images; performing format conversion and feature extraction processing on the target flame and smoke image, and inputting the processed target flame and smoke image into a preset YOLOv8 smoke and flame recognition model to perform iterative training of smoke and flame so as to obtain a target YOLOv8 smoke and flame recognition model; and the target YOLOv8 smoke flame identification model is optimized, and the optimized target YOLOv8 smoke flame identification model is adopted to identify smoke and flame in the refinery monitoring video. According to the scheme, smoke and flame scenes in the monitoring video image are automatically analyzed and recognized, early warning information is generated, and fire detection and alarm are completed in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer security technology, and in particular to a refinery smoke and flame identification method, device, electronic equipment and storage medium. Background Art

[0002] Smoke detection through the video captured by the camera is a very promising research direction. With the large-scale application of cameras, the price of network surveillance cameras is constantly decreasing, while the performance is constantly improving. This has enabled the rapid development of related research on detecting fire hazards and whether a fire has occurred through video images. And because network surveillance cameras have been widely used, the cost of deploying a fire warning system based on video smoke detection will also become very low.

[0003] Traditional fire alarm systems generally use infrared cameras and manual monitoring, which cannot detect abnormal smoke and signs of fire in the monitored area in a timely manner. Traditional fire alarm equipment is limited by environmental conditions such as space height, thermal barriers, explosiveness, and toxicity. It cannot be fully adapted to outdoor occasions and cannot provide real-time video remotely. Summary of the invention

[0004] The embodiments of the present invention provide a refinery smoke and flame recognition method, device, electronic device and storage medium to automatically analyze and identify smoke and flames in monitoring video images, generate early warning information, complete fire detection and alarm in a short time, thereby realizing comprehensive, efficient and intelligent factory production and management.

[0005] In a first aspect, an embodiment of the present invention provides a refinery smoke and flame identification method, comprising:

[0006] Obtaining flame and smoke images in the surveillance video and preprocessing and labeling the flame and smoke images in the surveillance video to obtain target flame and smoke images;

[0007] Perform format conversion and feature extraction on the target flame and smoke images, and input the processed target flame and smoke images into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model;

[0008] The target YOLOv8 smoke and flame recognition model is optimized, and the optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flames in the refinery monitoring video.

[0009] In a second aspect, an embodiment of the present invention further provides a refinery smoke and flame identification device, comprising:

[0010] The target image acquisition and processing module is used to acquire the flame and smoke images in the monitoring video and pre-process and mark the flame and smoke images in the monitoring video to obtain the target flame and smoke images;

[0011] The target YOLOv8 smoke and flame recognition model determination module is used to perform format conversion and feature extraction processing on the target flame and smoke images, and input the processed target flame and smoke images into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model;

[0012] The target YOLOv8 smoke and flame recognition model using module is used to optimize the target YOLOv8 smoke and flame recognition model, and use the optimized target YOLOv8 smoke and flame recognition model to recognize smoke and flames in the refinery monitoring video.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the refinery smoke and flame identification method described in any embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the refinery smoke and flame identification method described in any embodiment of the present invention.

[0018] The embodiment of the present invention provides a refinery smoke and flame recognition method, device, electronic device and storage medium, which obtains the target flame and smoke image by acquiring the flame and smoke image in the monitoring video and preprocessing and marking the flame and smoke image in the monitoring video; performs format conversion and feature extraction processing on the target flame and smoke image, and inputs the processed target flame and smoke image into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model; optimizes the target YOLOv8 smoke and flame recognition model, and uses the optimized target YOLOv8 smoke and flame recognition model to recognize the smoke and flame in the refinery monitoring video. The technical solution of the embodiment of the present invention is adopted, based on the video monitoring system to collect flame and smoke images, relying on computer vision and artificial intelligence technology, a smoke and flame sample library and model are established, and the system is used to automatically analyze and identify the smoke and flame in the video image and generate early warning information, and fire detection and alarm are completed in a short time, thereby realizing comprehensive, efficient and intelligent factory production and management. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:

[0020] Figure 1 is a flow chart of a refinery smoke and flame identification method provided in an embodiment of the present invention;

[0021] Figure 2 This is a sample annotation diagram of a refinery smoke and flame recognition method based on deep learning provided in an embodiment of the present invention;

[0022] Figure 3 is a flow chart of another refinery smoke and flame identification method based on deep learning provided in an embodiment of the present invention;

[0023] Figure 4 This is a flame recognition effect diagram of a refinery smoke and flame recognition method based on deep learning provided in an embodiment of the present invention;

[0024] Figure 5 It is a structural schematic diagram of a refinery smoke and flame identification device provided in an embodiment of the present invention;

[0025] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0028] Among them, the acquisition, storage, use and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0029] Figure 1 This is a flowchart of a refinery smoke and flame identification method provided in an embodiment of the present invention. This embodiment is applicable to the case of identifying smoke and flames in a refinery based on surveillance video. The method of this embodiment can be executed by a refinery smoke and flame identification device, which can be implemented in hardware and / or software. The device can be configured in a refinery smoke and flame identification server. The method specifically includes the following steps:

[0030] S110, obtaining flame and smoke images in the surveillance video and preprocessing and labeling the flame and smoke images in the surveillance video to obtain target flame and smoke images.

[0031] Among them, smoke detection through the video captured by the camera is currently a very promising research direction. At present, with the large-scale application of cameras, the price of network surveillance cameras is constantly decreasing, while the performance is constantly improving, which has enabled the rapid development of related research on detecting fire hazards and whether a fire has occurred through video images; and because network surveillance cameras have been widely used, the cost of deploying a fire warning system based on video smoke detection will also become very low. Compared with the traditional use of sensors for fire warning, the use of surveillance cameras for fire warning can effectively make up for the gap that sensors cannot effectively warn in open rooms or outdoors. In addition, network surveillance cameras have lower environmental requirements and stronger anti-interference capabilities. Once a fault occurs, it can be discovered and repaired in time. These characteristics can reliably ensure that the fire warning system based on video smoke detection is quite robust.

[0032] In the embodiment of the present invention, flame and smoke images are collected based on a video surveillance system, and the flame and smoke images are preprocessed and labeled based on computer vision and intelligent technology to establish a flame and smoke sample library; wherein the flame and smoke sample library may refer to a target flame and smoke image.

[0033] As an optional but non-limiting implementation, the step of obtaining the flame and smoke images in the surveillance video and preprocessing and labeling the flame and smoke images in the surveillance video to obtain the target flame and smoke images includes but is not limited to steps A1-A2:

[0034] Step A1: Obtain flame and smoke images in the surveillance video and filter the flame and smoke images in the surveillance video to obtain first flame images and first smoke images in different scenes, different environments and different stages.

[0035] Step A2: preprocessing the first flame image and the first smoke image, and annotating the flame and smoke scenes in the first flame and smoke images by manual annotation to obtain target flame and smoke images; wherein the preprocessing includes random fuzzy noise addition, expansion erosion and image data enhancement processing.

[0036] Among them, we obtain flame and smoke images from the Internet through various channels, and manually select images suitable for training. These images contain flames and smoke in different scenes, different environments, and different stages. The flame and smoke images are classified and combined into a flame and smoke dataset for multiple transfer learning training. The flame and smoke images can also be directly obtained from cameras near the fire scene, including images in different time periods, rainy days, cloudy days, strong light, foggy days, and other different lighting conditions. Figure 2 ,According to the description of the on-site staff, the locations of dangerous points such as flammable and explosive materials are marked in the image, and the corresponding sample data is generated.

[0037] The preprocessing includes but is not limited to random fuzzy noise, expansion corrosion and image data enhancement processing. Among them, expansion corrosion is to increase or decrease the gray value of the image to obtain more sample images with different features and enhance the diversity of the data. Random fuzzy noise can retain the detailed information in the image, improve the clarity of the reconstructed image, and thus improve the accuracy of the model. The adversarial neural network is a machine learning model composed of two neural networks, in which a generator network attempts to generate realistic data, and the other discriminator network attempts to distinguish between the generated data and the real data. In addition, labeling the flame and smoke scene in the first flame and smoke image can refer to manually labeling the flame and smoke image according to the on-site situation through data visualization and graphical operation.

[0038] As an optional but non-limiting implementation method, the image data enhancement processing refers to generating a flame smoke image through an adversarial neural network; wherein the adversarial neural network includes a generator network and a discriminator network, and during the iterative training process, the generator network is used to generate the flame smoke image, and the discriminator network is used to discriminate between the generated flame smoke image and the real flame smoke image.

[0039] Since the false alarm rate of traditional flame detection methods is high, a target detection technology solution combining adversarial neural networks (GANs) is proposed, which uses the framework of the generator and discriminator of the generative adversarial network to improve the target detection performance and enhance the accuracy and robustness of target detection. The adversarial neural network trains the generator network and the discriminator network. During the iterative training process, the generator is responsible for generating flame and smoke images; while the discriminator is responsible for distinguishing between generated images and real images, until the samples generated by the generator are realistic enough and the discriminator cannot accurately distinguish between real and generated samples, the flame and smoke image samples can be expanded according to the generator.

[0040] S120, performing format conversion and feature extraction processing on the target flame and smoke images, and inputting the processed target flame and smoke images into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model.

[0041] Among them, the present invention adopts deep learning technology, adopts the YOLOv8 target detection algorithm, and proposes a target detection algorithm combined with a GANs (GANs). Figure 3 By establishing a sample database for target recognition such as smoke and flames, applying neural network algorithms such as YOLO, and building a smoke and flame recognition model, the smoke and flame state change process of pumps, devices, and pipe galleries can be dynamically identified by identifying and analyzing the colors of flames and smoke, realizing intelligent early warning applications.

[0042] As an optional but non-limiting implementation, the target flame and smoke images are format converted and feature extracted, and the processed target flame and smoke images are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, including but not limited to steps B1-B3:

[0043] Step B1: Convert the target flame and smoke images into the YOLO standard training set format.

[0044] Step B2: Extract and fuse the target flame and smoke images after format conversion to determine the scale characteristics of smoke and flame.

[0045] Step B3: Input the target flame and smoke images after format conversion and feature extraction processing into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model.

[0046] Among them, the construction of the target YOLOv8 smoke and flame recognition model uses the real-time flame and smoke detection method of YOLOv8 fusion of multiple features, and selects different levels of feature maps as different layers of the pyramid based on the CSPDarknet53 backbone network. This usually includes feature maps of multiple stages from the bottom to the top, and the feature maps of each stage have different scales and semantic information to achieve the construction of the feature pyramid; secondly, by using upsampling or graph channel splicing operations in the network to achieve top-down and lateral connections, it can capture features of different scales and improve the model's detection ability for small targets.

[0047] In the embodiment of the present invention, the target flame and smoke images are converted into the YOLO standard training set format, and the target flame and smoke images after grid conversion are subjected to feature extraction and feature fusion to obtain the final scale features, and the final network weights are generated through multiple rounds of training of the YOLO detection layer. The processed target flame and smoke images are loaded into the preset YOLOv8 smoke and flame recognition model in batches, and the preset YOLOv8 smoke and flame recognition model parameters are read as the basic parameters of the training model. The fire detection is divided into two categories, flame and smoke, for iterative training, and the number of iterations epoch can be set to 300 times.

[0048] As an optional but non-limiting implementation, the target flame and smoke images after format conversion and feature extraction are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, including:

[0049] The Focal Loss function is used to adjust the weights of the second smoke image and the second flame image, and a weight adjustment factor is added to dynamically adjust the Focal Loss function to weights of different losses;

[0050] The target flame and smoke image includes a second smoke image and a second flame image, and a similarity threshold between the second smoke image and the second flame image is less than a preset similarity threshold, and the preset similarity threshold is used to distinguish between the smoke image and the flame image.

[0051] Among them, in the loss calculation part, the Focal Loss loss method is improved, and the samples of flame and smoke images that are difficult to classify (such as the second smoke image and the second flame image) will obtain greater weights, so that the model pays more attention to those difficult-to-classify samples and improves the learning ability of difficult samples. Therefore, the conventional cross entropy loss is replaced by the FocalLoss loss. As shown in the Focal Loss loss function formula, the class imbalance problem is alleviated by adjusting the sample weights. At the same time, in order to solve the problem of slow convergence and improve the regression accuracy, the loss function is dynamically adjusted to the weights of different losses by adding weight adjustment factors.

[0052] The Focal Loss function is expressed as:

[0053]

[0054] Where N is the number of target flame and smoke image samples i; y ij is the true label, p ij is the category probability predicted by the model; γ is an adjustment factor used to control the weights of the second smoke image and the second flame image.

[0055] As an optional but non-limiting implementation, the target flame and smoke images after format conversion and feature extraction are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, which also includes but is not limited to steps C1-C2:

[0056] Step C1: Determine the candidate flame and smoke scenes identified by the preset YOLOv8 smoke and smoke recognition model, and analyze the color features, motion differences of adjacent frame differences, and timing information of the candidate flame and smoke scenes to determine the static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes; the static color texture features and dynamic pixel motion features include brightness changes, lighting interference, and duration.

[0057] Step C2: The Focal Loss function is combined with the static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes, and the candidate flame and smoke scenes identified by the preset YOLOv8 smoke and flame recognition model are re-recognized and iteratively trained to obtain the target YOLOv8 smoke and flame recognition model.

[0058] In the embodiment of the present invention, the Focal Loss function can also be combined with the static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes to perform secondary discrimination on the candidate flame area discriminated by the preset YOLOv8 smoke and flame recognition model. For example, the color features, motion differences of adjacent frame differences and timing information analysis of the result area detected by the preset YOLOv8 smoke and flame recognition model are analyzed, and the brightness changes, light interference and duration of the flame and smoke in the detection result area are analyzed and counted, so as to eliminate the false alarms caused by the changes in ambient light and the interference of the easily confused suspected background to a certain extent, and realize the real-time and efficient flame detection method. In particular, the detection result area can refer to the candidate flame and smoke scene identified by the preset YOLOv8 smoke and flame recognition model.

[0059] The embodiment of the present invention establishes a sample database for identifying targets such as smoke and flames, applies the YOLOv8 neural network algorithm, constructs a smoke and flame recognition model, and dynamically identifies the smoke and flame state change process of pumps, devices, and pipe galleries by identifying and analyzing the colors of flames and smoke, thereby realizing intelligent early warning applications.

[0060] S130, optimizing the target YOLOv8 smoke and flame recognition model, and using the optimized target YOLOv8 smoke and flame recognition model to recognize smoke and flame in the refinery monitoring video.

[0061] Among them, in order to solve the problem of lack of flame datasets, the idea of ​​adversarial training is introduced to improve the diversity of data, so that the target YOLOv8 smoke and flame recognition model can better adapt to challenging scenarios. By adjusting the YOLOv8 outdoor torch label, the recognition rate in special weather conditions is improved; the model network structure is adjusted to increase the model recognition accuracy; the model convolution is adjusted to increase the model recognition accuracy, further expand the reference sample set, and improve the efficiency of image utilization. Finally, the experimental results on multiple public flame datasets show that this method successfully reduces the false alarm rate while also showing good real-time detection speed.

[0062] As an optional but non-limiting implementation, the target YOLOv8 smoke and flame recognition model is optimized, and the optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flames in the refinery monitoring video, including but not limited to steps D1-D2:

[0063] Step D1: Modify the yaml file of the target YOLOv8 smoke and flame recognition model and add a small target detection layer to optimize the target YOLOv8 smoke and flame recognition model.

[0064] Step D2: Use the optimized target YOLOv8 smoke and flame recognition model to identify smoke and flames in the refinery monitoring video and issue early warnings for flame and smoke events.

[0065] Among them, in the embodiment of the present invention, the yaml file of the target YOLOv8 smoke and flame recognition model is modified to optimize the target YOLOv8 smoke and flame recognition model. For example, the anchor and head parts of the target YOLOv8 smoke and flame recognition model are modified to add a small target detection layer. The head part changes the original coupling head to a decoupling head, and the anchor part changes from Anchor-Based of YOLOv5 to Anchor-Free to add a small target detection layer to improve the detection accuracy of small targets, thereby increasing the recognition accuracy of the target YOLOv8 smoke and flame recognition model.

[0066] The optimized target YOLOv8 smoke and flame recognition model is used to identify flames and smoke, and the following results are obtained: Figure 4 The refinery smoke and flame recognition effect diagram is shown. When flame or smoke is recognized, an early warning of the flame and / or smoke event is issued.

[0067] The embodiment of the present invention provides a method for identifying smoke and flame in a refinery, which obtains target flame and smoke images by acquiring flame and smoke images in a monitoring video and preprocessing and labeling the flame and smoke images in the monitoring video; performs format conversion and feature extraction processing on the target flame and smoke images, and inputs the processed target flame and smoke images into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model; optimizes the target YOLOv8 smoke and flame recognition model, and uses the optimized target YOLOv8 smoke and flame recognition model to identify smoke and flame in the monitoring video of the refinery. The technical solution of the embodiment of the present invention is adopted, based on the video monitoring system to collect flame and smoke images, relying on computer vision and artificial intelligence technology, a smoke and flame sample library and model are established, the system is used to automatically analyze and identify smoke and flame in the video image and generate early warning information, and fire detection and alarm are completed in a short time, thereby realizing comprehensive, efficient and intelligent factory production and management.

[0068] Figure 5 This is a schematic diagram of the structure of a refinery smoke and flame identification device provided in an embodiment of the present invention. The technical solution of this embodiment can be applied to the situation of refinery smoke and flame identification. The device can be implemented by software and / or hardware and is generally integrated on any electronic device with network communication function, including but not limited to: servers, computers, personal digital assistants and other devices. Figure 5As shown, the refinery smoke and flame recognition device provided in this embodiment may include: a target image acquisition and processing module 510, a target YOLOv8 smoke and flame recognition model determination module 520 and a target YOLOv8 smoke and flame recognition model use module 530; wherein,

[0069] The target image acquisition and processing module 510 is used to acquire the flame and smoke images in the monitoring video and pre-process and mark the flame and smoke images in the monitoring video to obtain the target flame and smoke images;

[0070] A target YOLOv8 smoke and flame recognition model determination module 520 is used to perform format conversion and feature extraction processing on the target flame and smoke images, and input the processed target flame and smoke images into a preset YOLOv8 smoke and flame recognition model to perform iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model;

[0071] The target YOLOv8 smoke and flame recognition model using module 530 is used to optimize the target YOLOv8 smoke and flame recognition model and use the optimized target YOLOv8 smoke and flame recognition model to recognize smoke and flames in the refinery monitoring video.

[0072] Based on the above embodiment, optionally, the target image acquisition and processing module is specifically used for:

[0073] Acquire flame and smoke images in the surveillance video and filter the acquired flame and smoke images in the surveillance video to obtain first flame images and first smoke images in different scenes, different environments and different stages;

[0074] The first flame image and the first smoke image are preprocessed, and the flame and smoke scenes in the first flame and smoke images are annotated by manual annotation to obtain target flame and smoke images; wherein the preprocessing includes random fuzzy noise addition, expansion erosion and image data enhancement processing.

[0075] Based on the above embodiment, optionally, the target image acquisition and processing module is specifically used for:

[0076] The image data enhancement processing refers to generating a flame smoke image through an adversarial neural network; wherein the adversarial neural network includes a generator network and a discriminator network. During the iterative training process, the generator network is used to generate the flame smoke image, and the discriminator network is used to distinguish the generated flame smoke image from the real flame smoke image.

[0077] Based on the above embodiment, optionally, the target YOLOv8 smoke and flame recognition model determination module is specifically used to:

[0078] Convert the target flame and smoke images into the YOLO standard training set format;

[0079] Perform feature extraction and feature fusion on the target flame and smoke images after format conversion to determine the scale features of smoke and flame;

[0080] The target flame and smoke images after format conversion and feature extraction are input into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model.

[0081] Based on the above embodiment, optionally, the target YOLOv8 smoke and flame recognition model determination module is further specifically used for:

[0082] The Focal Loss function is used to adjust the weights of the second smoke image and the second flame image, and a weight adjustment factor is added to dynamically adjust the Focal Loss function to weights of different losses;

[0083] Wherein, the target flame and smoke image includes a second smoke image and a second flame image, and a similarity threshold between the second smoke image and the second flame image is less than a preset similarity threshold, and the preset similarity threshold is used to distinguish between the smoke image and the flame image;

[0084] The Focal Loss function is expressed as:

[0085]

[0086] Where N is the number of target flame and smoke image samples i; y ij is the true label, p ij is the category probability predicted by the model; γ is an adjustment factor used to control the weights of the second smoke image and the second flame image.

[0087] Based on the above embodiment, optionally, the target YOLOv8 smoke and flame recognition model determination module is further specifically used for:

[0088] Determine candidate flame and smoke scenes identified by a preset YOLOv8 smoke and smoke recognition model, and analyze the color features, motion differences of adjacent frame differences, and timing information of the candidate flame and smoke scenes to determine static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes; the static color texture features and dynamic pixel motion features include brightness changes, lighting interference, and duration;

[0089] The focal loss function is combined with the static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes, and the candidate flame and smoke scenes identified by the preset YOLOv8 smoke and flame recognition model are re-recognized and iteratively trained to obtain the target YOLOv8 smoke and flame recognition model.

[0090] Based on the above embodiment, optionally, the target YOLOv8 smoke and flame recognition model using module is specifically used for:

[0091] Modify the yaml file of the target YOLOv8 smoke and flame recognition model and add a small target detection layer to optimize the target YOLOv8 smoke and flame recognition model;

[0092] The optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flames in the refinery monitoring video and issue early warnings for flame and smoke events.

[0093] The refinery smoke and flame identification device provided in the embodiment of the present invention can execute the refinery smoke and flame identification method provided in any embodiment of the present invention mentioned above, and has the corresponding functions and beneficial effects of executing the refinery smoke and flame identification method. For detailed process, please refer to the relevant operations of the refinery smoke and flame identification method in the aforementioned embodiment.

[0094] Figure 6 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0095] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0096] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0097] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a refinery smoke and flame identification method.

[0098] In some embodiments, the refinery smoke and flame identification method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the refinery smoke and flame identification method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the refinery smoke and flame identification method in any other appropriate manner (for example, by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0106] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A refinery smoke and flame identification method, characterized in that: The method comprises: Obtaining flame and smoke images in the surveillance video and preprocessing and labeling the flame and smoke images in the surveillance video to obtain target flame and smoke images; Perform format conversion and feature extraction on the target flame and smoke images, and input the processed target flame and smoke images into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model; The target YOLOv8 smoke and flame recognition model is optimized, and the optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flames in the refinery monitoring video.

2. The method according to claim 1, characterized in that The method of obtaining the flame and smoke images in the surveillance video and preprocessing and labeling the flame and smoke images in the surveillance video to obtain the target flame and smoke images includes: Acquire flame and smoke images in the surveillance video and filter the acquired flame and smoke images in the surveillance video to obtain first flame images and first smoke images in different scenes, different environments and different stages; The first flame image and the first smoke image are preprocessed, and the flame and smoke scenes in the first flame and smoke images are annotated by manual annotation to obtain target flame and smoke images; wherein the preprocessing includes random fuzzy noise addition, expansion erosion and image data enhancement processing.

3. The method according to claim 2, characterized in that The image data enhancement processing refers to generating a flame smoke image through an adversarial neural network; wherein the adversarial neural network includes a generator network and a discriminator network. During the iterative training process, the generator network is used to generate the flame smoke image, and the discriminator network is used to distinguish the generated flame smoke image from the real flame smoke image.

4. The method according to claim 1, characterized in that: The target flame and smoke images are format converted and feature extracted, and the processed target flame and smoke images are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, including: Convert the target flame and smoke images into the YOLO standard training set format; Perform feature extraction and feature fusion on the target flame and smoke images after format conversion to determine the scale features of smoke and flame; The target flame and smoke images after format conversion and feature extraction are input into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model.

5. The method according to claim 4, characterized in that The target flame and smoke images after format conversion and feature extraction are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, including: The FocalLoss function is used to adjust the weights of the second smoke image and the second flame image, and a weight adjustment factor is added to dynamically adjust the Focal Loss function to weights of different losses; Wherein, the target flame and smoke image includes a second smoke image and a second flame image, and a similarity threshold between the second smoke image and the second flame image is less than a preset similarity threshold, and the preset similarity threshold is used to distinguish between the smoke image and the flame image; The FocalLoss function is expressed as: Where N is the number of target flame and smoke image samples i; y ij is the true label, p ij is the category probability predicted by the model; γ is an adjustment factor used to control the weights of the second smoke image and the second flame image.

6. The method according to claim 4, characterized in that The target flame and smoke images after format conversion and feature extraction are input into a preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain a target YOLOv8 smoke and flame recognition model, and further includes: Determine candidate flame and smoke scenes identified by a preset YOLOv8 smoke and smoke recognition model, and analyze the color features, motion differences of adjacent frame differences, and timing information of the candidate flame and smoke scenes to determine static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes; the static color texture features and dynamic pixel motion features include brightness changes, lighting interference, and duration; The FocalLoss function is combined with the static color texture features and dynamic pixel motion features of the candidate flame and smoke scenes, and the candidate flame and smoke scenes identified by the preset YOLOv8 smoke and flame recognition model are re-recognized and iteratively trained to obtain the target YOLOv8 smoke and flame recognition model.

7. The method according to claim 1, characterized in that The target YOLOv8 smoke and flame recognition model is optimized, and the optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flame in the refinery monitoring video, including: Modify the yaml file of the target YOLOv8 smoke and flame recognition model and add a small target detection layer to optimize the target YOLOv8 smoke and flame recognition model; The optimized target YOLOv8 smoke and flame recognition model is used to identify smoke and flames in the refinery monitoring video and issue early warnings for flame and smoke events.

8. A refinery smoke and flame identification device, characterized in that: The device comprises: The target image acquisition and processing module is used to acquire the flame and smoke images in the monitoring video and pre-process and mark the flame and smoke images in the monitoring video to obtain the target flame and smoke images; The target YOLOv8 smoke and flame recognition model determination module is used to perform format conversion and feature extraction processing on the target flame and smoke images, and input the processed target flame and smoke images into the preset YOLOv8 smoke and flame recognition model for iterative training of smoke and flame to obtain the target YOLOv8 smoke and flame recognition model; The target YOLOv8 smoke and flame recognition model using module is used to optimize the target YOLOv8 smoke and flame recognition model, and use the optimized target YOLOv8 smoke and flame recognition model to recognize smoke and flames in the refinery monitoring video.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the refinery smoke and flame identification method described in any one of claims 1-7.

10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the refinery smoke and flame identification method as described in any one of claims 1-7 when executed by a computer processor.

Citation Information

Cited By

  • Visual pollution AI identification system and device based on YOLOv8 and OpenCV

    CN120953770A