A method and device for detecting abnormal insulators in substations based on infrared images
Through the detection method based on infrared images, the infrared insulator detection model is used to monitor the insulator temperature of the substation in real time, which solves the problem of low efficiency of manual inspection and achieves efficient and accurate detection of insulator temperature.
Patent Information
- Application Number
- CN202111404846.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-11-24
AI Technical Summary
In the existing technology, insulator detection of substation transmission lines mainly relies on manual inspection, which is inefficient and difficult to monitor insulator temperature changes and faults in real time and accurately.
Using a detection method based on infrared images, by collecting single-channel infrared images of insulators, pseudo-color coding and then inputting into the pre-trained infrared insulator detection model, the maximum, minimum, and average gray values are calculated and converted into temperature values to construct a domain difference space and judge The safety field intersects with the low temperature and high temperature fields, and outputs abnormal or normal temperature results.
It realizes intelligent detection of insulator temperature, improves detection efficiency and accuracy, reduces the need for manual inspection, and has the advantages of efficient and high-precision detection.
Smart Images

Figure CN114155212B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of insulator detection, and in particular to a method and device for detecting abnormal insulators in a substation based on infrared images. Background Art
[0002] Composite insulators are a type of voltage-induced heating power equipment. As their internal insulation becomes defective or aged, local discharge will occur, causing a rise in local temperature. In other words, the operating status of composite insulators can be quickly and in real time based on whether they are heating up. The severity of the fault can also be determined based on the degree of heating, helping the staff of the power maintenance department to determine the appropriate maintenance plan. However, the current inspection of insulators on substation transmission lines generally adopts the method of manual inspection, and the inspection efficiency of insulators is low. Summary of the invention
[0003] In view of the problem that the detection of insulators on the transmission line of the substation is generally carried out by manual inspection, and the detection efficiency of the insulators is low, the present application proposes a method and device for detecting abnormal insulators in the substation based on infrared images.
[0004] In the first aspect, the present application proposes a method for detecting abnormal insulators in a substation based on infrared images, comprising the following steps:
[0005] S1: Collect a single-channel infrared image of a substation insulator, perform pseudo-color encoding on the single-channel infrared image of the substation insulator, and obtain a pseudo-color image; S2: Scale the pseudo-color image and input it into a pre-trained infrared insulator detection model to extract the target insulator image; S3: Calculate the maximum grayscale value, minimum grayscale value and average grayscale value of the target insulator image; S4: Input the maximum grayscale value, minimum grayscale value and average grayscale value into a pre-fitted grayscale value-temperature linear fitting model, and output the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg respectively; S5: Establish a domain difference space coordinate axis, and mark the values of the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg in the form of points on the x-axis of the domain difference space coordinate axis to form points Tmax, Tmin and Tavg. in and point Tavg; S6: construct a circle with the midpoint between the point Tmin and the point Tavg as the center and passing through the point Tmin to form a low-temperature area, construct a circle with the midpoint between the point Tmax and the point Tavg as the center and passing through the point Tmax to form a high-temperature area, construct a circle with the midpoint between the point Tmax and the point Tmin as the center and passing through the point Tmax to form a total area, and finally construct a circle with the midpoint between the point Tmax and the point Tmin as the center and a preset safety radius to form a safety area; and S7: determine whether the safety area intersects with the low-temperature area and the high-temperature area. If the safety area intersects with both the low-temperature area and the high-temperature area, output a normal temperature result. If the safety area does not intersect with either the low-temperature area or the high-temperature area, output an abnormal temperature result.
[0006] By adopting the above technical scheme, a single-channel infrared image of a substation insulator is first collected, and then the single-channel infrared image of the substation insulator is pseudo-color-coded and input into a pre-trained infrared insulator detection model to intercept a target insulator image, and then the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image are calculated, and then the maximum grayscale value, the minimum grayscale value and the average grayscale value are converted into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg, and then the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg are mapped to the domain difference space coordinate axis, and a low-temperature domain, a high-temperature domain, a total domain and a safety domain are constructed. By judging whether the safety domain intersects with the low-temperature domain and the high-temperature domain, a normal temperature or abnormal temperature result is output, thereby realizing intelligent detection of the insulator temperature, without the need for manual inspection of the insulator, and improving the detection efficiency of the insulator. The result detected by this method has high accuracy, and at the same time has the advantages of high efficiency and high accuracy in detecting insulators.
[0007] Preferably, S2 specifically includes the following steps: S21: scaling the long side of the pseudo-color image to a fixed size and obtaining a scaling factor x; S22: multiplying the short side of the pseudo-color image by the scaling factor x to obtain a scaled image that has the same ratio as the original image; S23: inputting the scaled image into a pre-trained infrared insulator detection model to extract the target insulator image.
[0008] By adopting the above technical solution, the long side of the pseudo-color image is first scaled to a fixed size, and then the short side of the pseudo-color image is multiplied by the scaling factor x to obtain a scaled image with the same ratio as the original image, making the scaling step of the pseudo-color image simple and efficient.
[0009] Preferably, the step S3 specifically includes the following steps: S31: performing median filtering on the target insulator image to remove salt and pepper noise of the image; S32: performing mean filtering on the target insulator image processed in step S31 to make the target insulator image smooth; S33: calculating the maximum grayscale value, minimum grayscale value and average grayscale value of the target insulator image processed in step S32.
[0010] By adopting the above technical solution, before calculating the grayscale value of the target insulator image, the target insulator image is first subjected to median filtering to remove the salt and pepper noise of the image, and then the target insulator image is subjected to mean filtering to make the target insulator image smooth, so that the grayscale value calculation result of the target insulator image is more accurate.
[0011] Preferably, the pre-trained infrared insulator detection model in step S2 is a YOLOV5 insulator detection model.
[0012] By adopting the above technical solution, using the YOLOV5 insulator detection model to detect insulators has the advantage of higher detection result accuracy.
[0013] Preferably, the YOLOV5 insulator detection model includes a feature extraction backbone network and an attention extraction branch network, the feature extraction backbone network is used to output multiple head output matrices, and the attention extraction branch network is used to output multiple attention matrices that are multiplied by the multiple head output matrices respectively.
[0014] By adopting the above technical solution, an attention extraction branch network is added on the basis of the original network structure to generate an attention matrix. The output becomes the corresponding multiplication of the head output matrix and the attention matrix to form an attention mechanism. After using the attention mechanism, the weight of the target insulator area that needs to be identified in the picture will be relatively large, and the insulator will be more prominent, making the insulator area intercepted by the YOLOV5 insulator detection model more accurate.
[0015] Preferably, the pre-fitted grayscale value-temperature linear fitting model in S5 is obtained by the following steps: 1) collecting infrared images of standard blackbody heat sources at different temperatures; 2) calculating the grayscale values of the infrared images of the standard blackbody heat sources at different temperatures; 3) fitting the grayscale value data of the infrared images of the standard blackbody heat sources at different temperatures to obtain the grayscale value-temperature linear fitting model.
[0016] By adopting the above technical solution, infrared images of standard blackbody heat sources at different temperatures are first collected, and then the grayscale values of the infrared images of the standard blackbody heat sources at different temperatures are calculated, and the data of the grayscale values of the infrared images of the standard blackbody heat sources at different temperatures are fitted, thereby achieving the acquisition of a grayscale value-temperature linear fitting model.
[0017] Preferably, in step 3), the least square method is used to fit the data of the grayscale values of the infrared images of the standard black body heat source at different temperatures to obtain a fitting formula.
[0018] By adopting the above technical solution, the least squares method can be used to find the best function match for the data by minimizing the sum of squares of errors. The least squares method can be used to easily obtain unknown data, and the sum of squares of errors between the obtained data and the actual data can be minimized, so that the gray value-temperature linear fitting model has a higher accuracy.
[0019] Preferably, in step S3, opencv or PIL is used to calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image.
[0020] By adopting the above technical solution, the grayscale value calculated using opencv or PIL has higher accuracy.
[0021] In the second aspect, the present application also proposes a substation abnormal insulator detection device based on infrared images, including: an image acquisition module, the image acquisition module is used to collect a single-channel infrared image of a substation insulator; an image preprocessing module, the image preprocessing module is used to preprocess the single-channel infrared image of the substation insulator collected by the image acquisition module to obtain a pseudo-color image; an image interception module, the image interception module is used to intercept the target pseudo-color image preprocessed by the image preprocessing module to obtain a target insulator image; an image denoising module, the image denoising module is used to remove the target insulator image noise, so that the target insulator image is smoother; a gray value conversion temperature module, the gray value conversion temperature module is used to calculate the maximum gray value, the minimum gray value and the average gray value of the target insulator image, and convert the maximum gray value, the minimum gray value and the average gray value into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively; an output module, the output module is used to map the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis and output the result of temperature abnormality or temperature normal through the method of the first aspect.
[0022] By adopting the above scheme, the image acquisition module is first used to collect the single-channel infrared image of the substation insulator, and then the image preprocessing module is used to preprocess the single-channel infrared image of the substation insulator collected by the image acquisition module to obtain a pseudo-color image, and then the image interception module is used to intercept the pseudo-color image preprocessed by the image preprocessing module to obtain a target insulator image, and then the image denoising module is used to remove the noise of the target insulator image to make the target insulator image smoother, and then the gray value conversion temperature module is used to calculate the maximum gray value, the minimum gray value and the average gray value of the target insulator image. The maximum grayscale value, the minimum grayscale value and the average grayscale value are converted into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively; finally, an output module is used to map the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis and output the result of abnormal temperature or normal temperature through the method of the first aspect, thereby realizing intelligent detection of insulator temperature, without manual inspection of insulators, high detection efficiency of insulators, and high accuracy of detection results of the device, and having the advantages of high efficiency and high accuracy of insulator detection.
[0023] In a third aspect, the present application further proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the computing method of the first aspect.
[0024] The present application proposes a substation abnormal insulator detection method based on infrared images, by converting the maximum grayscale value, the minimum grayscale value and the average grayscale value in the insulator image into the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg, and then mapping the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis, constructing the low temperature domain, the high temperature domain, the total domain and the safety domain, and outputting the result of normal temperature or abnormal temperature by judging whether the safety domain intersects with the low temperature domain and the high temperature domain. At the same time, the present application also proposes a substation abnormal insulator detection device based on infrared images, which achieves the effect of high efficiency and high accuracy in detecting insulators after using the substation abnormal insulator detection method based on infrared images. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and are used together with the description to explain the principles of the present invention. It will be easy to recognize other embodiments and many expected advantages of the embodiments because they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar parts.
[0026] Figure 1 It is a flow chart of a method for detecting abnormal insulators in a substation based on infrared images according to an embodiment of the present application.
[0027] Figure 2 It is a flow chart of step S2 of the abnormal insulator detection method for a substation based on infrared images in an embodiment of the present application.
[0028] Figure 3 It is a flow chart of step S3 of the abnormal insulator detection method for a substation based on infrared images in an embodiment of the present application.
[0029] Figure 4 It is a schematic diagram of the output network of the YOLOV5 insulator detection model of the embodiment of the present application.
[0030] Figure 5 It is a schematic diagram of the output network of the improved YOLOV5 insulator detection model of the embodiment of the present application.
[0031] Figure 6 It is a schematic diagram of the output network of the attention extraction branch network of an embodiment of the present application.
[0032] Figure 7 It is a schematic diagram of the domain difference space coordinate axes when the temperature is normal in an embodiment of the present application.
[0033] Figure 8 It is a schematic diagram of the spatial coordinate axes of field differences when the temperature is abnormal in an embodiment of the present application.
[0034] Fig. 9 It is another schematic diagram of the domain difference space coordinate axis when the temperature is abnormal in an embodiment of the present application.
[0035] Fig.10 It is a schematic diagram of a specific embodiment of the abnormal insulator detection method for a substation based on infrared images according to the present application.
[0036] Fig.11 It is a schematic diagram of the module structure of the abnormal insulator detection device for a substation based on infrared images suitable for implementing the embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] The present invention will be described in detail below with reference to the accompanying drawings.
[0039] Reference Figure 1 The embodiment of the present application discloses a method for detecting abnormal insulators in a substation based on infrared images, comprising the following steps:
[0040] S1: Collect a single-channel infrared image of the substation insulator, perform pseudo-color encoding on the single-channel infrared image of the substation insulator, and obtain a pseudo-color image.
[0041] In this embodiment, a single-channel infrared image of a substation insulator is obtained by shooting with an infrared imager, and the single-channel infrared image of the substation insulator is pseudo-colored using software such as opencv or PIL, and the pixel grayscale value of the grayscale image is mapped into a three-channel RGB pseudo-color image. The pseudo-color coding uses the following formula:
[0042]
[0043]
[0044]
[0045] S2: Scale the pseudo-color image and input it into the pre-trained infrared insulator detection model to extract the target insulator image.
[0046] In some optional implementations of this embodiment, such as Figure 2 As shown, the above execution subject can complete the process of step S2 according to the following steps:
[0047] S21: scaling the long side of the pseudo-color image to a fixed size, and obtaining a scaling factor x; in this embodiment, the long side of the pseudo-color image is scaled to a size of 640.
[0048] S22: multiply the short side of the pseudo-color image by the scaling factor x to obtain a scaled image that has the same scale as the original image;
[0049] S23: Input the zoomed image into a pre-trained infrared insulator detection model to extract a target insulator image.
[0050] In this embodiment, the pre-trained infrared insulator detection model used is a YOLOV5 insulator detection model or an improved YOLOV5 insulator detection model.
[0051] YOLOV5 is an object detection network that uses a fully convolutional backbone network to extract features and then uses a golden pyramid to fuse features of different depths. It is mainly used in the field of object detection. YOLOV5 uses Mosaic data enhancement, adaptive anchor box calculation, and adaptive image scaling during training to improve the accuracy of the network.
[0052] The YOLOV5 training process includes the following steps: 1. Collect data, clean and filter the data, and then divide the data into training set, validation set and test set with a ratio of 5:2:3; 2. Use the labeling tool LabelImg to label the pictures; 3. Modify the model structure configuration file yolov5s.yaml to generate your own model structure configuration file yolo-infrared.yaml; 4. Modify the configuration parameters of the training model, such as picture size, total number of training iterations and batch gradient data size, etc. For parameters that are not set, follow the default parameters and start training after setting; 5. After training, verify whether the accuracy of the model meets the requirements on the test set. If so, it can be deployed and used; if not, analyze the data that is incorrectly recognized or cannot be recognized in the test set, modify the labels and training configuration parameters of the training set and validation set according to the analysis results, and retrain until the accuracy of the model on the test set meets the requirements.
[0053] Since the detected information is the center point coordinates and width and height information of the target, the coordinate information of the upper left corner and the lower right corner needs to be used. The coordinate conversion formula is:
[0054] x1=x-0.5*w;
[0055] y1=y-0.5*h;
[0056] x2=x+0.5*w;
[0057] y2=y+0.5*h.
[0058] Among them, x and y are the XY coordinates of the center point of the target, w is the width of the target, h is the height of the target, x1 and y1 are the XY coordinates of the upper left corner of the target, and x2 and y are the XY coordinates of the lower right corner of the target.
[0059] Reference Figure 4 and Figure 5 The improved YOLOV5 insulator detection model includes a feature extraction backbone network and an attention extraction branch network. The feature extraction backbone network is used to output multiple head output matrices, and the attention extraction branch network is used to output multiple attention matrices that are multiplied by the multiple head output matrices respectively.
[0060] The improved YOLOV5 insulator detection model in this embodiment is based on the original network structure, and an attention extraction network is added to generate an attention matrix. The output becomes the multiplication of the head output and the attention correspondingly to form an attention mechanism.
[0061] Figure 6 The implementation process of the attention mechanism is shown, which is mainly implemented by the following steps:
[0062] 1): The 640*640*3 image is passed through 32 convolution kernels of size 3*3, the convolution step size is 2*2, and the padding is 1*1. After convolution calculation, the image is 320*320*32;
[0063] 2): The 320*320*32 feature map is passed through 64 convolution kernels of size 3*3, the convolution step size is 2*2, and the padding is 1*1. After convolution calculation, 160*160*64 is obtained;
[0064] 3): The 160*160*3 feature map passes through 6 convolution kernels of size 11*11, the convolution step size is 2*2, and the padding is 1*1. After the convolution calculation, an attention matrix of size 76*76*6 is obtained, which is used to multiply the feature map of size 76*76*6 output by the feature extraction backbone network;
[0065] 4): The 76*76*3 feature map is pooled through a 2*2 mean pooling layer to obtain an attention matrix of size 38*38*6, which is used to multiply the feature map of size 38*38*6 output by the feature extraction backbone network;
[0066] 5): The 38*38*3 feature map is pooled through a 2*2 mean pooling layer to obtain an attention matrix of size 19*19*6, which is used to multiply the feature map of size 38*38*6 output by the feature extraction backbone network.
[0067] The main function of the attention mechanism is to weight the output elements. Before using the attention mechanism, the weights of all positions in the image are the same, there is no attention area, and the features have no prominent area. After using the attention mechanism, the weight of the target insulator area that needs to be identified in the image will be relatively large, highlighting the insulator.
[0068] S3: Calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image.
[0069] In some optional implementations of this embodiment, such as Figure 3 As shown, the above execution subject can complete the process of step S3 according to the following steps:
[0070] S31: performing median filtering on the target insulator image to remove salt and pepper noise of the image;
[0071] Median filtering is a nonlinear smoothing technique that sets the grayscale value of each pixel to the median of all the pixel grayscale values within a certain neighborhood window of that pixel. Median filtering has a good filtering effect on impulse noise, especially while filtering out noise, it can protect the edge of the signal so that it is not blurred.
[0072] S32: applying mean filtering to the target insulator image processed in step S31 to make the target insulator image smooth;
[0073] Mean filtering is a typical linear filtering algorithm, which refers to giving a template to the target pixel in the image, which includes the adjacent pixels around it, and then replacing the original pixel value with the average value of all pixels in the template.
[0074] S33: Calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image processed in step S32.
[0075] In this embodiment, the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image can be read through opencv or PIL.
[0076] S4: inputting the maximum grayscale value, the minimum grayscale value and the average grayscale value into the pre-fitted grayscale value-temperature linear fitting model, and outputting the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg respectively;
[0077] In this embodiment, the pre-fitted gray value-temperature linear fitting model is obtained by the following steps:
[0078] 1): Collect infrared images of standard blackbody heat sources at different temperatures;
[0079] 2): Calculate the grayscale value of the infrared image of the standard black body heat source at different temperatures;
[0080] 3): Fit the grayscale value data of the infrared image of the standard blackbody heat source at different temperatures to obtain a grayscale value-temperature linear fitting model.
[0081] Among them, the method for fitting the grayscale value data of the infrared image of the standard blackbody heat source at different temperatures in step 3) is the least squares method. The least squares method finds the best function matching of the data by minimizing the sum of squares of errors. The least squares method can be used to easily obtain unknown data.
[0082] In other implementations, the maximum grayscale value, the minimum grayscale value, and the average grayscale value may be converted into the output maximum temperature value Tmax, the minimum temperature value Tmin, and the average temperature value Tavg, respectively, by table lookup or the like.
[0083] S5: Establishing a domain difference space coordinate axis, marking the values of the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg in the form of points on the x-axis of the domain difference space coordinate axis to form point Tmax, point Tmin and point Tavg.
[0084] S6: Construct a circle with the midpoint between point Tmin and point Tavg as the center and passing through point Tmin to form a low temperature area, construct a circle with the midpoint between point Tmax and point Tavg as the center and passing through point Tmax to form a high temperature area, construct a circle with the midpoint between point Tmax and point Tmin as the center and passing through point Tmax to form a total area, and finally construct a circle with the midpoint between point Tmax and point Tmin as the center and a preset safety radius to form a safety area.
[0085] S7: Determine whether the safety area intersects with both the low temperature area and the high temperature area. If the safety area intersects with both the low temperature area and the high temperature area, output a result of normal temperature. If the safety area does not intersect with both the low temperature area and the high temperature area, output a result of abnormal temperature. In this embodiment, the output of the result of abnormal temperature is expressed as issuing an abnormal temperature alarm, and the output of the result of normal temperature is expressed as not issuing an alarm.
[0086] Reference Figures 7 to 9 , Figure 7 This is a schematic diagram of the principle of the domain difference space when the temperature is normal. At this time, the safety domain intersects with the low temperature domain and the high temperature domain, and the output is the result of normal temperature. Figure 8The schematic diagram of the principle of a domain difference space when the temperature is abnormal. At this time, the safety domain does not intersect with the low temperature domain and the high temperature domain, and the result of temperature abnormality is output. Fig. 9 This is a schematic diagram of the principle of another domain difference space when the temperature is abnormal. At this time, the safety domain does not intersect with the low temperature domain and the high temperature domain, and the result of temperature abnormality is output.
[0087] Fig.10 It is a schematic diagram of a specific embodiment of the abnormal insulator detection method for a substation based on infrared images according to the present application. First, a single-channel infrared image of a substation insulator is obtained by shooting with an infrared imager; then, the single-channel infrared image of the substation insulator is pseudo-colored using software such as opencv or PIL; then, the long side of the pseudo-color image is scaled to 640, and a scaling factor x is obtained, and the short side of the pseudo-color image is multiplied by the scaling factor x to obtain a scaled image with the same ratio as the original image, and the scaled image is input into a YOLOV5 insulator detection model or an improved YOLOV5 insulator detection model to extract a target insulator image; then, a median filter is performed on the target insulator image to remove the salt and pepper noise of the image, and then a mean filter is applied to the target insulator image to make the target insulator image smooth, and then the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image are read through opencv or PIL; then, the maximum grayscale value, the minimum grayscale value and the average grayscale value are respectively input into a pre-fitted grayscale value-temperature linear fitting model, and are respectively input into Output the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg; establish a domain difference space coordinate axis, and mark the values of the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg in the form of points on the x-axis of the domain difference space coordinate axis to form point Tmax, point Tmin and point Tavg; then construct a circle with the midpoint between point Tmin and point Tavg as the center and passing through point Tmin to form a low temperature domain, construct a circle with the midpoint between point Tmax and point Tavg as the center and passing through point Tmax to form a high temperature domain, construct a circle with the midpoint between point Tmax and point Tmin as the center and passing through point Tmax to form a total domain, and finally construct a circle with the midpoint between point Tmax and point Tmin as the center and a preset safety radius to form a safety domain; finally, determine whether the safety domain intersects with the low temperature domain and the high temperature domain. If the safety domain intersects with both the low temperature domain and the high temperature domain, output a normal temperature result. If the safety domain does not intersect with either the low temperature domain or the high temperature domain, output an abnormal temperature result. In this embodiment, the result of outputting abnormal temperature is expressed as issuing an abnormal temperature alarm, and the result of outputting normal temperature is expressed as not issuing an alarm.
[0088] Further references Fig.11As an implementation of the above method, the present application provides an embodiment of a substation abnormal insulator detection device based on infrared images. The system embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices, and the device includes:
[0089] An image acquisition module 101 is used to acquire a single-channel infrared image of an insulator in a substation;
[0090] An image preprocessing module 102 is used to preprocess the single-channel infrared image of the substation insulator acquired by the image acquisition module 101 to obtain a pseudo-color image;
[0091] An image capture module 103, which is used to capture a target image of the pseudo-color image preprocessed by the image preprocessing module 102, to obtain a target insulator image;
[0092] An image denoising module 104, which is used to remove noise from the target insulator image to make the target insulator image smoother;
[0093] Gray value conversion temperature module 105, gray value conversion temperature module 105 is used to calculate the maximum gray value, minimum gray value and average gray value of the target insulator image, and convert the maximum gray value, minimum gray value and average gray value into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively;
[0094] The output module 106 is used to map the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis and output the result of temperature abnormality or temperature normal through any method in claims 1-8.
[0095] When the abnormal insulator detection device for a substation based on infrared images is used, the image acquisition module 101 is first used to collect a single-channel infrared image of the substation insulator, and then the image preprocessing module 102 is used to preprocess the single-channel infrared image of the substation insulator collected by the image acquisition module 101 to obtain a pseudo-color image, and then the image interception module 103 is used to intercept the pseudo-color image preprocessed by the image preprocessing module 102 to obtain a target insulator image, and then the image denoising module 104 is used to remove the noise of the target insulator image to make the target insulator image smoother, and then the gray value conversion temperature module 105 is used to calculate the maximum gray value, minimum gray value and average gray value of the target insulator image, and the maximum gray value, minimum gray value and average gray value are converted into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively, and finally the output module 106 is used to map the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis and pass through the process Figure 1 The method in the method outputs the result of abnormal temperature or normal temperature, thereby realizing intelligent detection of insulator temperature. There is no need for manual inspection of insulators. The detection efficiency of insulators is high, and the results detected by the device are of high accuracy. At the same time, it has the advantages of high efficiency and high accuracy in detecting insulators.
[0096] According to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer readable medium, the computer program including a computer program for executing Figure 1 When the computer program is executed by a central processing unit (CPU) and a graphics processing unit (GPU), the above functions defined in the method of the present application are performed.
[0097] It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution device, device or component. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution device, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0098] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] The modules involved in the embodiments described in the present application may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes an acquisition module, an analysis module, and an output module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0101] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for detecting abnormal insulators in a substation based on infrared images, characterized in that: The following steps are involved: S1: collecting a single-channel infrared image of a substation insulator, and performing pseudo-color coding on the single-channel infrared image of the substation insulator to obtain a pseudo-color image; S2: scaling the pseudo-color image and inputting it into a pre-trained infrared insulator detection model to extract a target insulator image; S3: Calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image; S4: inputting the maximum grayscale value, the minimum grayscale value and the average grayscale value into a pre-fitted grayscale value-temperature linear fitting model, and outputting a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively; S5: establishing a domain difference space coordinate axis, marking the values of the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg in the form of points on the x-axis of the domain difference space coordinate axis to form point Tmax, point Tmin and point Tavg; S6: construct a circle with the midpoint between the point Tmin and the point Tavg as the center and passing through the point Tmin to form a low temperature area, construct a circle with the midpoint between the point Tmax and the point Tavg as the center and passing through the point Tmax to form a high temperature area, construct a circle with the midpoint between the point Tmax and the point Tmin as the center and passing through the point Tmax to form a total area, and finally construct a circle with the midpoint between the point Tmax and the point Tmin as the center and a preset safety radius to form a safety area; as well as S7: Determine whether the safety area intersects with both the low temperature area and the high temperature area. If the safety area intersects with both the low temperature area and the high temperature area, output a result indicating normal temperature. If the safety area does not intersect with both the low temperature area and the high temperature area, output a result indicating abnormal temperature.
2. The method for detecting abnormal insulators in a substation based on infrared images according to claim 1 is characterized in that: The S2 specifically includes the following steps: S21: scaling the long side of the pseudo-color image to a fixed size, and obtaining a scaling factor x; S22: multiplying the short side of the pseudo-color image by the scaling factor x to obtain a scaled image with the same scale as the original image; S23: Input the zoomed image into a pre-trained infrared insulator detection model to extract a target insulator image.
3. The method for detecting abnormal insulators in a substation based on infrared images according to claim 1 is characterized in that: The step S3 specifically comprises the following steps: S31: performing median filtering on the target insulator image to remove salt and pepper noise of the image; S32: applying mean filtering to the target insulator image processed in step S31 to make the target insulator image smooth; S33: Calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image after processing in step S32.
4. The method for detecting abnormal insulators in a substation based on infrared images according to claim 1 is characterized in that: The pre-trained infrared insulator detection model in step S2 is a YOLOV5 insulator detection model.
5. The method for detecting abnormal insulators in a substation based on infrared images according to claim 1 is characterized in that: The pre-trained infrared insulator detection model in step S2 is an improved YOLOV5 insulator detection model, which includes a feature extraction backbone network and an attention extraction branch network. The feature extraction backbone network is used to output multiple head output matrices, and the attention extraction branch network is used to output multiple attention matrices that are multiplied by the multiple head output matrices respectively.
6. The method for detecting abnormal insulators in a substation based on infrared images according to claim 1 is characterized by: The pre-fitted gray value-temperature linear fitting model in S5 is obtained by the following steps: 1): Collect infrared images of standard blackbody heat sources at different temperatures; 2): Calculate the grayscale value of the infrared image of the standard black body heat source at different temperatures; 3): Fitting the grayscale value data of the infrared images of the standard blackbody heat source at different temperatures to obtain the grayscale value-temperature linear fitting model.
7. The method for detecting abnormal insulators in a substation based on infrared images according to claim 6 is characterized by: In the step 3), the least square method is used to fit the grayscale value data of the infrared image of the standard black body heat source at different temperatures to obtain the grayscale value-temperature linear fitting model.
8. A method for detecting abnormal insulators in a substation based on infrared images according to any one of claims 1 to 7, characterized in that: In step S3, opencv or PIL is used to calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image.
9. A substation abnormal insulator detection device based on infrared images, characterized in that: include: An image acquisition module, the image acquisition module is used to collect a single-channel infrared image of a substation insulator; An image preprocessing module, the image preprocessing module is used to preprocess the single-channel infrared image of the substation insulator collected by the image acquisition module to obtain a pseudo-color image; An image capture module, the image capture module is used to capture the target image of the pseudo-color image preprocessed by the image preprocessing module to obtain a target insulator image; An image denoising module, the image denoising module is used to remove noise from the target insulator image to make the target insulator image smoother; A grayscale value conversion temperature module, the grayscale value conversion temperature module is used to calculate the maximum grayscale value, the minimum grayscale value and the average grayscale value of the target insulator image, and convert the maximum grayscale value, the minimum grayscale value and the average grayscale value into a maximum temperature value Tmax, a minimum temperature value Tmin and an average temperature value Tavg respectively; An output module, the output module is used to map the maximum temperature value Tmax, the minimum temperature value Tmin and the average temperature value Tavg to the domain difference space coordinate axis and output the result of temperature abnormality or temperature normal through any method described in claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
