TX2 equipment-based hydrophobicity classification method for electric power composite insulator

文档序号:137185 发布日期:2021-10-22 浏览:8次 中文

阅读说明:本技术 一种基于tx2设备的电力复合绝缘子憎水性分类方法 (TX2 equipment-based hydrophobicity classification method for electric power composite insulator ) 是由 刘亮 邓名高 张明 张海涛 于 2021-08-01 设计创作,主要内容包括:本发明公开了一种基于TX2设备的电力复合绝缘子憎水性分类方法,包括图像采集,数据集存储,构建训练模型,数据增强,模型转换,数据传输,模型推理和模型移植等步骤。本发明提出了一种电力复合绝缘子憎水性分类方法,解决了实际场景中计算资源不能大规模部署的问题,实现了不同天气、不同地形条件下边缘侧的复合绝缘子憎水性图像实时分类。(The invention discloses a TX2 equipment-based hydrophobicity classification method for an electric power composite insulator, which comprises the steps of image acquisition, data set storage, training model construction, data enhancement, model conversion, data transmission, model inference, model transplantation and the like. The invention provides a hydrophobicity classification method for electric composite insulators, which solves the problem that computing resources cannot be deployed in a large scale in an actual scene, and realizes real-time classification of hydrophobicity images of the composite insulators on the edge side under different weather and different topographic conditions.)

1. A TX2 equipment-based hydrophobicity classification method for electric composite insulators is characterized in that,

firstly, an image acquisition device (1) acquires data;

step two, storing a data set;

step three, constructing a training model;

step four, data enhancement comprises color transformation and geometric transformation, wherein the color transformation consists of Gaussian noise, Gaussian blur, image erasure and image filling; the geometric transformation consists of image turning, image rotation, image random cutting and image random zooming;

step five, model conversion, namely converting the model.pth into the model.onnx, and converting the model.onnx into the model.trt;

step six, data transmission, wherein the data transmission link uses MQTT as a communication protocol, and the image data is transmitted to the TX2 end-side reasoning equipment (4) by the image acquisition device (1);

seventhly, model reasoning, namely after the RepVGG model is trained, performing equivalent conversion on the model, wherein the implementation mode is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

Step eight, model transplantation, wherein the model transplantation is a TRT quantized model, and the implementation method comprises the following steps:

xQ=clamp(0,Nlevels-1,xint)

a,x≤a

clamp(a,b,x)=x,a≤x≤b

b,x≥b

wherein x isintDenotes that a floating-point type value x is mapped to an integer value, x denotes an input floating-point type variable, Δ denotes a quantization step size, z denotes a zero point, x denotes a zero pointQRepresenting quantized fixed-point values, Nlevels256, clamp is used to limit quantitative value rangesAnd (5) enclosing.

2. The method for classifying hydrophobicity of power composite insulators based on TX2 equipment according to claim 1, wherein the data set storage in step 2 is to mark and divide hydrophobicity grades according to three dimensions of HC1-HC3, HC4-HC5 and HC6-HC7 by taking pictures of insulator beads with image size of 640 x 640 and image channels of RGB, and the hydrophobicity grades are set according to 4: 1, dividing a training set and a test set in proportion and storing the training sets and the test sets in different folders.

3. The method for classifying hydrophobicity of power composite insulators based on TX2 equipment according to claim 1, wherein in the model training in step 3, a parallel 1x1 convolution branch and an identity mapping branch are added to each 3x3 convolution layer in a RepVGG network to form a RepVGG Block, and the specific implementation manner is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

4. The TX2 equipment-based power composite insulator hydrophobicity classification method according to any one of claims 1-3, wherein the method is implemented by a classification network-based power composite insulator hydrophobicity classification system, and the classification network-based power composite insulator hydrophobicity classification system comprises an image acquisition device, a data transmission link, a training server, TX2 end-side reasoning equipment and a display module: the image acquisition device is used for shooting composite insulator images with water drops on the power transmission line under different weather and different terrain conditions; the training server is used for data enhancement, data set storage, training of a RepVGG classification model and model conversion; the data transmission link is used for transmitting image data to a TX2 end-side reasoning device; the TX2 end-side reasoning equipment is used for model migration and data reasoning; the display module is used for displaying the received classification result; the data enhancement comprises color transformation and geometric transformation, wherein the color transformation consists of Gaussian noise, Gaussian blur, image erasure and image filling; the geometric transformation consists of image turning, image rotation, image random cutting and image random zooming.

Technical Field

The invention relates to a TX2 equipment-based hydrophobicity classification method for an electric power composite insulator, and belongs to the field of image classification and machine vision.

