Ultraviolet device adaptive gain control method, storage medium, and electronic device
By constructing the ultraviolet image segmentation and object detection model and establishing an adaptive gain control closed loop, the problem of manual adjustment of the gain control of traditional ultraviolet devices is solved, and the adaptation to different scenarios is achieved, and the accuracy of discharge detection and electrical equipment is improved. reliability.
Patent Information
- Application Number
- CN202311562675.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-11-22
AI Technical Summary
The gain control of traditional ultraviolet devices requires manual adjustment. Due to environmental conditions and subjective factors, the discharge signal detection cannot be dynamically adjusted, resulting in insufficient detection accuracy.
Build an ultraviolet image segmentation and object detection model, acquire image feature maps through encoding structure and decoding structure, establish an adaptive gain control closed loop, and adjust the gain of the ultraviolet device in real time to adapt to different scenarios.
Reduce manual intervention, improve discharge detection efficiency, optimize equipment maintenance plans, and improve the reliability and operating efficiency of electrical equipment.
Smart Images

Figure CN117806161B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to an ultraviolet device adaptive gain control method, storage medium, and electronic device. Background Art
[0002] Discharge detection based on UV images of electrical equipment is a non-contact method for fault detection of electrical equipment. By using UV cameras or UV sensors, the UV radiation images generated by electrical equipment during operation can be captured. These UV images can reveal the discharge phenomenon in electrical equipment, thereby helping to detect and diagnose faults in electrical equipment. Discharge refers to the current discharge phenomenon caused by excessive voltage or dielectric damage in electrical equipment. Discharge produces UV radiation, which cannot be observed by the human eye in the visible light range, but can be captured by UV images. By analyzing and processing UV images, the discharge phenomenon in electrical equipment can be detected, and then it can be determined whether the equipment is faulty. At present, discharge detection based on UV images of electrical equipment has been widely used and studied. Some common application areas include fault detection and preventive maintenance of electrical equipment such as power systems, transformers, circuit breakers, and insulators. By analyzing and processing UV images, real-time monitoring and diagnosis of discharge phenomena in electrical equipment can be achieved, potential faults can be discovered in advance, equipment damage and downtime can be reduced, and the reliability and safety of electrical equipment can be improved. However, discharge detection based on UV images of electrical equipment still faces some challenges and limitations. For example, the intensity and frequency of the discharge signal may be affected by environmental conditions, resulting in inaccurate discharge detection and analysis results. Traditional UV equipment gain control requires manual adjustment according to different lighting conditions and discharge intensity. This manual adjustment method requires operators to have certain professional knowledge and experience, and is easily affected by subjective factors, which may lead to inaccurate or untimely adjustments. Traditional UV equipment usually uses a fixed gain method, which cannot be dynamically adjusted according to the actual scene and the intensity of the discharge signal. This may affect the accuracy of discharge signal detection. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a method for adaptive gain control of ultraviolet equipment, comprising the following steps:
[0004] S1. Using ultraviolet equipment to collect ultraviolet image data sets of discharge equipment, and preprocessing the ultraviolet image data sets, dividing the preprocessed ultraviolet image data sets into a training set, a verification set, and a test set;
[0005] S2. Build a UV image segmentation and target detection model, including encoding structure, decoding structure, and detection head;
[0006] S3, using the training set to train the ultraviolet image segmentation and target detection model to obtain a trained ultraviolet image segmentation and target detection model; inputting the validation set into the trained ultraviolet image segmentation and target detection model, evaluating the trained ultraviolet image segmentation and target detection model, and adjusting the hyperparameters of the trained ultraviolet image segmentation and target detection model to obtain a final ultraviolet image segmentation and target detection model; inputting the test set into the final ultraviolet image segmentation and target detection model to obtain an ultraviolet image segmentation and target detection result;
[0007] S4. Construct an adaptive gain control closed-loop control of the ultraviolet equipment. The ultraviolet equipment collects ultraviolet image data of the electrical equipment in real time. The preprocessing method of S1 inputs the preprocessed ultraviolet image data into the final ultraviolet image segmentation and target detection model of S3. The output result of the model is judged by the adaptive gain control strategy of the ultraviolet equipment to obtain the gain adjustment result, and the ultraviolet image segmentation and target detection results are continuously output. The gain adjustment result is fed back to the ultraviolet equipment for gain adjustment. After the gain adjustment, the ultraviolet equipment continues to collect ultraviolet image data of the electrical equipment in real time.
[0008] Furthermore, in step S1, the ultraviolet image data set is preprocessed as follows:
[0009] The ultraviolet image dataset is annotated, and the annotated ultraviolet image dataset is subjected to mosaic flipping, rotation, and image interpolation operations for data expansion. At the same time, the expanded dataset is divided into training set, validation set, and test set in a ratio of 8:1:1.
[0010] Furthermore, in step S2, the encoding structure is composed of several convolutional feature extraction layers and several downsampling layers. The convolutional feature extraction layer extracts features of the image, and the downsampling layer is used to reduce the scale of the image. By stacking multiple groups of downsampling layers and convolutional feature extraction layers, feature maps of different scales are output.
[0011] Furthermore, the convolutional feature extraction layer includes a convolution, a normalization layer, an activation function, and a one-dimensional attention mechanism layer; the input is Pictures, after The convolution layer extracts features, normalizes the extracted features through the normalization layer, passes the normalized features through the activation function, and outputs them through the one-dimensional attention mechanism layer. The feature map of is the image height, is the image width, is the number of image channels.
[0012] Further,
[0013] Encoding structure input The image is output with the first convolutional feature extraction layer having a dimension of The first characteristic map of is the image height, is the image width, where is the number of output channels of the convolution in the first convolutional feature extraction layer;
[0014] The first feature map of passes through the first downsampling layer and the output dimension is The second characteristic map of is the number of output channels of the convolution in the second convolutional feature extraction layer;
[0015] The second feature map of passes through the second downsampling layer and the output dimension is The third characteristic map of is the number of output channels of the convolution in the third convolutional feature extraction layer;
[0016] According to the above steps, The n-1th feature map of is passed through the n-1th downsampling layer and the output dimension is n-1th convolutional feature extraction layer. The nth feature map of is the number of output channels of the convolution in the nth convolutional feature extraction layer.
[0017] Furthermore, in step S2, the decoding structure includes a number of convolutional layers, a number of upsampling layers, a number of downsampling layers, a number of fusion stacking layers and a number of one-dimensional attention mechanism layers; the convolutional layer is used to extract features and adjust the number of feature map channels, the upsampling layer is used to restore the spatial resolution of the feature map, the one-dimensional attention mechanism layer is used to focus on important feature areas, and the fusion stacking layer realizes the fusion of two feature maps of the same scale and the same number of channels. Through the decoding structure processing, the feature maps of all scales output by the encoding structure are subjected to feature fusion of different scales to obtain target detection results and image segmentation results of different sizes. The convolutional layer includes a convolution, a normalization layer, and an activation function.
[0018] Furthermore, the ultraviolet device adaptive gain control strategy controls the adjustment of the ultraviolet device gain by analyzing the mathematical relationship between the discharge area area, the discharge device area area, the normal device area area in the image segmentation results of the model, the discharge device area in the target detection results and the input image.
[0019] Furthermore, the adaptive gain control strategy of the UV device is as follows:
[0020] By analyzing the image segmentation results of the model, the area of the discharge region is marked as Su-out1, the area of the discharge device is marked as Su-out2, the area of the discharge device in the target detection result is marked as SY-out2, the initial gain of the ultraviolet device is the minimum value, and the gain of the ultraviolet device is adjusted according to the ratio of Su-out1 and SY-out2;
[0021] (1) If no discharge area is detected in the image segmentation result, increase the gain of the UV device by a set step size each time. After each gain increase, check whether there is a discharge area. If there is no discharge area after the gain reaches the upper limit, the electrical equipment in the area is normal.
[0022] (2) If the discharge area is not detected in the image segmentation result, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit and no electrical equipment is detected, the abnormal electrical equipment is not in this area;
[0023] (3) If the discharge area is not detected in the image segmentation result, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit, and the electrical equipment is detected, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, the gain is continued to be increased according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical equipment is abnormal. The fault area is determined according to the positional relationship between the discharge area and the electrical equipment;
[0024] (4) If a discharge area is detected in the image segmentation result and an electrical device is detected, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, check whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, continue to increase the gain according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical device is abnormal. The fault area is determined based on the positional relationship between the discharge area and the electrical device.
[0025] (5) If a discharge area is detected in the image segmentation result and no electrical equipment is detected, the abnormal electrical equipment is not in this area.
[0026] The present invention also proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned ultraviolet device adaptive gain control method is implemented.
[0027] The present invention also proposes an electronic device, including a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned ultraviolet device adaptive gain control method.
[0028] The beneficial effects brought by the technical solution provided by the present invention are:
[0029] The present invention proposes a method for adaptive gain control of ultraviolet equipment. By constructing an ultraviolet image segmentation and target detection model, a coding structure is used to obtain feature maps of different sizes of an image, a decoding structure performs multi-size fusion on feature maps of different sizes, and outputs feature maps after fusion of different sizes. The detection head obtains image segmentation and target detection results; an adaptive gain control closed-loop control of ultraviolet equipment is constructed, and the ultraviolet equipment collects ultraviolet image data of electrical equipment in real time. The ultraviolet image segmentation and target detection results of the model are judged by the adaptive gain control strategy of the ultraviolet equipment to obtain a gain adjustment result, and the gain adjustment result is fed back to the ultraviolet equipment for gain adjustment. After the gain adjustment, the ultraviolet equipment continues to collect ultraviolet image data of electrical equipment in real time. The scheme of the present invention can extract valuable information from these data, optimize equipment maintenance plans, and improve the reliability and operation efficiency of electrical equipment. Image recognition is used to realize the adaptive gain control of ultraviolet equipment to adapt to different scenarios, reduce manual intervention, and improve discharge detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a flow chart of an adaptive gain control method for ultraviolet equipment according to an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of the structure of a convolutional feature extraction layer in an embodiment of the present invention;
[0032] Figure 3 is a schematic diagram of the one-dimensional attention mechanism layer structure in an embodiment of the present invention;
[0033] Figure 4 is a schematic diagram of the convolutional layer structure in an embodiment of the present invention;
[0034] Figure 5 It is a schematic diagram of the structure of the ultraviolet image segmentation and target detection model according to an embodiment of the present invention;
[0035] Figure 6 It is a closed-loop control block diagram of adaptive gain control of ultraviolet equipment according to an embodiment of the present invention;
[0036] Figure 7 is a flow chart of an adaptive gain control strategy for ultraviolet equipment according to an embodiment of the present invention;
[0037] Figure 8 is a block diagram of an electronic device in an exemplary embodiment of the present invention;
[0038] Fig. 9 is an aerial photo of an insulator used in an experiment in an embodiment of the present invention;
[0039] Fig.10 is an insulator to be tested in an experiment marked by the algorithm in an embodiment of the present invention;
[0040] Fig.11 is a discharge image of an electrical device collected by an ultraviolet spectrum discharge detection device in an embodiment of the present invention;
[0041] Fig.12 In an embodiment of the present invention, target detection and semantic segmentation are performed simultaneously based on ultraviolet images. DETAILED DESCRIPTION
[0042] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0043] A flowchart of a method for adaptive gain control of ultraviolet equipment according to an embodiment of the present invention is shown in FIG. Figure 1 , specifically including the following steps:
[0044] S1. Use ultraviolet equipment to collect ultraviolet image datasets of discharge equipment, preprocess the ultraviolet image datasets, and divide the preprocessed ultraviolet image datasets into a training set, a verification set, and a test set.
[0045] In a further embodiment, the preprocessing of the ultraviolet image data set is specifically performed as follows:
[0046] Label the UV image dataset: Use the labelme tool to label the UV image dataset, label the UV image with polygons, such as: the discharge region label is Discharge_region, the discharge insulator label is Abnormal_insulator, and the normal insulator label is insulator, and generate an XML labeling file. Generate rectangular box labels for single or multiple detected objects through scripts.
[0047] The labeled ultraviolet image dataset is expanded by mosaic flipping, rotation, image interpolation and other operations. At the same time, the expanded dataset is divided into training set, validation set and test set in a ratio of 8:1:1.
[0048] S2. Build a UV image segmentation and target detection model, including encoding structure, decoding structure, and detection head.
[0049] The encoding structure consists of several convolutional feature extraction layers and several downsampling layers. The convolutional feature extraction layers extract features from images, and the downsampling layers are used to reduce the scale of images. By stacking multiple groups of downsampling layers and convolutional feature extraction layers, feature maps of different scales are output.
[0050] refer to Figure 2 , the convolutional feature extraction layer consists of a A convolution, a normalization layer, an activation function, and a one-dimensional attention mechanism layer. The schematic diagram of the one-dimensional attention mechanism layer is shown in the figure. Figure 3 .
[0051] Convolution is mainly used to extract features of input data, and to capture local spatial information through convolution operations and weight sharing. It can effectively process images and other types of data and generate feature maps with spatial structures. The normalization layer is used to normalize features for better training and optimization. Common normalization layers include batch normalization and layer normalization, which can speed up the training process, enhance the robustness of the model, and help prevent the problem of gradient disappearance or explosion. The one-dimensional attention mechanism realizes the feature response of the corresponding position of the spatial position and the channel position, and dynamically adjusts the importance of different spatial positions by learning weights to better focus on the area of interest. The channel attention mechanism usually learns a one-dimensional weight vector and applies it to each channel of the feature map to enhance or suppress the feature response of the corresponding channel. Common activation functions include ReLU, Sigmoid, Tanh, and Leaky ReLU, which can introduce nonlinear characteristics to the neural network, so that the model can better adapt to complex data distributions and tasks. In a further embodiment, batch normalization and ReLU activation functions are used.
[0052] In a further embodiment, a The convolution, a normalization layer, an activation function, and a one-dimensional attention mechanism layer are connected in the following way: the input is Pictures, after The convolution layer extracts features, normalizes the extracted features through the normalization layer, passes the normalized features through the activation function, and outputs them through the one-dimensional attention mechanism layer. The feature map of is the image height, is the image width, is the number of image channels. The combination of these four components can be adjusted according to the specific task and network structure. This combination order can help the network learn and express features better, while improving the stability and convergence speed of the model.
[0053] The encoding structure extracts features of different scales from the input image according to the different size requirements of target detection, and outputs feature maps of different scales extracted from the input image. The specific structure is as follows:
[0054] Encoding structure input The image is output with the first convolutional feature extraction layer having a dimension of The first characteristic map of is the image height, is the image width, where is the number of output channels of the convolution in the first convolutional feature extraction layer;
[0055] The first feature map of passes through the first downsampling layer and the output dimension is The second characteristic map of is the number of output channels of the convolution in the second convolutional feature extraction layer;
[0056] The second feature map of passes through the second downsampling layer and the output dimension is The third characteristic map of is the number of output channels of the convolution in the third convolutional feature extraction layer;
[0057] According to the above steps, The n-1th feature map of is passed through the n-1th downsampling layer and the output dimension is n-1th convolutional feature extraction layer. The nth feature map of is the number of output channels of the convolution in the nth convolutional feature extraction layer.
[0058] The decoding structure includes several convolutional layers, several upsampling layers, several downsampling layers, several fusion stacking layers and several one-dimensional attention mechanism layers; the convolutional layer is used to extract features and adjust the number of feature map channels, the upsampling layer is used to restore the spatial resolution of the feature map, the one-dimensional attention mechanism layer is used to focus on important feature areas, and the fusion stacking layer realizes the fusion of two feature maps of the same scale and the same number of channels. Through the decoding structure processing, the feature maps of all scales output by the encoding structure are fused with features of different scales to obtain target detection results and image segmentation results of different sizes. Figure 4 , the convolutional layer consists of a convolution, a normalization layer, and an activation function, which uses the ReLU activation function.
[0059] In a further embodiment, reference is made to Figure 5 , the encoding structure outputs 6 feature maps of different scales. The input length and width are , a picture with 3 channels, after the first convolutional feature extraction layer (the number of output channels of the convolution in the first convolutional feature extraction layer is 32, and the convolution kernel is ) The output dimension is The first feature map of
[0060] The first feature map passes through the first downsampling layer and its size becomes , and passes through the second convolutional feature extraction layer (the number of output channels of the convolution in the second convolutional feature extraction layer is 64, and the convolution kernel is ) The output dimension is The second feature map of
[0061] The second feature map passes through the second downsampling layer and its size becomes , and passes through the third convolutional feature extraction layer (the number of output channels of the convolution in the third convolutional feature extraction layer is 128, and the convolution kernel is ) The output dimension is The third characteristic diagram of
[0062] The third feature map passes through the third downsampling layer and its size becomes , and passes through the fourth convolutional feature extraction layer (the number of output channels of the convolution in the fourth convolutional feature extraction layer is 256, and the convolution kernel is ) The output dimension is The fourth characteristic diagram of
[0063] The fourth feature map passes through the fourth downsampling layer and its size becomes , and passes through the fifth convolutional feature extraction layer (the number of output channels of the convolution in the fifth convolutional feature extraction layer is 512, and the convolution kernel is ) The output dimension is The fifth characteristic diagram of
[0064] The fifth feature map passes through the fifth downsampling layer and its size becomes , and passes through the sixth convolutional feature extraction layer (the number of output channels of the convolution in the sixth convolutional feature extraction layer is 1024, and the convolution kernel is ) The output dimension is The sixth characteristic diagram of .
[0065] In a further embodiment, reference is made to Figure 5 , the decoding structure is as follows:
[0066] The dimension is The sixth feature map of is passed through the first convolutional layer, and the number of channels is adjusted to 512, and we get Feature map A1; Through the second convolutional layer, the number of channels is adjusted to 256, and we get Feature map A2; By first Focus on the important features and get feature map A3. Feature map A3 passes through the first upsampling layer to get The feature map B1 of The fifth feature map of is passed through the third convolutional layer, and the number of channels is adjusted to 256, and we get The first fusion stacking layer fuses the feature map B1 and the feature map B2 to obtain a feature map of dimension The fused feature map C1.
[0067] The dimension is The fused feature map C1 passes through the fourth convolutional layer with a channel number of 512 and the fifth convolutional layer with a channel number of 128, and the number of channels is adjusted to 128, resulting in a dimension of Feature Figure A4; Through the second Focus on the important features and get feature map A5. Feature map A5 passes through the second upsampling layer to get Feature map A6, Through the sixth convolutional layer, the number of channels is adjusted to 128, and the dimension is The feature map B3 of The fourth feature map of is passed through the seventh convolutional layer, and the number of channels is adjusted to 128, and we get The second fusion stacking layer fuses the feature maps B3 and B4 to obtain a feature map with a dimension of The fused feature map C2.
[0068] The dimension is The fused feature map C2 is passed through the third Focusing on the important features, we get feature map A7. Feature map A7 passes through the eighth convolutional layer and adjusts the number of channels to 128. The feature map A8 is obtained by passing the third upsampling layer. The feature map B5 of The third feature map of and feature map B5 are fused through the third fusion stacking layer to obtain a dimension of The fused feature map C3.
[0069] The dimension is The fused feature map C3 passes through the ninth convolutional layer and adjusts the number of channels to 64, and we get The feature map A9 is obtained by passing the fourth upsampling layer. The feature map B6 of The third feature map of and feature map B6 are fused through the fourth fusion stacking layer to obtain a dimension of The fused feature map C4.
[0070] The dimension is The fused feature map C4 passes through the tenth convolutional layer and adjusts the number of channels to 64, and obtains The feature map A10 is obtained by passing the fifth upsampling layer. The feature map A11 of feature map A11 is passed through the eleventh convolution layer, and the number of channels is adjusted to 32. The feature map B7 of the dimension is The first feature map of and feature map B7 are fused through the fifth fusion stacking layer to obtain a dimension of The fused feature map C5.
[0071] The dimension is Feature map A8 passes through the first downsampling layer of the decoding structure and has a dimension of The feature map A12 has a dimension of The feature map A5 and the feature map A12 are fused through the sixth fusion stacking layer to obtain a dimension of The fused feature map C6.
[0072] The dimension is The fused feature map C6 is extracted through the thirteenth convolutional layer with a channel number of 256, and the The feature map A13 is obtained by the second downsampling layer of the decoding structure with a dimension of The feature map A14 of feature map A14 is extracted through the fourteenth convolutional layer with a channel number of 256, and the feature map A14 is obtained. The feature map A15 of feature map A15 and feature map A3 are fused through the seventh fusion stacking layer to obtain a dimension of The fused feature map C7.
[0073] The dimension is The fused feature map C5 passes through the fifteenth convolutional layer and adjusts the number of channels to 32, and we get The feature map OUT1 is output through detection head 1.
[0074] The dimension is The feature map A8 is extracted through the sixteenth convolutional layer with a channel number of 128 to obtain the feature map OUT2, which is output through the detection head 2.
[0075] The dimension is The feature map A13 is extracted through the seventeenth convolutional layer with a channel number of 256 to obtain the feature map OUT3, which is output through the detection head 3.
[0076] The dimension is The fused feature map C7 is extracted through the eighteenth convolutional layer with a channel number of 512 to obtain the feature map OUT3, which is output through the detection head 4.
[0077] Among them, C1 and C2 are the number of channels set according to the identifiable types.
[0078] S3. Use the training set to train the ultraviolet image segmentation and target detection model to obtain the trained ultraviolet image segmentation and target detection model; input the verification set into the trained ultraviolet image segmentation and target detection model, evaluate the trained ultraviolet image segmentation and target detection model, and adjust the hyperparameters of the trained ultraviolet image segmentation and target detection model to obtain the final ultraviolet image segmentation and target detection model; input the test set into the final ultraviolet image segmentation and target detection model to obtain the ultraviolet image segmentation and target detection result.
[0079] S4, build the closed-loop control of adaptive gain control of UV equipment, refer to Figure 6 The ultraviolet device collects ultraviolet image data of electrical equipment in real time, and inputs the preprocessed ultraviolet image data into the final ultraviolet image segmentation and target detection model of S3 through the preprocessing method of S1. The output result of the model is judged by the adaptive gain control strategy of the ultraviolet device to obtain the gain adjustment result, and continuously outputs the segmentation and target detection results of the ultraviolet image, and feeds the gain adjustment result back to the ultraviolet device for gain adjustment. After the gain adjustment, the ultraviolet device continues to collect ultraviolet image data of electrical equipment in real time.
[0080] The ultraviolet device adaptive gain control strategy controls the adjustment of the ultraviolet device gain by analyzing the mathematical relationship between the discharge area area, the discharge device area area, the normal device area area in the image segmentation result of the model, the discharge device area in the target detection result and the input image.
[0081] UV equipment adaptive gain control strategy reference Figure 7 , as follows:
[0082] By analyzing the image segmentation results of the model, the area of the discharge region is marked as Su-out1, the area of the discharge device is marked as Su-out2, the area of the discharge device in the target detection result is marked as SY-out2, the initial gain of the ultraviolet device is the minimum value, and the gain of the ultraviolet device is adjusted according to the ratio of Su-out1 and SY-out2;
[0083] (1) If no discharge area is detected in the image segmentation result, increase the gain of the UV device by a set step size each time. After each gain increase, check whether there is a discharge area. If there is no discharge area after the gain reaches the upper limit, the electrical equipment in the area is normal.
[0084] (2) If the discharge area is not detected in the image segmentation result, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit and no electrical equipment is detected, the abnormal electrical equipment is not in this area;
[0085] (3) If the discharge area is not detected in the image segmentation result, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit, and the electrical equipment is detected, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, the gain is continued to be increased according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical equipment is abnormal. The fault area is determined according to the positional relationship between the discharge area and the electrical equipment;
[0086] (4) If a discharge area is detected in the image segmentation result and an electrical device is detected, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, check whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, continue to increase the gain according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical device is abnormal. The fault area is determined based on the positional relationship between the discharge area and the electrical device.
[0087] (5) If a discharge area is detected in the image segmentation result and no electrical equipment is detected, the abnormal electrical equipment is not in this area.
[0088] In an exemplary embodiment, a computer-readable storage medium is included, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned ultraviolet device adaptive gain control method is implemented.
[0089] See also Figure 8 In an exemplary embodiment, an electronic device is also included, including at least one processor, at least one memory, and at least one communication bus.
[0090] Wherein, a computer program is stored in the memory, and the computer program includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned ultraviolet device adaptive gain control method.
[0091] In order to verify the feasibility of the above method, the straight corner tower of the power line equipment is selected as the electrical equipment to be detected by UV image discharge detection. Insulators are an important component of the power system, mainly used to support and fix high-voltage wires, and at the same time play the role of isolating wires and brackets to ensure the normal operation of the power system. Damage or failure of insulators will cause short circuits, power outages and other problems in the power system, seriously affecting the stability and safety of the power system.
[0092] Therefore, it is very necessary to perform regular inspection and maintenance on insulators. Detecting insulator faults requires locating the insulators and then performing fault detection. Fig. 9 and Fig.10 This is an example of how the algorithm can be used to locate insulators. Fig. 9 This is an aerial photo of an insulator used in an experiment in an embodiment of the present invention, wherein the target to be measured is an insulator. The target to be measured is marked by the method of the present invention. Fig.10 is an insulator to be tested in an experiment marked by the algorithm in an embodiment of the present invention, wherein the insulator to be tested is obtained from Fig.10 The object is segmented and marked by the detection box. The upper left corner of the detection box shows the name of the object being detected, and the number part shows the possibility of it being the object.
[0093] The discharge image of the electrical equipment collected by the ultraviolet spectrum discharge detection device in the embodiment of the present invention is referenced Fig.11 , the central white area is the discharge area of the electrical equipment obtained by the method of the present invention. In the embodiment of the present invention, the target detection and semantic segmentation are performed synchronously based on the ultraviolet image. Fig.12 , where the discharge area is marked by a detection box, above the detection box is the name of the object being detected, and the number is the possibility of being the object.
[0094] Fig.11 and Fig.12 They are the ultraviolet images of electrical equipment discharge and the discharge area detection results of the algorithm on the ultraviolet images of electrical equipment discharge.
[0095] Discharge refers to the phenomenon of electrical breakdown caused by excessive local electric field strength in electrical equipment, which may cause equipment damage and safety hazards. Therefore, discharge detection is crucial to prevent equipment failure and ensure safe operation of equipment.
[0096] By locating the electrical equipment and the discharge area, and judging the fault point of the electrical equipment discharge according to the positional relationship between the discharge area and the electrical equipment, the fault location of the electrical equipment can be located.
[0097] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for adaptive gain control of ultraviolet equipment, characterized in that: The following steps are involved: S1. Using ultraviolet equipment to collect ultraviolet image data sets of discharge equipment, and preprocessing the ultraviolet image data sets, dividing the preprocessed ultraviolet image data sets into a training set, a verification set, and a test set; S2. Build a UV image segmentation and target detection model, including encoding structure, decoding structure, and detection head; The encoding structure consists of several convolutional feature extraction layers and several downsampling layers. The convolutional feature extraction layers extract features from the image, and the downsampling layers are used to reduce the image scale. By stacking multiple groups of downsampling layers and convolutional feature extraction layers, feature maps of different scales are output. The convolutional feature extraction layer consists of a convolution, a normalization layer, an activation function, and a one-dimensional attention mechanism layer; Input is Pictures, after The convolution layer extracts features, normalizes the extracted features through the normalization layer, passes the normalized features through the activation function, and outputs them through the one-dimensional attention mechanism layer. The feature map of is the image height, is the image width, is the number of image channels; Encoding structure input The image is output with the size of The first characteristic map of is the image height, is the image width, where is the number of output channels of the convolution in the first convolutional feature extraction layer; The first feature map of passes through the first downsampling layer and the output dimension is The second characteristic map of is the number of output channels of the convolution in the second convolutional feature extraction layer; The second feature map of passes through the second downsampling layer and the output dimension is The third characteristic map of is the number of output channels of the convolution in the third convolutional feature extraction layer; According to the above steps, The n-1th feature map of is passed through the n-1th downsampling layer and the output dimension is n-1th convolutional feature extraction layer. The nth feature map of is the number of output channels of the convolution in the nth convolutional feature extraction layer; The decoding structure includes several convolutional layers, several upsampling layers, several downsampling layers, several fusion stacking layers and several one-dimensional attention mechanism layers; the convolutional layer includes a The convolution layer, a normalization layer, and an activation function are used for feature extraction and adjustment of the number of feature map channels. The upsampling layer is used to restore the spatial resolution of the feature map. The one-dimensional attention mechanism layer is used to focus on important feature areas. The fusion stacking layer realizes the fusion of two feature maps of the same scale and the same number of channels. Through the decoding structure processing, the feature maps of different scales output by the encoding structure are fused with features of different scales to obtain the detection results of objects of different sizes and the image segmentation results. The specific structure of the UV image segmentation and target detection model is: The encoding structure outputs 6 feature maps of different scales. The input image passes through the first convolutional feature extraction layer to output the first feature map; the first feature map passes through the first downsampling layer, and outputs the second feature map through the second convolutional feature extraction layer; the second feature map passes through the second downsampling layer, and outputs the third feature map through the third convolutional feature extraction layer; the third feature map passes through the third downsampling layer, and outputs the fourth feature map through the fourth convolutional feature extraction layer; the fourth feature map passes through the fourth downsampling layer, and outputs the fifth feature map through the fifth convolutional feature extraction layer; the fifth feature map passes through the fifth downsampling layer, and outputs the sixth feature map through the sixth convolutional feature extraction layer; The decoding structure is as follows: The sixth feature map passes through the first convolution layer to obtain feature map A1; feature map A1 passes through the second convolution layer to obtain feature map A2; feature map A2 passes through the first one-dimensional attention mechanism layer to obtain feature map A3, and feature map A3 passes through the first upsampling layer to obtain feature map B1; the fifth feature map passes through the third convolution layer to obtain feature map B2; the first fusion stacking layer fuses feature map B1 and feature map B2 to obtain the fused feature map C1; Feature map C1 passes through the fourth convolution layer and the fifth convolution layer in sequence to obtain feature map A4; feature map A4 passes through the second one-dimensional attention mechanism layer to obtain feature map A5, feature map A5 passes through the second upsampling layer to obtain feature map A6, feature map A6 passes through the sixth convolution layer to obtain feature map B3; the fourth feature map passes through the seventh convolution layer to obtain feature map B4; the second fusion stacking layer fuses feature map B3 and feature map B4 to obtain the fused feature map C2; Feature map C2 passes through the third one-dimensional attention mechanism layer to obtain feature map A7, feature map A7 passes through the eighth convolution layer to obtain feature map A8, feature map A8 passes through the third upsampling layer to obtain feature map B5; the third feature map and feature map B5 are fused through the third fusion stacking layer to obtain the fused feature map C3; The feature map C3 passes through the ninth convolution layer to obtain the feature map A9, and the feature map A9 passes through the fourth upsampling layer to obtain the feature map B6; the third feature map and the feature map B6 are fused through the fourth fusion stacking layer to obtain the fused feature map C4; Feature map C4 passes through the tenth convolution layer to obtain feature map A10, feature map A10 passes through the fifth upsampling layer to obtain feature map A11, feature map A11 passes through the eleventh convolution layer to obtain feature map B7; the first feature map and feature map B7 are fused through the fifth fusion stacking layer to obtain the fused feature map C5; Feature map A8 passes through the first downsampling layer of the decoding structure to obtain feature map A12, and feature map A5 and feature map A12 are fused through the sixth fusion stacking layer to obtain a fused feature map C6; Feature map C6 extracts features through the thirteenth convolution layer to obtain feature map A13, feature map A13 passes through the second downsampling layer of the decoding structure to obtain feature map A14, feature map A14 extracts features through the fourteenth convolution layer to obtain feature map A15, feature map A15 and feature map A3 are fused through the seventh fusion stacking layer to obtain the fused feature map C7; The feature map C5 passes through the fifteenth convolutional layer to obtain the feature map OUT1, which is output through the detection head 1; Feature map A8 passes through the sixteenth convolution layer to obtain feature map OUT2, which is output through detection head 2; The feature map A13 passes through the seventeenth convolutional layer to obtain the feature map OUT3, which is output through the detection head 3; The feature map C7 passes through the eighteenth convolutional layer to obtain the feature map OUT3, which is output through the detection head 4; S3, using the training set to train the ultraviolet image segmentation and target detection model to obtain a trained ultraviolet image segmentation and target detection model; inputting the validation set into the trained ultraviolet image segmentation and target detection model, evaluating the trained ultraviolet image segmentation and target detection model, and adjusting the hyperparameters of the trained ultraviolet image segmentation and target detection model to obtain a final ultraviolet image segmentation and target detection model; inputting the test set into the final ultraviolet image segmentation and target detection model to obtain an ultraviolet image segmentation and target detection result; S4, constructing a closed-loop control of the adaptive gain control of the ultraviolet device, the ultraviolet device collects the ultraviolet image data of the electrical equipment in real time, and inputs the preprocessed ultraviolet image data into the final ultraviolet image segmentation and target detection model of S3 through the preprocessing method of S1, and the output result of the model is judged by the adaptive gain control strategy of the ultraviolet device to obtain the gain adjustment result, and continuously outputs the segmentation and target detection results of the ultraviolet image, and feeds the gain adjustment result back to the ultraviolet device for gain adjustment, and the ultraviolet device after gain adjustment continues to collect the ultraviolet image data of the electrical equipment in real time; The ultraviolet device adaptive gain control strategy controls the adjustment of the ultraviolet device gain by analyzing the mathematical relationship between the discharge area area, the discharge device area area, the normal device area area in the image segmentation result of the model, the discharge device area in the target detection result and the input image.
2. The method for adaptive gain control of ultraviolet equipment according to claim 1, characterized in that: In step S1, the ultraviolet image data set is preprocessed as follows: The ultraviolet image dataset is annotated, and the annotated ultraviolet image dataset is subjected to mosaic flipping, rotation, and image interpolation operations for data expansion. At the same time, the expanded dataset is divided into training set, validation set, and test set in a ratio of 8:1:
1.
3. The method for adaptive gain control of ultraviolet equipment according to claim 1, characterized in that: The adaptive gain control strategy of UV equipment is as follows: By analyzing the image segmentation results of the model, the area of the discharge region is marked as Su-out1, the area of the discharge device is marked as Su-out2, the area of the discharge device in the target detection result is marked as SY-out2, the initial gain of the ultraviolet device is the minimum value, and the gain of the ultraviolet device is adjusted according to the ratio of Su-out1 and SY-out2; (1) If no discharge area is detected in the image segmentation result, increase the gain of the UV device by a set step size each time. After each gain increase, check whether there is a discharge area. If there is no discharge area after the gain reaches the upper limit, the electrical equipment in the area is normal. (2) If the discharge area is not detected in the image segmentation result, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit and no electrical equipment is detected, the abnormal electrical equipment is not in this area; (3) If the discharge area is not detected in the image segmentation result, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether there is a discharge area. If the discharge area is detected before the gain reaches the upper limit, and the electrical equipment is detected, the gain of the ultraviolet device is increased, and the gain is adjusted by a set step size each time. After each gain increase, it is detected whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, the gain is continued to be increased according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical equipment is abnormal. The fault area is determined according to the positional relationship between the discharge area and the electrical equipment; (4) If a discharge area is detected in the image segmentation result and an electrical device is detected, the gain of the UV device is increased, and the gain is adjusted by a set step size each time. After each gain increase, check whether Su-out1 / SY-out2 is greater than or equal to the preset value. If not, continue to increase the gain according to the set step size until Su-out1 / SY-out2 is greater than or equal to the preset value, indicating that the electrical device is abnormal. The fault area is determined based on the positional relationship between the discharge area and the electrical device. (5) If a discharge area is detected in the image segmentation result and no electrical equipment is detected, the abnormal electrical equipment is not in this area.
4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
5. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Power transmission and transformation equipment surface partial discharge intelligent detection method and unmanned aerial vehicle integrated ultraviolet system
CN114167245A
Semantic segmentation model construction method and system for ultraviolet image of electrical equipment
CN116721420A
