A Fire Detection Method for Distribution Lines Based on the YoloV5 Network Model
Through the distribution line fire detection method based on the YoloV5 network model, the problems of insufficient timeline patrol and weak generalization capabilities of neural network models in the prior art are solved, and efficient and accurate fire risk detection and early warning are achieved.
Patent Information
- Application Number
- CN202211431066.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-11-15
AI Technical Summary
In the existing distribution line fire detection technology, the timeliness of manual line patrols to obtain information is insufficient, and the existing neural network model has weak generalization ability, insufficient operating speed and recognition accuracy, which is easy to cause misjudgment.
The distribution line fire detection method based on the YoloV5 network model is adopted. By collecting on-site images, rectangular boxes are marked, and the image collection is divided into training sets and test sets. The YoloV5 network model is built for iterative training, and the lines, equipment and flame detection boxes are obtained. The proportional distance calculation method is used to obtain the actual distance between the flame and the lines and equipment, and the fire risk level is divided.
It improves the efficiency of obtaining fire risk information on distribution lines, enhances the identification accuracy and operating speed of the model, reduces labor costs, and replaces traditional manual line patrols.
Smart Images

Figure CN115761489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and mainly relates to a method for detecting fires on distribution lines based on the YoloV5 network model. Background Art
[0002] In the existing distribution line fault detection technologies, manual line inspection is mostly adopted, that is, the line inspection personnel use their eyes and related tools and instruments to inspect the lines. When a fire occurs on the distribution line, the timeliness of obtaining information by manual inspection is insufficient, and the impact is relatively large. It is an urgent problem to detect the distance between the flame and the equipment, and between the flame and the line through artificial intelligence and divide the risk level.
[0003] CN111223265B "Fire Detection Method, Device, Equipment and Storage Medium Based on Neural Network" discloses "a fire detection method, device, equipment and storage medium based on neural network. The method includes the following steps: obtaining the incident light signals of multiple training light sources; performing signal processing and analysis on the incident light signals of each training light source to obtain the spectral signal parameters, time signal parameters and space signal parameters of each training light source; establishing a training data set according to the spectral signal parameters, time signal parameters and space signal parameters of the training light source, and constructing a neural network model for fire detection according to the training data set; determining the output parameters of the light source at the site to be detected according to the neural network model, and determining whether a fire occurs at the site to be detected according to the output parameters. The fire detection method of the embodiment of the present invention optimizes the neural network model through the characteristic parameters of the training light source, and uses the neural network model for fire recognition. The recognition algorithm is simple, the data processing volume is small, the response speed of fire detection is fast, and the accuracy is high". This invention provides a fire detection method, device, equipment and storage medium based on neural network, but this neural network is just a simple three-layer network for image binary classification. Due to the simple structure of the neural network, its generalization ability is weak, and the running speed and recognition accuracy of this network model are insufficient. It is easy to produce false judgments when encountering light sources of the same intensity, and the obtained information is not accurate enough. Summary of the Invention
[0004] Based on the above technical problems, the technical solution provided by the present invention is: a method for detecting fires on distribution lines based on the YoloV5 network model, and the specific steps are as follows:
[0005] Collect on-site images in the fire state of the distribution line, perform rectangular box annotation on the lines, equipment and flames in the on-site images, and divide the set of annotated on-site images into a training set and a test set according to a ratio;
[0006] Build the YoloV5 network model, input the training set into the YoloV5 network model for iterative training. After N iterations of training, obtain the trained YoloV5 network model, and input the test set into the YoloV5 network model to test its performance;
[0007] Input the target on-site image to be detected into the trained YoloV5 network model to obtain line, equipment, and flame detection frames; obtain risk division criteria based on the line, equipment, and flame detection frames. The risk division criteria include the actual distances between the flame and the line, and the flame and the equipment obtained by the proportional distance calculation method; divide the fire risk level of the target site according to the risk division criteria.
[0008] Preferably, the detection method further includes: after inputting the test set into the YoloV5 network model to test its performance, determine whether the performance of the YoloV5 network model can reach the expected target detection result. If not, perform an improvement on the YoloV5 network model to lightweight the network with the goal of accelerating the model recognition speed, and replace the convolutional layers of the YoloV5 network model with the goal of improving the model recognition accuracy. After the replacement is completed, continue training until the iteration terminates when the model converges.
[0009] Preferably, the improvement on the YoloV5 network model to lightweight the network with the goal of accelerating the model recognition speed is specifically as follows:
[0010] Reduce the number of C3 module structures in the YoloV5 network model, reduce the number of channels in each convolutional layer. Change the number of C3 modules in the fourth layer of the backbone network from 6 to 3, the number of C3 modules in the sixth layer from 9 to 3, the output channels of the conv convolutional layer in the seventh layer from 1024 to 512, the output channels of the C3 module in the eighth layer from 1024 to 512, and modify the number of channels in the remaining convolutional layers to half of the original.
[0011] Preferably, the replacement of the convolutional layers of the YoloV5 network model with the goal of improving the model recognition accuracy is specifically as follows:
[0012] Replace the stride-2 convolution of the YOLOv5 network model with SPD-Conv, that is, replace the convolutional layer with a stride of 2 with a network structure composed of a combination of SPD and C2 modules. After the SPD feature transformation layer, add a non-strided convolutional layer with a C2 module filter.
[0013] Preferably, the obtaining of the actual distances between the flame and the line, and the flame and the equipment by the proportional distance calculation method is specifically as follows:
[0014] In the pixel coordinate system of the detected image to be detected, read the upper left corner coordinates (X Fj1 ,Y Fj1) and the lower right corner coordinates (X Fj2 , Y Fj2 ); Calculate the center coordinates of the flame tip (X Fj3 , Y Fj3 ):
[0015] X Fj3 = 0.5 * (X Fj1 + X Fj2 ); Y Fj3 = Y Fj1 ;
[0016] Read the upper left corner coordinates (X Lj1 , Y Lj1 ), (X ij1 , Y ij1 ) and the lower right corner coordinates (X Lj2 , Y Lj2 ), (X ij2 , Y ij2 ) of the line and equipment detection frames in the image to be detected; Calculate the geometric center coordinates of the line (X Lj3 , Y Lj3 ):
[0017] X Lj3 = 0.5 * (X Lj1 + X Lj2 ); Y Lj3 = 0.5 * (Y Lj1 + Y Lj2 );
[0018] Calculate the geometric center coordinates of the equipment (X ij3 , Y ij3 ):
[0019] X ij3 = 0.5 * (X ij1 + X ij2 ); Y ij3 = 0.5 * (Y ij1 + Y ij2 );
[0020] Among them, i represents different devices, and j represents the number of lines, devices, and flames in the image;
[0021] Calculate the vertical pixel distance D from the flame to the line n :
[0022] D n = Y Lj3 - Y Fj3 ;
[0023] Calculate the Euclidean pixel distance D from the flame to the device m :
[0024]
[0025] Obtain the actual height H of the line / equipment z , calculate the pixel height of the line / equipment; calculate the actual distance D between the flame and the line and equipment L , D i :
[0026]
[0027] In the formula, H L is the pixel height of the line, and H i is the pixel height of the equipment
[0028] Preferably, the risk level is divided according to the actual distance between the flame and the line and the actual distance between the flame and the equipment. Specifically:
[0029] Judge whether the flame directly burns the line or equipment. When the top of the flame exceeds the geometric center height of the line or equipment, it is direct combustion. When the flame directly burns, the result "direct combustion" is output. When it is lower than the geometric center height, it is indirect combustion, and the risk level of indirect combustion is divided;
[0030] When the actual distance between the flame and the line / equipment is less than the line / equipment actual height, it is classified as high risk;
[0031] When the actual distance between the flame and the line / equipment is between the line / equipment actual height and actual height, it is classified as medium risk;
[0032] When the actual distance between the flame and the line / equipment is greater than the line / equipment actual height, it is classified as low risk
[0033] Preferably, when training the YoloV5 network model, the model hyperparameter multi-scale value is True, img-size is 800, and the optimization function is set to Adam
[0034] The present invention also provides a distribution line fire detection system based on the YoloV5 network model. The distribution line fire detection system includes a data acquisition module, a data processing module, and a communication module, where:
[0035] The data acquisition module is electrically connected to the communication module and the data processing module. It collects on-site images in the fire state of the distribution line through the communication module, makes rectangular frame annotations on the lines, equipment, and flames in the on-site images, and divides the set of annotated on-site images into a training set and a test set according to a ratio and transmits them to the data processing module;
[0036] The data processing module is built with a YoloV5 network model, which is trained and tested by inputting a training set and a test set. The target on-site image to be detected is input into the trained YoloV5 network model to obtain line, equipment, and flame detection frames. Based on the line, equipment, and flame detection frames, risk division criteria are obtained. The data processing module also presets a proportional distance calculation method. The risk division criteria include the actual distances between the flame and the line, and the flame and the equipment obtained by the proportional distance calculation method. The data processing module divides the fire risk level of the target site according to the risk division criteria and outputs the final risk level judgment result.
[0037] Among them, after inputting the test set into the YoloV5 network model to test its performance, it is judged whether the performance of the YoloV5 network model can reach the expected target detection result. If not, the YoloV5 network model is improved for network lightweighting with the goal of accelerating the model recognition speed. Specifically, the number of C3 module structures in the YoloV5 network model is reduced, the number of channels in each convolutional layer is reduced. The number of C3 modules in the fourth layer of the backbone network is changed from 6 to 3, the number of C3 modules in the sixth layer is changed from 9 to 3, the output channels of the conv convolutional layer in the seventh layer are changed from 1024 to 512, the output channels of the C3 module in the eighth layer are changed from 1024 to 512, and the number of channels in the remaining convolutional layers is modified to half of the original.
[0038] The convolutional layer of the YoloV5 network model is replaced with the goal of improving the model recognition accuracy. Specifically, the stride-2 convolution of the YOLOv5 network model is replaced with SPD-Conv, that is, the convolutional layer with a stride of 2 is replaced with a network structure composed of a combination of SPD and C2 modules. After the SPD feature transformation layer, a non-strided convolutional layer with a C2 module filter is added.
[0039] After the replacement, continue training until the iteration terminates when the model converges.
[0040] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements a method for detecting distribution line fires based on the YoloV5 network model according to any embodiment of the present invention.
[0041] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements a method for detecting distribution line fires based on the YoloV5 network model according to any embodiment of the present invention.
[0042] Compared with the prior art, the beneficial effects of the present invention are:
[0043] 1. The present invention provides a method for detecting fires in distribution lines based on the YoloV5 network model. By obtaining object detection based on the YoloV5 network model and applying the algorithm to the early identification and warning of distribution line faults, the actual distance between the flame and the line / equipment is obtained using the proportional distance calculation method, and risk division is carried out based on the actual distance, improving the acquisition efficiency of risk information of distribution lines during a fire.
[0044] 2. The present invention provides a method for detecting fires in distribution lines based on the YoloV5 network model. By improving the network lightweighting of the YoloV5 network and replacing convolutional layers, the running speed and recognition accuracy of the model are improved.
[0045] 3. The present invention provides a method for detecting fires in distribution lines based on the YoloV5 network model. By using artificial intelligence image processing to replace traditional manual line patrol, the acquisition efficiency of fault information is improved and the labor cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is the flowchart of the method in the embodiment of the present invention;
[0047] Figure 2 is the flowchart of the proportional distance calculation method in the embodiment of the present invention;
[0048] Figure 3 is the flowchart of risk division in the embodiment of the present invention;
[0049] Figure 4 is the original network of the YoloV5 network model in the embodiment of the present invention;
[0050] Figure 5 is the YoloV5 replacement convolutional layer network model in the embodiment of the present invention;
[0051] Figure 6 is the YoloV5 network lightweight model in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0053] Embodiment 1
[0054] Embodiment 1 of the present invention discloses a method for detecting fires in distribution lines based on the YoloV5 network model. Before the Yolo network model was proposed, the target detection research field mainly focused on two-stage algorithms led by Faster-RCNN. The two-stage algorithms need to separate the extraction of candidate regions from the final network classification and regression into two independent parts, resulting in slower speed but relatively higher detection accuracy. While the one-stage algorithm only needs to send the input image into the network once to obtain the positions and category information of all prediction boxes. It has lower accuracy compared to the two-stage algorithm, but the network runs faster and occupies less memory, making it very suitable for mobile devices and environments with relatively simple hardware configurations. The Yolo series of network models are the most classic one-stage algorithms and are also the most widely used target detection networks in the industrial field. The present invention uses YoloV5 for target detection, making the detection results have better detection accuracy and faster inference speed, as Figure 1 shown, and specifically includes the following steps:
[0055] S1. Collect on-site images of the distribution line in a fire state, perform rectangular box annotation on the lines, equipment, and flames in the images, and divide the set of annotated on-site images into a training set and a test set according to a ratio;
[0056] Specifically, the collected on-site images are all visible light images, and the images include lines, equipment, and flames. The equipment also includes electric poles, pole-mounted switches, and lead cross-arms. Perform rectangular box annotation on the lines, equipment, and flames in the images. There are 5 recognition objects during annotation, namely: "pole" is an electric pole, "switch" is a pole-mounted switch, "fire" is a flame, "arm" is a lead cross-arm, and "line" is a line; divide the set of annotated on-site images into a training set and a test set according to a ratio of 8:2.
[0057] S2. Construct a YoloV5 network model;
[0058] As Figure 4 shown, the Backbone structure of the YoloV5 network model includes 1 Conv module in the first layer, 3 C3 modules in the second layer, 1 Conv module in the third layer, 6 C3 modules in the fourth layer, 1 Conv module in the fifth layer, 9 C3 modules in the sixth layer, 1 Conv module in the seventh layer, and 3 C3 modules in the eighth layer;
[0059] Preferably, when training the YoloV5 network model, the model hyperparameter multi-scale value is True, img-size is 800, and the optimization function is set to Adam.
[0060] S3. Input the training set into the YoloV5 network model for iterative training. After N iterations of training, obtain the trained YoloV5 network model, and input the test set into the YoloV5 network model to test its performance;
[0061] Preferably, after N iterations of training, input the test set into the YoloV5 network model for performance testing to determine whether the model performance can reach the expected target detection result. If not, improve the network lightweighting of the YoloV5 network model with the goal of accelerating the model recognition speed, and replace the convolutional layers of the YoloV5 network model with the goal of improving the model recognition accuracy. After the replacement, continue training until the iteration terminates when the model converges;
[0062] Among them, the improvement of network lightweighting of the YoloV5 network model with the goal of accelerating the model recognition speed is specifically as follows:
[0063] Reduce the number of C3 structures in the YoloV5 network model, reduce the number of channels in each convolutional layer. Change the number of C3 in the 4th layer of the backbone network from 6 to 3, the number of C3 in the 6th layer from 9 to 3, the output channels of the 7th layer conv convolutional layer from 1024 to 512, the output channels of the 8th layer C3 from 1024 to 512, and modify the number of channels in the remaining convolutional layers to half of the original. The YoloV5 network model after network lightweighting is as Figure 5 shown;
[0064] The replacement of the convolutional layers of the YoloV5 network model with the goal of improving the model recognition accuracy is specifically as follows:
[0065] Replace the stride-2 convolution of the YOLOv5 network model with SPD-Conv, that is, replace the convolutional layer with a stride of 2 with a network structure composed of a combination of SPD and C2. After the SPD feature transformation layer, add a non-strided convolutional layer with a C2 filter. The YoloV5 network model after replacing the convolutional layer is as Figure 6 shown;
[0066] S4. Input the on-site image to be detected into the YoloV5 network model to obtain line, equipment, and flame detection frames; obtain the actual distances between the flame and the line, and the flame and the equipment through the proportional distance calculation method, and divide the risk levels based on the actual distances;
[0067] Among them, the obtaining of the actual distances between the flame and the line, and the flame and the equipment through the proportional distance calculation method is specifically as follows:
[0068] A1. In the pixel coordinate system of the detected image to be detected, read the upper left coordinate (X Fj1 , Y Fj1 ) and the lower right coordinate (XFj2 , Y Fj2 ), read the upper left corner coordinates (X pj1 , Y pj1 ) and the lower right corner coordinates (X pj2 , Y pj2 ) of the pole detection frame, read the upper left corner coordinates (X Aj1 , Y Aj1 ) and the lower right corner coordinates (X Aj2 , Y Aj2 ) of the lead cross-arm detection frame, read the upper left corner coordinates (X sj1 , Y sj1 ) and the lower right corner coordinates (X sj2 , Y sj2 ) of the pole-mounted switch detection frame, read the upper left corner coordinates (X Lj1 , Y Lj1 ) and the lower right corner coordinates (X Lj2 , Y Lj2 ) of the line recognition frame;
[0069] A2. Estimate the actual distances between the flame and the equipment, and between the flame and the line based on the pixel height from the equipment, line to the flame. The specific steps include:
[0070] Calculate the center coordinates (X Fj3 , Y Fj3 ) of the flame top:
[0071] X Fj3 = 0.5 * (X Fj1 + X Fj2 ); Y Fj3 = Y Fj1 ;
[0072] Calculate the geometric center coordinates (X pj3 , Y pj3 ), (X Aj3 , Y Aj3 ), (X sj3 , Y sj3 ) of the pole, lead cross-arm, and pole-mounted switch:
[0073] X pj3 = 0.5 * (X pj1 + X pj2 ); Y p3 = 0.5 * (Y pj1 + Y pj2 );
[0074] X Aj3 = 0.5 * (X Aj1 + X Aj2 ); Y A3 = 0.5 * (Y Aj1 + Y Aj2 );
[0075] X sj3 = 0.5 * (X sj1 + X sj2 ); Y s3 = 0.5 * (Y sj1 + Y sj2 );
[0076] Calculate the geometric center coordinates of the line:
[0077] X Lj3 = 0.5 * (X Lj1 + X Lj2 ); Y Lj3 = 0.5 * (Y Lj1 + Y Lj2 );
[0078] Calculate the vertical distance D from the top of the flame to the line pixels n :
[0079] D n = Y Lj3 - Y Fj3 ;
[0080] The Euclidean distance D from the flame to the geometric center of the switch on the pole m1 :
[0081]
[0082] The Euclidean distance D from the flame to the geometric center of the pole m2 :
[0083]
[0084] The Euclidean distance D from the flame to the geometric center of the lead cross-arm m3 :
[0085]
[0086] When there are multiple flames, multiple devices or multiple lines in the image, classify them according to their respective annotations to form an array. Each time, select one item from each data in each array and traverse to calculate the distance between each data in the two groups. For example, when calculating the Euclidean distance from the flame to the geometric center of the switch on the pole, select the data (X F13 , Y F13 ) in the flame array and the data (X s13 , Y s13 ) in the switch-on-pole array, substitute them into the formula to calculate D m31 , select the data (X F23 , Y F23 ) in the flame array and the data (X s23 , Ys23 ) and substitute it into the formula to calculate D m32 ... Calculate all the distances in the array in sequence, put each distance into the array "Distance", and output the minimum value in this array as the Euclidean distance between the flame and the device in the image. Similarly, obtain the vertical distance between the flame and the line.
[0087] A3. Obtain the actual height H of the line / device z , calculate the pixel height H of the line / device L / H i ; Calculate and obtain the actual distances D L and D i :
[0088]
[0089] Wherein, i represents different devices: when i represents a utility pole, the actual distance between the flame and the utility pole obtained is specifically:
[0090] Obtain the actual height of the utility pole. When the height is not clear, estimate it according to the classic height of 12m. At this time, the number of pixels in the image is equivalent to the actual height, that is, H z = 12m. Taking the number of pixels as the height reference, the actual distance D p between the utility pole and the flame pixels is:
[0091]
[0092] And represent this distance with a red straight line on the image.
[0093] The risk levels are divided according to the actual distances between the flame and the line, and between the flame and the device, specifically:
[0094] Judge whether the flame directly burns the line or the device. When the top of the flame exceeds the geometric center height of the line or the device, it is direct burning. When the flame directly burns, output the result "direct burning". When it is lower than the geometric center height, it is indirect burning, and the risk level of indirect burning is divided:
[0095] When the actual distance between the flame and the line / device is less than the actual height of the line / device, it is classified as a high risk;
[0096] When the actual distance between the flame and the line / device is between the actual height of the line / device and the actual height of the line / device, it is classified as a medium risk;
[0097] When the actual distance between the flame and the line / device is greater than the actual height of the line / device, it is classified as a low risk.
[0098] Embodiment 2
[0099] The present invention provides a distribution line fire detection system based on the YoloV5 network model. The distribution line fire detection system includes a data acquisition module, a data processing module, and a communication module, where:
[0100] The data acquisition module is electrically connected to the communication module and the processing module. It collects on-site images in the event of a distribution line fire through the communication module, annotates rectangles for the lines, equipment, and flames in the on-site images, and divides the set of annotated on-site images into a training set and a test set according to a ratio and transmits them to the data processing module;
[0101] The data processing module builds a YoloV5 network model, trains and tests by inputting the training set and the test set, inputs the target on-site image to be detected into the trained YoloV5 network model to obtain detection frames for lines, equipment, and flames; obtains risk division criteria based on the detection frames for lines, equipment, and flames. The data processing module also presets a proportional distance calculation method. The risk division criteria include the actual distances between the flame and the line, and the flame and the equipment obtained through the proportional distance calculation method; the data processing module divides the fire risk level of the target on-site and outputs the final risk level judgment result according to the risk division criteria;
[0102] Among them, after inputting the test set into the YoloV5 network model to test the performance, it is judged whether the performance of the YoloV5 network model can reach the expected target detection result. If not, the YoloV5 network model is improved for network lightweighting with the goal of accelerating the model recognition speed. Specifically, the number of C3 module structures in the YoloV5 network model is reduced, the number of channels in each convolutional layer is reduced. The number of C3 modules in the fourth layer of the backbone network is changed from 6 to 3, the number of C3 modules in the sixth layer is changed from 9 to 3, the output channels of the conv convolutional layer in the seventh layer are changed from 1024 to 512, the output channels of the C3 module in the eighth layer are changed from 1024 to 512, and the number of channels in the remaining convolutional layers is changed to half of the original;
[0103] The convolutional layer of the YoloV5 network model is replaced with the goal of improving the model recognition accuracy. Specifically, the stride-2 convolution of the YOLOv5 network model is replaced with SPD-Conv, that is, the convolutional layer with a stride of 2 is replaced with a network structure composed of a combination of SPD and C2 modules. After the SPD feature transformation layer, a non-strided convolutional layer with a C2 module filter is added;
[0104] After the replacement, continue training until the iteration terminates when the model converges.
[0105] Embodiment III
[0106] The present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements a power distribution line fire detection method based on the YoloV5 network model as described in any embodiment of the present invention.
[0107] Embodiment 4
[0108] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements a power distribution line fire detection method based on the YoloV5 network model as described in any embodiment of the present invention.
[0109] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for detecting fires in distribution lines based on the YoloV5 network model, characterized in that, the specific steps are as follows: Collect on-site images of the distribution line in a fire state, annotate rectangles for the lines, equipment, and flames in the on-site images, and divide the set of annotated on-site images into a training set and a test set according to a ratio; Construct a YoloV5 network model, input the training set into the YoloV5 network model for iterative training, obtain the trained YoloV5 network model after N times of iterative training, and input the test set into the YoloV5 network model to test its performance; Input the target on-site image to be detected into the trained YoloV5 network model to obtain detection frames for lines, equipment, and flames; obtain risk division criteria based on the detection frames for lines, equipment, and flames. The risk division criteria include the actual distances between the flame and the line, and the flame and the equipment obtained by the proportional distance calculation method; Divide the fire risk level of the target on-site according to the risk division criteria The detection method further includes: after inputting the test set into the YoloV5 network model to test its performance, determine whether the performance of the YoloV5 network model can reach the expected target detection result. If not, improve the network lightweighting of the YoloV5 network model with the goal of accelerating the model recognition speed. Specifically, reduce the number of C3 module structures in the YoloV5 network model, reduce the number of channels in each convolutional layer, change the number of C3 modules in the 4th layer of the backbone network from 6 to 3, the number of C3 modules in the 6th layer from 9 to 3, change the output channels of the 7th layer conv convolutional layer from 1024 to 512, change the output channels of the 8th layer C3 module from 1024 to 512, and change the number of channels in the remaining convolutional layers to half of the original; Replace the convolutional layers of the YoloV5 network model with the goal of improving the model recognition accuracy. Specifically, replace the stride-2 convolution of the YOLOv5 network model with SPD-Conv, that is, replace the convolutional layer with a stride of 2 with a network structure composed of a combination of SPD and C2 modules. After the SPD feature transformation layer, add a non-strided convolutional layer with a C2 module filter; Continue training after replacement until the iteration terminates when the model converges.
2. A method for detecting fires in distribution lines based on the YoloV5 network model according to claim 1, characterized in that, the specific method for obtaining the actual distances between the flame and the line, and the flame and the equipment by the proportional distance calculation method is: In the pixel coordinate system of the image to be detected after the detection is completed, read the upper left corner coordinates (X Fj1 , Y Fj1 ) and the lower right corner coordinates (X Fj2 , Y Fj2 ) of the flame detection box; calculate the center coordinates of the flame top (X Fj3 , Y Fj3 ): X Fj3 = 0.5 * (X Fj1 + X Fj2 )); Y Fj3 = Y Fj1 ; Read the upper left coordinates (X Lj1 , Y Lj1 ), (X ij1 , Y ij1 ) and the lower right coordinates (X Lj2 , Y Lj2 ), (X ij2 , Y ij2 ) of the lines and equipment detection frames in the image to be detected; calculate the geometric center coordinates (X Lj3 , Y Lj3 ) of the lines: X Lj3 = 0.5 * (X Lj1 + X Lj2 )); Y Lj3 = 0.5 * (Y Lj1 + Y Lj2 )); Calculate the geometric center coordinates (X ij3 , Y ij3 ) of the computing device: X ij3 = 0.5 * (X ij1 + X ij2 )); Y ij3 = 0.5 * (Y ij1 + Y ij2 )); where i represents different equipment, and j represents the number of lines, equipment, and flames appearing in the image; Calculate the pixel vertical distance D from the flame to the line n : D n = Y Lj3 -Y Fj3 ; Calculate the Euclidean distance D from the flame to the device pixel m : Obtain the actual height H of the line / device z , calculate the pixel height of the line / device; calculate the actual distance D between the flame and the line / device L 、D i : where H L is the line pixel height, and H i is the device pixel height.
3. A method for detecting fires in distribution lines based on the YoloV5 network model according to claim 2, characterized in that , divide the risk level according to the actual distances between the flame and the line, and the flame and the equipment. Specifically: Judge whether the flame directly burns the line or the equipment. When the top of the flame exceeds the geometric center height of the line or the equipment, it is considered direct combustion. When the flame directly burns, output the result "direct combustion". When it is lower than the geometric center height, it is indirect combustion, and the risk level of indirect combustion is divided; When the actual distance between the flame and the line / equipment is less than the actual height of the line / equipment it is classified as a high risk; When the actual distance between the flame and the line / equipment is between the actual height of the line / equipment and the actual height, it is classified as a medium risk; the actual height. When the actual distance between the flame and the line / equipment is greater than the actual height of the line / equipment, it is classified as a low risk. 4. A method for detecting fire in a distribution line based on the YoloV5 network model according to claim 1, characterized in that, when training the YoloV5 network model, the model hyperparameter multi-scale value is True, img-size is 800, and the optimization function is set to Adam.
5. A system for detecting fire in a distribution line based on the YoloV5 network model, characterized in that, the distribution line fire detection system includes a data acquisition module, a data processing module, and a communication module, where: the data acquisition module is electrically connected to the communication module and the data processing module, collects on-site images in the fire state of the distribution line through the communication module, performs rectangular box annotation on the lines, equipment, and flames in the on-site images, and divides the set of annotated on-site images into a training set and a test set according to a ratio and transmits them to the data processing module; the data processing module builds a YoloV5 network model, trains and tests by inputting the training set and the test set, inputs the target on-site image to be detected into the trained YoloV5 network model to obtain detection frames for lines, equipment, and flames; obtains risk division criteria based on the detection frames for lines, equipment, and flames, and the data processing module also presets a proportional distance calculation method, and the risk division criteria include the actual distances between the flame and the line, and the flame and the equipment obtained by the proportional distance calculation method; the data processing module divides the fire risk level of the target on-site into output the final risk level judgment result; wherein, after inputting the test set into the YoloV5 network model to test the performance, it is judged whether the performance of the YoloV5 network model can reach the expected target detection result. If not, the YoloV5 network model is improved for network lightweighting with the goal of accelerating the model recognition speed. Specifically, the number of C3 module structures in the YoloV5 network model is reduced, the number of channels in each convolutional layer is reduced, the number of C3 modules in the 4th layer of the backbone network is changed from 6 to 3, the number of C3 modules in the 6th layer is changed from 9 to 3, the output channels of the 7th layer conv convolutional layer are changed from 1024 to 512, the output channels of the 8th layer C3 module are changed from 1024 to 512, and the number of channels in the remaining convolutional layers is changed to half of the original; replace the convolutional layer of the YoloV5 network model with the goal of improving the model recognition accuracy. Specifically, replace the stride-2 convolution of the YOLOv5 network model with SPD-Conv, that is, replace the convolutional layer with a stride of 2 with a network structure composed of a combination of SPD and C2 modules. After the SPD feature transformation layer, add a non-strided convolutional layer with a C2 module filter; After the replacement, continue training until the iteration terminates when the model converges.
6. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the program, it implements a method for detecting fire in a distribution line based on the YoloV5 network model according to any one of claims 1 to 4.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, it implements a power distribution line fire detection method based on the YoloV5 network model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Neural network-based fire detection methods, devices, equipment, and storage media
CN111223265B
Image classification method based on lightweight residual network
CN113807363A
Improved YOLOv5L + DeepSort-based real-time detection method for fire disaster of marine engine room.
CN113962282A