Background

The composite insulator is widely applied to an electric power system by virtue of the remarkable advantages of light weight, high strength, difficult breakage, good pollution resistance and the like.

However, due to the influence of the environment where the composite insulator is located, the hydrophobicity grade of the insulator is likely to change after long-time use. If the detection and maintenance are not carried out in time, the reduction of the hydrophobicity grade of the composite insulator can cause the reduction of the pollution flashover resistance, and the operation stability of the power system is further influenced.

At present, a great deal of research is carried out in the field of hydrophobicity detection of insulators. But the overall process is more complicated and the recognition efficiency is lower.

Therefore, it is necessary to design a method for classifying hydrophobicity of the power composite insulator based on a TX2 device.

Disclosure of Invention

The technical problem to be solved by the invention is to provide a TX2 equipment-based hydrophobicity classification method for electric power composite insulators.

The technical solution of the invention is as follows:

a hydrophobicity classification method for an electric composite insulator based on TX2 equipment comprises the following steps:

firstly, an image acquisition device (1) acquires data;

step two, storing a data set;

step three, constructing a training model;

step four, data enhancement comprises color transformation and geometric transformation, wherein the color transformation consists of Gaussian noise, Gaussian blur, image erasure and image filling; the geometric transformation consists of image turning, image rotation, image random cutting and image random zooming;

step five, model conversion, namely converting the model.pth into the model.onnx, and converting the model.onnx into the model.trt;

step six, data transmission, wherein the data transmission link uses MQTT as a communication protocol, and the image data is transmitted to the TX2 end-side reasoning equipment (4) by the image acquisition device (1);

seventhly, model reasoning, namely after the RepVGG model is trained, performing equivalent conversion on the model, wherein the implementation mode is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

Step eight, model transplantation, wherein the model transplantation is a TRT quantized model, and the implementation method comprises the following steps:

xQ=clamp(0,Nlevels-1,xint)

wherein x isintDenotes that a floating-point type value x is mapped to an integer value, x denotes an input floating-point type variable, Δ denotes a quantization step size, z denotes a zero point, x denotes a zero pointQRepresenting quantized fixed-point values, Nlevels256, clamp is used to limit the quantitative range of values.

And 2, storing the data set, namely marking and dividing hydrophobicity grades according to three scales of HC1-HC3, HC4-HC5 and HC6-HC7 on the basis of the insulator with the image size of 640 multiplied by 640 and the image channel of RGB (red, green and blue) and the water drops, dividing the training set and the test set according to the ratio of 4: 1, and storing the training set and the test set in different folders.

During model training in the step 3, adding a parallel 1x1 convolution branch and an identical mapping branch to each 3x3 convolution layer in the RepVGG network to form a RepVGG Block, wherein the specific implementation mode is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

The system corresponding to the method consists of an image acquisition device, a data transmission link, a training server, TX2 end-side reasoning equipment and a display module;

the image acquisition device is used for shooting composite insulator images with water drops on the power transmission line under different weather and different terrain conditions; the training server is used for data enhancement, data set storage, training of a RepVGG classification model and model conversion; the data transmission link is used for transmitting image data to a TX2 end-side reasoning device; the TX2 end-side reasoning equipment is used for model migration and data reasoning; the display module is used for displaying the received classification result.

The data enhancement comprises color transformation and geometric transformation, wherein the color transformation consists of Gaussian noise, Gaussian blur, image erasure and image filling; the geometric transformation consists of image turning, image rotation, image random cutting and image random zooming.

The data set storage is to mark and divide hydrophobicity grades according to three scales of HC1-HC3, HC4-HC5 and HC6-HC7 for insulator sub-band water drop pictures with the image size of 640 multiplied by 640 and RGB image channels, divide training sets and test sets according to a ratio of 4: 1 and store the training sets and the test sets in different folders.

The data transmission link uses MQTT as a communication protocol.

The model conversion technical route is as follows: first, the model.pth is converted to the model.onnx, and then the model.onnx is converted to the model.trt.

During model training, the training RepVGG classification model adds a parallel 1x1 convolution branch and an identity mapping branch to each 3x3 convolution layer in a RepVGG network to form a RepVGGBlock; the realization mode is as follows:

the model reasoning is to train the RepVGG model and then make equivalent conversion to the model, and the realization mode is as follows: y ═ x + g (x) + f (x) is converted to y ═ h (x), where,

x represents the input per layer, f (x) represents a 3 × 3 convolution;

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

The model is transplanted to a TRT quantized model, and the implementation method comprises the following steps:

