CN114399734A - Forest fire early warning method based on visual information - Google Patents
Forest fire early warning method based on visual information Download PDFInfo
- Publication number
- CN114399734A CN114399734A CN202210049405.9A CN202210049405A CN114399734A CN 114399734 A CN114399734 A CN 114399734A CN 202210049405 A CN202210049405 A CN 202210049405A CN 114399734 A CN114399734 A CN 114399734A
- Authority
- CN
- China
- Prior art keywords
- smoke
- forest
- forest fire
- feature
- detection model
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000000007 visual effect Effects 0.000 title claims abstract description 7
- 239000000779 smoke Substances 0.000 claims abstract description 74
- 238000001514 detection method Methods 0.000 claims abstract description 54
- 238000012544 monitoring process Methods 0.000 claims abstract description 12
- 238000012549 training Methods 0.000 claims abstract description 7
- 230000004927 fusion Effects 0.000 claims description 22
- 238000000605 extraction Methods 0.000 claims description 9
- 230000003044 adaptive effect Effects 0.000 claims description 8
- 238000007781 pre-processing Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000004519 manufacturing process Methods 0.000 claims 1
- 230000002194 synthesizing effect Effects 0.000 claims 1
- 239000000284 extract Substances 0.000 abstract description 3
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011176 pooling Methods 0.000 description 2
- 230000001629 suppression Effects 0.000 description 2
- 101100441251 Arabidopsis thaliana CSP2 gene Proteins 0.000 description 1
- 102100027557 Calcipressin-1 Human genes 0.000 description 1
- 101100247605 Homo sapiens RCAN1 gene Proteins 0.000 description 1
- 241001465754 Metazoa Species 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 101150064416 csp1 gene Proteins 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B17/00—Fire alarms; Alarms responsive to explosion
- G08B17/005—Fire alarms; Alarms responsive to explosion for forest fires, e.g. detecting fires spread over a large or outdoors area
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B17/00—Fire alarms; Alarms responsive to explosion
- G08B17/10—Actuation by presence of smoke or gases, e.g. automatic alarm devices for analysing flowing fluid materials by the use of optical means
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B17/00—Fire alarms; Alarms responsive to explosion
- G08B17/12—Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions
- G08B17/125—Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions by using a video camera to detect fire or smoke
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Emergency Management (AREA)
- Business, Economics & Management (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biodiversity & Conservation Biology (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Multimedia (AREA)
- Fire-Detection Mechanisms (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明属于森林火警预测领域,特别是涉及一种基于视觉信息的森林火灾预警方法。The invention belongs to the field of forest fire alarm prediction, in particular to a forest fire early warning method based on visual information.
背景技术Background technique
全世界平均每年发生森林火灾22万次,受灾面积达1000万公顷,造成了无数财产损失和珍惜动物伤亡,防范森林火灾迫在眉睫。在火灾发生的早期,烟雾总是先于明火而产生,所以及时检测出烟雾可以有效防止火势恶化,传统的方法大部分基于传感器,但由于传感器的探测距离有限,仅适合室内场所,对大面积的森林起不到有效作用。There are an average of 220,000 forest fires in the world every year, affecting an area of 10 million hectares, causing countless property losses and casualties of precious animals. It is imminent to prevent forest fires. In the early stage of a fire, smoke is always generated before an open fire, so timely detection of smoke can effectively prevent the fire from worsening. Most of the traditional methods are based on sensors, but due to the limited detection distance of sensors, they are only suitable for indoor places, and for large areas forests are not effective.
对于森林火灾,最易实现的办法就是通过监控摄像头检测烟雾,传统基于图像的森林烟雾检测都是通过根据烟雾的形状、颜色、纹理、运动特性进行识别,先利用前景提取或运动区域提取方法生成疑似烟雾候选区域。然后设计人工特征,提取候选区域的烟雾特征向量,最后将提取的特征输入分类器分类,得到最终的检测结果。但森林火灾监控摄像头视野广,一般获取远距离火灾烟雾视频,所以烟雾区域往往较小,传统基于图像的检测算法检测效果较差,漏检情况严重,而且不能在多场景任务中应用。For forest fires, the easiest way to achieve is to detect smoke through surveillance cameras. Traditional image-based forest smoke detection is based on the shape, color, texture, and motion characteristics of the smoke. Suspected smoke candidate area. Then design artificial features, extract the smoke feature vector of the candidate area, and finally input the extracted features into the classifier to obtain the final detection result. However, forest fire surveillance cameras have a wide field of view and generally obtain long-distance fire smoke video, so the smoke area is often small. The traditional image-based detection algorithm has poor detection effect and serious missed detection, and cannot be applied in multi-scene tasks.
近几年深度学习飞速发展,大量实验证明基于深度学习的烟雾检测算法更有效和实用,通过神经网络和损失函数,对大量烟雾数据集进行训练,得到了高效烟雾检测模型。起初研究者使用AlexNet进行特征提取,获得比传统算法更好的特征图,但在准确度和漏报率上还达不到要求。随着卷积神经网络不断发展,对图像的特征提取越来越精确,如VGG、RCNN、YOLO系列网络已经能满足很多应用需求,但它们作为目标检测的基础网络,直接用作烟雾检测效果并不好,最主要的原因是火灾发生早期的烟雾在整个视野里占比很小,像素信息很少,神经网络难以识别;其次因为真实环境比较复杂,在雾天情况识别火灾烟雾是关键难题;在火灾烟雾检测这一特定的领域的数据集很少,公开的数据集大多没有标签,并且样本单一不具有代表性,通过这样数据集训练的网络并不能有效检测早期烟雾火灾,给科研工作者带来极大不便。In recent years, deep learning has developed rapidly. A large number of experiments have proved that the smoke detection algorithm based on deep learning is more effective and practical. Through neural network and loss function, a large number of smoke data sets are trained, and an efficient smoke detection model is obtained. At first, researchers used AlexNet for feature extraction to obtain better feature maps than traditional algorithms, but the accuracy and false negative rate did not meet the requirements. With the continuous development of convolutional neural networks, the feature extraction of images is becoming more and more accurate, such as VGG, RCNN, YOLO series networks have been able to meet many application requirements, but as the basic network of target detection, they are directly used for smoke detection effect and No, the main reason is that the smoke in the early stage of the fire accounts for a small proportion of the entire field of view, and the pixel information is very small, so it is difficult for the neural network to identify; secondly, because the real environment is more complex, it is a key problem to identify fire smoke in foggy conditions; There are few datasets in the specific field of fire smoke detection, most of the public datasets are unlabeled, and the samples are single and unrepresentative. The network trained by such datasets cannot effectively detect early smoke and fires, which is very important for researchers. cause great inconvenience.
发明内容SUMMARY OF THE INVENTION
本发明的目的是提供一种基于视觉信息的森林火灾预警方法,以解决上述现有技术存在的问题。The purpose of the present invention is to provide a forest fire warning method based on visual information, so as to solve the problems existing in the above-mentioned prior art.
一方面为实现上述目的,本发明提供了一种基于视觉信息的森林火灾预警方法,包括:On the one hand, in order to achieve the above object, the present invention provides a forest fire warning method based on visual information, including:
构建待测数据集和森林火灾检测模型,并将所述待测数据集中的图像输入所述森林火灾检测模型进行训练,获得完成训练的所述森林火灾检测模型;constructing a data set to be tested and a forest fire detection model, and inputting the images in the data set to be tested into the forest fire detection model for training, to obtain the trained forest fire detection model;
在森林中布置监控摄像头,并对所有所述监控摄像头进行编号;arranging surveillance cameras in the forest and numbering all said surveillance cameras;
将所述监控摄像头采集的视频数据输入训练好的所述森林火灾检测模型进行分类,若分类结果为检测到烟雾则发出烟雾报警,并提供视频来源的监控摄像头的编号,完成森林火灾预警。Input the video data collected by the surveillance camera into the trained forest fire detection model for classification, if the classification result is that smoke is detected, a smoke alarm is issued, and the number of the surveillance camera from which the video is sourced is provided to complete the forest fire warning.
可选的,构建待测数据集的过程包括:Optionally, the process of constructing the data set to be tested includes:
收集从网络爬取到的森林烟雾图片和仅有雾的森林图片;Collect forest smoke pictures and fog-only forest pictures from web crawling;
人工制造以森林为背景的烟雾,通过摄像机远距离拍摄,将拍摄的视频逐帧保存为统一格式的图片,作为森林烟雾图片;The smoke with the forest as the background is artificially created, and the camera is used for long-distance shooting, and the captured video is saved as a picture in a unified format frame by frame, as a forest smoke picture;
随机对部分所述森林烟雾图片加上雾的干扰,获得有雾干扰的森林烟雾图片;Randomly add fog interference to some of the forest smoke pictures to obtain forest smoke pictures with fog interference;
将所述有雾干扰的森林烟雾图片和所述仅有雾的森林图片合成所述待测数据集。The data set to be tested is synthesized by combining the forest smoke picture with fog interference and the fog-only forest picture.
可选的,构建待测数据集的过程还包括:Optionally, the process of constructing the data set to be tested further includes:
对所述有雾干扰的森林烟雾图片进行标注,获得烟雾的分类信息和真实框的坐标大小信息。Annotate the forest smoke picture with fog interference, and obtain the classification information of the smoke and the coordinate size information of the real frame.
可选的,构建所述森林火灾检测模型的过程中包括:Optionally, the process of constructing the forest fire detection model includes:
采用YOLOv5网络模型构建所述森林火灾检测模型,所述森林火灾检测模型通过四层卷积层进行特征提取。The YOLOv5 network model is used to construct the forest fire detection model, and the forest fire detection model performs feature extraction through four convolution layers.
可选的,将所述待测数据集中的图像输入所述森林火灾检测模型进行训练的过程中包括:Optionally, the process of inputting the images in the data set to be tested into the forest fire detection model for training includes:
对所述待测数据集中的图像进行预处理;Preprocessing the images in the data set to be tested;
通过注意力机制对结束预处理后的图像进行特征提取,提取出特征图;Feature extraction is performed on the pre-processed image through the attention mechanism, and the feature map is extracted;
对所述特征图进行特征融合和决策分类,获得最终特征图,基于所述最终特征图进行检测。Feature fusion and decision classification are performed on the feature map to obtain a final feature map, and detection is performed based on the final feature map.
可选的,对所述待测数据集中的图像进行预处理的过程包括:Optionally, the process of preprocessing the images in the data set to be tested includes:
对所述待测数据集中的图像进行马赛克数据增强、自适应锚框计算和自适应图像缩放;Perform mosaic data enhancement, adaptive anchor frame calculation and adaptive image scaling on the images in the data set to be tested;
其中马赛克数据增强通过随机缩放、随机裁剪、随机排布的方式对所述待测数据集中的图像进行拼接。The mosaic data enhancement splices the images in the data set to be tested by means of random scaling, random cropping, and random arrangement.
可选的,通过注意力机制对结束预处理后的图像进行特征提取,提取出特征图的过程包括:Optionally, feature extraction is performed on the preprocessed image through the attention mechanism, and the process of extracting the feature map includes:
通过空间注意力找到结束预处理后的图像中的烟雾区域,降低其他背景区域的权重;Find the smoke area in the preprocessed image through spatial attention, and reduce the weight of other background areas;
通过通道注意力强调代表烟雾的特征通道,降低其他通道权重,提取出所述特征图。The feature map is extracted by emphasizing the feature channel representing smoke through channel attention, and reducing the weight of other channels.
可选的,对所述特征图进行特征融合和决策分类的过程包括:Optionally, the process of performing feature fusion and decision classification on the feature map includes:
获取所述森林火灾检测模型的第二、三、四个卷积层的数据并进行融合,获取融合特征;Obtain the data of the second, third and fourth convolutional layers of the forest fire detection model and fuse them to obtain fusion features;
对所述融合特征进行分类,获取最终特征图。Classify the fused features to obtain a final feature map.
本发明的技术效果为:The technical effect of the present invention is:
(1)本发明在YOLOv5网络neck部分嵌入CBAM注意力机制,使网络对小尺度烟雾更加敏感,更好提取早期森林火灾烟雾的特征。(1) The present invention embeds the CBAM attention mechanism in the neck part of the YOLOv5 network, which makes the network more sensitive to small-scale smoke and better extracts the characteristics of early forest fire smoke.
(2)本发明把特征级和决策级的分类检测模块融入YOLOv5的Backbone部分,提高了烟雾与相似物体的鉴别能力,尤其是鉴别烟和雾的特征。(2) The present invention integrates the feature-level and decision-level classification and detection modules into the Backbone part of YOLOv5, which improves the discrimination ability between smoke and similar objects, especially the characteristics of smoke and fog.
(3)本发明在数据集中加入雾的负样本,使网络适应在雾天环境下对烟的检测。(3) The present invention adds a negative sample of fog in the data set, so that the network can be adapted to the detection of smoke in a foggy environment.
附图说明Description of drawings
构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The accompanying drawings constituting a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:
图1为本发明实施例中的YOLOv5s网络结构图;Fig. 1 is the YOLOv5s network structure diagram in the embodiment of the present invention;
图2为本发明实施例中的融合CBAM后的YOLOv5结构图;Fig. 2 is the YOLOv5 structure diagram after the fusion CBAM in the embodiment of the present invention;
图3为本发明实施例中的CBAM结构图;3 is a structural diagram of a CBAM in an embodiment of the present invention;
图4为本发明实施例中的融合分类检测模块结构图;4 is a structural diagram of a fusion classification detection module in an embodiment of the present invention;
图5为本发明实施例中的YOLOv5+融合分类检测模块结构图。FIG. 5 is a structural diagram of a YOLOv5+ fusion classification detection module in an embodiment of the present invention.
具体实施方式Detailed ways
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be executed in a computer system, such as a set of computer-executable instructions, and, although a logical sequence is shown in the flowcharts, in some cases, Steps shown or described may be performed in an order different from that herein.
实施例一Example 1
本发明实施例中提供了一种基于视觉信息的森林火灾预警方法,包括:An embodiment of the present invention provides a forest fire warning method based on visual information, including:
(1)收集从网络爬取到的森林烟雾图片,转化为固定格式。(1) Collect forest smoke pictures crawled from the web and convert them into a fixed format.
(2)人工制造以森林为背景的烟雾,通过摄像机远距离拍摄,将拍摄的视频逐帧保存为统一格式的图片。(2) The smoke with the forest as the background is artificially created, and the camera is used for long-distance shooting, and the shot video is saved as a picture in a unified format frame by frame.
(3)通过程序给一部分森林烟图片加上雾的干扰。(3) Add fog interference to some forest smoke pictures through the program.
(4)将上述所处理的图片连同只有雾的图片合并为一个数据集,通过标注软件对所有包含烟的图像人工标注,获得烟雾的分类信息和真实框的坐标大小信息。(4) Combine the above processed pictures together with the pictures with only fog into a data set, and manually label all the images containing smoke through the labeling software to obtain the classification information of the smoke and the coordinate size information of the real frame.
(5)在边缘服务器搭建改进后的YOLOv5网络模型。利用创建的数据集训练改进后的YOLOv5网络。(5) Build an improved YOLOv5 network model on the edge server. The improved YOLOv5 network is trained with the created dataset.
(6)在森林各个区域布置监控摄像头,给每个监控编号。如果是山林,一座山可以通过3个摄像头实施监控,在距离山腰3千米左右的地方布置监控,每个摄像头水平视角120°,即可对一座山实施全方位监控;如果在平原森林,在森林瞭望塔布置监控,一个瞭望塔同样使用3个摄像头形成对周围360°监控。(6) Arrange surveillance cameras in various areas of the forest, and assign each surveillance number. If it is a mountain forest, a mountain can be monitored by 3 cameras, and monitoring is arranged at a distance of about 3 kilometers from the mountainside. Each camera has a horizontal viewing angle of 120°, and a mountain can be monitored in all directions; The forest watchtower is arranged for monitoring, and a watchtower also uses 3 cameras to form a 360° monitoring of the surroundings.
(7)在边缘服务器接收监控摄像头传来的视频数据,送入训练好的网络模型进行分类。(7) The video data from the surveillance camera is received at the edge server and sent to the trained network model for classification.
(8)如果分类结果是检测到烟雾,则发出烟雾警报,提供视频来源的监控摄像头编号,然后重复步骤6;如果分类结果没检测到烟雾,则重复步骤6。(8) If the classification result is that smoke is detected, a smoke alarm is issued, and the surveillance camera number of the video source is provided, and then step 6 is repeated; if the classification result does not detect smoke, step 6 is repeated.
本发明实施例中的模型采用的为YOLOv5网络模型,YOLOv5是一种单阶段的端到端目标检测框架,有s、x、m、l四个版本,模型由小变大,目标检测的精确度逐步提高,但同时检测速度也逐渐降低,YOLOv5模型一直都在持续更新中,具体的,本发明使用YOLOv5-5.0的s版本,因为森林火灾烟雾检测要求反应迅速,才能足够短的时间内防止火势蔓延。YOLOv5s的结构如图1所示,由四个部分组成:输入部分、Backbone部分、Neck部和Detect部分。The model in the embodiment of the present invention adopts the YOLOv5 network model. YOLOv5 is a single-stage end-to-end target detection framework, with four versions: s, x, m, and l. The model changes from small to large, and the target detection is accurate. The speed of detection is gradually improved, but the detection speed is also gradually reduced. The YOLOv5 model has been continuously updated. Specifically, the present invention uses the s version of YOLOv5-5.0, because the detection of forest fire smoke requires rapid response to prevent it in a short enough time. The fire spread. The structure of YOLOv5s is shown in Figure 1 and consists of four parts: the input part, the Backbone part, the Neck part and the Detect part.
输入部分主要包括部分主要包括马赛克数据增强、自适应锚框计算和自适应图像缩放。马赛克数据增强通过随机缩放、随机裁剪、随机排布的方式进行拼接,对小尺度的检测有很好效果;设置合适的锚框会得到较高的交并比,这有助于提高模型的准确性,在训练过程中,先验框可以更好地学习适应不同物体的形状。自适应锚框设计针对不同的数据集,都会有初始设定长宽的锚框。在网络训练中,网络在初始锚框的基础上输出预测框,进而和真实框进行比对,计算两者差距,再反向更新,迭代网络参数。自适应图像缩放在于,实际使用时,很多图片的长宽比不同。因此缩放填充后,两端的黑边大小都不同,而如果填充的比较多,则存在信息冗余,影响推理速度。因此对原始图像自适应的添加最少的黑边,图像高度上两端的黑边变少了,在推理时,计算量也会减少,即目标检测速度会得到提升。The input part mainly includes parts including mosaic data enhancement, adaptive anchor box calculation and adaptive image scaling. Mosaic data enhancement is stitched by random scaling, random cropping, and random arrangement, which has a good effect on small-scale detection; setting an appropriate anchor frame will get a higher intersection ratio, which helps to improve the accuracy of the model In the training process, the prior box can better learn to adapt to the shape of different objects. Adaptive anchor box design For different data sets, there will be anchor boxes with initial set length and width. In the network training, the network outputs the predicted frame based on the initial anchor frame, and then compares it with the real frame, calculates the difference between the two, and then reversely updates and iterates the network parameters. Adaptive image scaling is that, in actual use, many images have different aspect ratios. Therefore, after scaling and filling, the size of the black borders at both ends are different, and if there is more filling, there will be information redundancy, which will affect the inference speed. Therefore, the least black borders are added to the original image adaptively, and the black borders at both ends of the image height are reduced. During inference, the amount of calculation will also be reduced, that is, the target detection speed will be improved.
Backbone部分使用CSP1网络结构进行特征提取,主要用于解决较大卷积层中的梯度复制问题,此外YOLOv5系列还增加了YOLOv4所没有的Focus结构。The Backbone part uses the CSP1 network structure for feature extraction, which is mainly used to solve the problem of gradient replication in larger convolutional layers. In addition, the YOLOv5 series also adds a Focus structure that YOLOv4 does not have.
Neck部分用于特征融合,采用特征金字塔网络(Feature pyramid Network,FPN)和感知对抗网络(Perceptual adversial Network,PAN)结构实现上采样和下采样过程。FPN是自顶向下的,它使用上采样的方法来传输和融合信息,得到预测的特征图。PAN使用自底向上的特征金字塔。FPN使用自顶向下的特征卷积,利用插值在较高的特征层上从19*19到38*38做2次上采样,而特征层通过1x1卷积水平连接,改变下层特征层的底层通道数。与YOLOv4不同的是,Yolov4的Neck采用的都是普通的卷积操作,而Yolov5的Neck结构中,采用借鉴CSPNet设计的CSP2结构,加强网络特征融合的能力。The Neck part is used for feature fusion, and the feature pyramid network (FPN) and perceptual adversial network (PAN) structures are used to realize the upsampling and downsampling process. FPN is top-down, and it uses upsampling to transfer and fuse information to obtain predicted feature maps. PAN uses a bottom-up feature pyramid. FPN uses top-down feature convolution, using interpolation to do 2 upsampling from 19*19 to 38*38 on the higher feature layer, and the feature layer is connected horizontally by 1x1 convolution, changing the bottom layer of the lower feature layer number of channels. Different from YOLOv4, Yolov4's Neck uses ordinary convolution operations, while Yolov5's Neck structure adopts the CSP2 structure designed by reference to CSPNet to enhance the ability of network feature fusion.
Detect部分主要包括Bounding box损失函数和NMS非极大值抑制,Bounding box损失函数为GIOU_loss,其公式为:The Detect part mainly includes the Bounding box loss function and NMS non-maximum suppression. The Bounding box loss function is GIOU_loss, and its formula is:
其中C为能够同时框住真实框与预测框的最小的框,C的面积减去预测框与真实框的面积,再比上C的面积,即可反映出真实框与预测框距离,有效地解决了当预测帧与真实帧不相交时,预测帧与真实帧之间的距离信息丢失,且IOU等于0的问题。NMS非极大值抑制可以选出众多预测框中IOU最高的那个,使模型更准确。Among them, C is the smallest frame that can frame the real frame and the predicted frame at the same time. The area of C minus the area of the predicted frame and the real frame, and then compared with the area of C, can reflect the distance between the real frame and the predicted frame, effectively Solved the problem that when the predicted frame and the real frame do not intersect, the distance information between the predicted frame and the real frame is lost, and the IOU is equal to 0. NMS non-maximum suppression can select the one with the highest IOU in many prediction boxes, making the model more accurate.
在森林火灾发生的早期,烟雾还比较少,在整个监控视野的占比也很小,通过多层卷积神经网络最终提取的特征与背景相比非常少,导致特征表达能力较弱,对小目标的检测下降,无论是正常环境还是雾天环境都是个挑战。为了解决这个问题,本发明将空间注意力和通道注意力融入YOLOv5网络中,有助于网络学习到烟雾的特征,减少背景的干扰,融合CBAM后的网络结构如图2所示,将CBAM模块分别放在三种不同尺度检测头的卷积层前面,可以对各种尺度的目标起作用。In the early stage of the forest fire, the smoke is still relatively small, and the proportion of the entire monitoring field of view is also very small. Compared with the background, the features finally extracted by the multi-layer convolutional neural network are very small, resulting in weak feature expression ability, which is not suitable for small The detection of the target drops, whether it is a normal environment or a foggy environment, it is a challenge. In order to solve this problem, the present invention integrates spatial attention and channel attention into the YOLOv5 network, which helps the network to learn the characteristics of smoke and reduce the interference of the background. The network structure after fusion of CBAM is shown in Figure 2. The CBAM module is They are placed in front of the convolutional layers of the detection heads of three different scales, which can work on targets of various scales.
CBAM模块结构如图3所示,它是由空间注意力和通道注意力连接起来的,空间注意力会在找到图片中包含物体概率最大的区域,即有烟雾区域,给这个区域更高的权重,同时将其他背景区域的权重降低;通过卷积提取特征过程中,会将原始图片变成多通道的特征图,通道注意力强调代表烟雾的特征通道,并赋予它们更高的权重,而其他通道权重则变小。这种联合的注意机制可以更加注意烟雾的位置,减少背景干扰,提高小尺度烟雾检测的准确性。The structure of the CBAM module is shown in Figure 3. It is connected by spatial attention and channel attention. Spatial attention will find the area with the highest probability of containing objects in the picture, that is, the area with smoke, and give this area a higher weight. , while reducing the weight of other background regions; during the feature extraction process through convolution, the original image will be turned into a multi-channel feature map, and the channel attention will emphasize the feature channels representing smoke and give them higher weights, while other The channel weight becomes smaller. This joint attention mechanism can pay more attention to the location of smoke, reduce background interference, and improve the accuracy of small-scale smoke detection.
雾的存在给烟雾检测带来了很大的困难,不仅因为它看起来跟烟相似,导致误判率变高,而且雾会影响到终端监控的照片质量,让特征提取变得更加困难。为了获得更具鉴别能力的特征,实现实时分类。本文将一种特征级和决策级的融合分类检测模块融入YOLOv5,可以使网络更具鉴别烟和雾的能力,降低误判率。融合分类检测模块如图4所示,特征融合部分通过类似与特征金字塔网络(FPN)结构的特征级融合,获得了三组更具鉴别能力的特征,包括烟雾的详细边缘纹理信息和高级语义信息,以提高烟雾与相似对象之间的鉴别能力。The existence of fog brings great difficulties to smoke detection, not only because it looks similar to smoke, resulting in a higher false positive rate, but also the fog will affect the quality of photos monitored by the terminal, making feature extraction more difficult. To obtain more discriminative features, real-time classification is achieved. This paper integrates a feature-level and decision-level fusion classification and detection module into YOLOv5, which can make the network more capable of distinguishing smoke and fog and reduce the false positive rate. The fusion classification and detection module is shown in Figure 4. The feature fusion part obtains three sets of more discriminative features through feature-level fusion similar to the Feature Pyramid Network (FPN) structure, including detailed edge texture information and high-level semantic information of smoke. , to improve the discrimination between smoke and similar objects.
在卷积层、dropout层和全局池化层三组分类层的基础上,进行决策层融合。这个模块有三个输入一个输出,本文将YOLOv5的第二、三、四个Conv模块作为输入,将输出作为SPP模块的输入;前半部分是特征融合,将不同尺度卷积层信息单独取出,即加强了对不同尺度目标的检测,也可以加强对烟这种分布不均匀、边界轮廓模糊目标的检测,提取的三种不同尺度特征输入后面的决策融合模块,这个模块通过由卷积层、dropout层和全局池化层组成的分类器加权融合,由于这三种尺度的特征包含不同的目标信息,在分类中具有不同的重要性。加了融合分类检测模块后的YOLOv5网络如图5。Based on the three groups of classification layers, the convolution layer, the dropout layer and the global pooling layer, the decision layer fusion is carried out. This module has three inputs and one output. In this paper, the second, third, and fourth Conv modules of YOLOv5 are used as input, and the output is used as the input of the SPP module; the first half is feature fusion, and the information of different scales of convolutional layers is taken out separately, that is, strengthening In order to detect targets of different scales, the detection of targets with uneven distribution and blurred boundary contours such as smoke can also be strengthened. The extracted three different scale features are input into the decision fusion module behind. This module passes through the convolution layer and dropout layer. And the weighted fusion of the classifier composed of the global pooling layer, because the features of these three scales contain different target information, they have different importance in classification. The YOLOv5 network after adding the fusion classification detection module is shown in Figure 5.
以上所述,仅为本申请较佳的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited to this. Substitutions should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210049405.9A CN114399734A (en) | 2022-01-17 | 2022-01-17 | Forest fire early warning method based on visual information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210049405.9A CN114399734A (en) | 2022-01-17 | 2022-01-17 | Forest fire early warning method based on visual information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114399734A true CN114399734A (en) | 2022-04-26 |
Family
ID=81230243
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210049405.9A Pending CN114399734A (en) | 2022-01-17 | 2022-01-17 | Forest fire early warning method based on visual information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114399734A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114998801A (en) * | 2022-06-09 | 2022-09-02 | 北京林业大学 | Forest fire smoke video detection method based on contrastive self-supervised learning network |
CN115273017A (en) * | 2022-04-29 | 2022-11-01 | 桂林电子科技大学 | Traffic sign detection recognition model training method and system based on Yolov5 |
CN116106473A (en) * | 2023-02-13 | 2023-05-12 | 广东烟草惠州市有限责任公司 | Binocular vision sensing tobacco smoldering monitoring method |
CN117197978A (en) * | 2023-04-21 | 2023-12-08 | 中国消防救援学院 | Forest fire monitoring and early warning system based on deep learning |
CN117253031A (en) * | 2023-11-16 | 2023-12-19 | 应急管理部天津消防研究所 | Forest fire monitoring method based on multi-element composite deep learning |
CN117876874A (en) * | 2024-01-15 | 2024-04-12 | 西南交通大学 | Forest fire detection and positioning method and system based on high-point monitoring video |
CN118230202A (en) * | 2024-05-24 | 2024-06-21 | 江西啄木蜂科技有限公司 | Forest fire detection method based on deep learning |
CN118918539A (en) * | 2024-10-14 | 2024-11-08 | 山东索迈信息科技有限公司 | Fire environment detection method and system based on image data |
EP4465251A1 (en) * | 2023-05-15 | 2024-11-20 | Neuralbit Technologies sp. z o. o. | An edge device, system and method for wildfire detection based on image data gathering |
-
2022
- 2022-01-17 CN CN202210049405.9A patent/CN114399734A/en active Pending
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115273017A (en) * | 2022-04-29 | 2022-11-01 | 桂林电子科技大学 | Traffic sign detection recognition model training method and system based on Yolov5 |
CN114998801A (en) * | 2022-06-09 | 2022-09-02 | 北京林业大学 | Forest fire smoke video detection method based on contrastive self-supervised learning network |
CN116106473A (en) * | 2023-02-13 | 2023-05-12 | 广东烟草惠州市有限责任公司 | Binocular vision sensing tobacco smoldering monitoring method |
CN116106473B (en) * | 2023-02-13 | 2024-12-27 | 广东烟草惠州市有限责任公司 | Binocular vision sensing tobacco smoldering monitoring method |
CN117197978A (en) * | 2023-04-21 | 2023-12-08 | 中国消防救援学院 | Forest fire monitoring and early warning system based on deep learning |
EP4465251A1 (en) * | 2023-05-15 | 2024-11-20 | Neuralbit Technologies sp. z o. o. | An edge device, system and method for wildfire detection based on image data gathering |
CN117253031A (en) * | 2023-11-16 | 2023-12-19 | 应急管理部天津消防研究所 | Forest fire monitoring method based on multi-element composite deep learning |
CN117253031B (en) * | 2023-11-16 | 2024-01-30 | 应急管理部天津消防研究所 | A forest fire monitoring method based on multivariate composite deep learning |
CN117876874A (en) * | 2024-01-15 | 2024-04-12 | 西南交通大学 | Forest fire detection and positioning method and system based on high-point monitoring video |
CN117876874B (en) * | 2024-01-15 | 2024-09-06 | 西南交通大学 | Forest fire detection and positioning method and system based on high-point monitoring video |
CN118230202B (en) * | 2024-05-24 | 2024-08-06 | 江西啄木蜂科技有限公司 | Forest fire detection method based on deep learning |
CN118230202A (en) * | 2024-05-24 | 2024-06-21 | 江西啄木蜂科技有限公司 | Forest fire detection method based on deep learning |
CN118918539A (en) * | 2024-10-14 | 2024-11-08 | 山东索迈信息科技有限公司 | Fire environment detection method and system based on image data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114399734A (en) | Forest fire early warning method based on visual information | |
WO2021142902A1 (en) | Danet-based unmanned aerial vehicle coastline floating garbage inspection system | |
CN113065558A (en) | Lightweight small target detection method combined with attention mechanism | |
CN110688925A (en) | Cascade target identification method and system based on deep learning | |
Zhang et al. | MMFNet: Forest fire smoke detection using multiscale convergence coordinated pyramid network with mixed attention and fast-robust NMS | |
CN111582074A (en) | Monitoring video leaf occlusion detection method based on scene depth information perception | |
Qiang et al. | Forest fire smoke detection under complex backgrounds using TRPCA and TSVB | |
CN114821484B (en) | Airport runway FOD image detection method, system and storage medium | |
CN116416576A (en) | Smoke/flame double-light visual detection method based on V3-YOLOX | |
CN113569981A (en) | A power inspection bird's nest detection method based on single-stage target detection network | |
CN115240089A (en) | A vehicle detection method for aerial remote sensing images | |
CN115115713A (en) | Unified space-time fusion all-around aerial view perception method | |
CN115147745A (en) | Small target detection method based on urban unmanned aerial vehicle image | |
CN115880765A (en) | Method and device for detecting abnormal behavior of regional intrusion and computer equipment | |
Hussain et al. | Uav-based multi-scale features fusion attention for fire detection in smart city ecosystems | |
CN107330441A (en) | Flame image foreground extraction algorithm | |
CN114463624A (en) | A method and device for detecting illegal buildings applied to urban management and supervision | |
CN116665015B (en) | A method for detecting weak and small targets in infrared sequence images based on YOLOv5 | |
CN116682057A (en) | Substation potential safety hazard detection method based on window self-attention mechanism | |
CN117173631A (en) | Method and system for monitoring biodiversity | |
CN111160255B (en) | Fishing behavior identification method and system based on three-dimensional convolution network | |
CN115690577A (en) | Unmanned aerial vehicle for animal and plant identification and working method thereof | |
CN114359705A (en) | Geological disaster monitoring method and device | |
CN113516069A (en) | Road mark real-time detection method and device based on size robustness | |
CN118840687B (en) | Abnormal behavior detection algorithm based on deep learning |
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 |