xQ=clamp(0,Nlevels-1,xint)

wherein x isintDenotes that a floating-point type value x is mapped to an integer value, x denotes an input floating-point type variable, Δ denotes a quantization step size, z denotes a zero point, x denotes a zero pointQRepresenting quantized fixed-point values, Nlevels256, clamp is used to limit the quantitative range of values.

Has the advantages that:

the invention relates to a method for classifying hydrophobicity of an electric composite insulator based on TX2 equipment, which is a system for classifying hydrophobicity of a composite insulator based on RepMVGG and TX2 end-side equipment, and has the following advantages compared with the prior art:

firstly, a set of intelligent classification method for hydrophobic images of composite insulators is provided, so that the hydrophobic images of the composite insulators under different weather and different terrain conditions can be automatically classified; secondly, by utilizing a model quantization technology, the size of the model is effectively reduced, the used memory is effectively reduced, and the reasoning speed is increased; in addition, based on a TensorRT acceleration inference technology and Tx2 edge equipment, the problem that computing resources cannot be deployed in a large scale in an actual scene can be solved, and real-time classification of hydrophobic images of the composite insulator on the edge side is achieved.

Drawings

FIG. 1 is a schematic view of the overall structure of the present invention;

FIG. 2 is an insulator hydrophobicity image;

FIG. 3 is a diagram of a RepVGG Block structure.

Detailed Description

The invention will be described in further detail below with reference to the following figures and specific examples:

example 1: referring to fig. 1-3, the classification network-based hydrophobicity classification system for the power composite insulator comprises an image acquisition device, a data transmission link, a training server, TX2 end-side reasoning equipment and a display module. The image acquisition device 1 is used for shooting composite insulator images with water drops on the power transmission line under different weather and different terrain conditions; the training server 3 is used for data enhancement, data set storage, training of a RepVGG classification model and model conversion; the data transmission link 2 is used for transmitting image data to a TX2 end-side reasoning device (4); the TX2 end-side reasoning device 4 is used for model migration and data reasoning; the display module (5) is used for displaying the received classification result.

In the embodiment of the invention, a whole set of composite insulator hydrophobicity classification system based on RepMVGG and TX2 end-side equipment (namely, a power composite insulator hydrophobicity classification system based on a classification network) has the following corresponding working procedures, namely, a power composite insulator hydrophobicity classification method based on TX2 equipment is as follows:

firstly, an image acquisition device (1) acquires data, and a hydrophobic image of the composite insulator is shown in figure 2.

And step two, storing a data set, namely marking and dividing hydrophobicity grades according to three scales of HC1-HC3, HC4-HC5 and HC6-HC7 on the basis of the insulator with the image size of 640 multiplied by 640 and the image channel of RGB and provided with water drops, dividing a training set and a test set according to a ratio of 4: 1, and storing the training set and the test set in different folders.

Step three, constructing a training model, and adding a parallel 1x1 convolution branch and an identity mapping branch to each 3x3 convolution layer in the RepVGG network to form a RepVGG Block when the model is trained, wherein the structure is shown in FIG. 3, and the specific implementation mode is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

Step four, data enhancement comprises color transformation and geometric transformation, wherein the color transformation consists of Gaussian noise, Gaussian blur, image erasure and image filling; the geometric transformation consists of image turning, image rotation, image random cutting and image random zooming.

Step five, model conversion is carried out, and the technical route of the model conversion is as follows: first, the model.pth is converted to the model.onnx, and then the model.onnx is converted to the model.trt.

And step six, data transmission, wherein the data transmission link uses MQTT as a communication protocol, and the image data is transmitted to the TX2 end-side reasoning equipment (4) by the image acquisition device (1).

Seventhly, model reasoning, namely after the RepVGG model is trained, performing equivalent conversion on the model, wherein the implementation mode is as follows:

y ═ x + g (x) + f (x) is converted into y ═ h (x),

where x represents the input to each layer, f (x) represents a 3x3 convolution,

g (x) is a 1 × 1 convolution, h (x) is the output of the identity mapping branch.

Step eight, model transplantation, wherein the model transplantation is a TRT quantized model, and the implementation method comprises the following steps:

xQ=clamp(0,Nlevels-1,xint)

wherein x isintDenotes that a floating-point type value x is mapped to an integer value, x denotes an input floating-point type variable, Δ denotes a quantization step size, z denotes a zero point, x denotes a zero pointQRepresenting quantized fixed-point values, Nlevels256, clamp is used to limit the quantitative range of values.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于改进K-Medoids聚类的船舶典型运动轨迹自适应挖掘方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!