An insulator defect detection method in snow and weak light environment based on improved YOLO11s
By improving the YOLO11s model and utilizing the camera exposure formula, adaptive Gamma correction network, SPD convolution module, and MPDIOU loss function, the problems of insulator defect detection accuracy and stability under low light conditions in snowy weather were solved, achieving more efficient detection results.
Patent Information
- Application Number
- CN202511008247.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The traditional YOLO11s model cannot effectively capture image details in low-light conditions such as snowy weather, resulting in poor accuracy and stability in insulator defect detection.
By adjusting image brightness using camera exposure formulas, and combining an adaptive Gamma correction network, an SPD convolutional module, and an MPDIOU loss function to improve the YOLO11s model, an SPD-YOLO11s object detection network is formed. This network is then trained and validated to improve detection accuracy.
It significantly improves the accuracy and stability of insulator defect detection under low light conditions in snowy weather, providing reliable support for the safe operation of the power system.
Smart Images

Figure CN120525869B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of insulator defect detection, and particularly relates to an insulator defect detection method in a snow weak light environment based on an improved YOLO11s. BACKGROUND
[0002] With the continuous development of the power system, the reliability and safety of power equipment are particularly important. Insulators are an important part of the power system, and their state is directly related to the stability of power transmission. Traditional insulator detection methods mainly rely on manual inspection and traditional image processing technology. These methods not only have high work intensity, but also are limited by environmental factors (such as weather, light, etc.) and the limitations of manual operation, and have high miss rate and false detection rate. Therefore, it is particularly important to develop an automatic and intelligent insulator defect detection method. In recent years, with the development of unmanned aerial vehicle technology and computer vision technology, insulator detection based on unmanned aerial vehicle inspection has attracted widespread attention. Unmanned aerial vehicle inspection can quickly cover a wide range of power lines and can detect in snow. However, in a snow environment, due to poor light conditions and complex background, the images taken are often dark, which brings great challenges to defect detection.
[0003] In related technologies, when the traditional YOLO11s model processes images in a low-light environment in the snow, due to the limited feature extraction capability, it cannot fully capture the detailed features in the images, resulting in poor detection accuracy and stability. SUMMARY
[0004] The embodiments of the application provide a method, device, terminal equipment and storage medium for insulator defect detection in a snow weak light environment based on an improved YOLO11s, which can solve the problem of poor detection accuracy and stability caused by the limited feature extraction capability of the traditional YOLO11s model when processing images in a low-light environment in the snow.
[0005] In a first aspect, the embodiments of the present application provide a method for detecting insulator defects in a snowy and weak light environment based on an improved YOLO11s, comprising: adjusting the brightness of a first insulator image dataset collected by a camera exposure formula to form a second insulator image dataset, the first insulator dataset being an insulator image dataset collected by a drone; processing the brightness of the second insulator image dataset by using an adaptive Gamma correction network to obtain a third insulator image dataset; introducing an SPD convolution module and an MPDIOU loss function into a YOLO11 network to obtain an SPD-YOLO11s target detection network model; training the SPD-YOLO11s target detection network model by using the third insulator image dataset to obtain an optimal weight pt; and detecting insulator defects by using the SPD-YOLO11s target detection network model with the optimal weight pt.
[0006] In a possible implementation form of the first aspect, the above-mentioned processing the brightness of the second insulator image dataset by using an adaptive Gamma correction network to obtain a third insulator image dataset comprises:
[0007] calculating the average brightness of the image according to the total number of image pixels in the second insulator image dataset and the pixel value of each gray image
[0008]
[0009] wherein, is each pixel value in the gray image, and N is the total number of pixels in the image;
[0010] dynamically adjusting the Gamma value according to the average brightness
[0011]
[0012] wherein, is the minimum value of Gamma, is the maximum value of Gamma, is the target brightness value;
[0013] correcting the pixel value I(i) of each image by using the Gamma value to obtain the third insulator image dataset; wherein,
[0014] correcting the pixel value I(i) of each image by using the Gamma value, specifically:
[0015]
[0016] wherein, is the pixel value after Gamma correction.
[0017] Optionally, in another possible implementation manner of the first aspect, the SPD convolution module and the MPDIoU loss function are introduced into the YOLO11 network to obtain an SPD-YOLO11s target detection network model, including:
[0018] In the backbone feature extraction module of the YOLO11 network, the original convolution down-sampling structure is replaced by the SPD convolution module.
[0019] In the loss function module of the YOLO11 network, the original CIoU loss function is replaced by the MPDIoU loss function to obtain the SPD-YOLO11s target detection network model.
[0020] Optionally, in another possible implementation manner of the first aspect, the calculation process of the MPDIoU loss function is specifically as follows:
[0021]
[0022]
[0023]
[0024]
[0025]
[0026] wherein, and represent the left upper corner coordinate and the right lower corner coordinate of the real box respectively, and represent the left upper corner coordinate and the right lower corner coordinate of the predicted box respectively, represents the distance between the left upper corner point of the real box and the left upper corner point of the predicted box, represents the distance between the right lower corner point of the real box and the right lower corner point of the predicted box, h and w represent the width and the height of the image respectively, and IoU represents the intersection over union loss, A is the area of the predicted box, is the area of the real box, is a target function, used for minimizing the MPDIoU loss.
[0027] Optionally, in another possible implementation manner of the first aspect, after the SPD-YOLO11s target detection network model is trained by using the third insulator image dataset to obtain the optimal weight pt, the method further includes:
[0028] The SPD-YOLO11s target detection network model is verified by using the optimal weight pt.
[0029] Optionally, in a further possible implementation form of the first aspect, the SPD-YOLO11s target detection network model is verified by using the optimal weight pt, and the verification includes:
[0030] A preset part in the third insulator image dataset is taken as a verification set, and the verification set is input into the SPD-YOLO11s model for inference by using the optimal weight pt;
[0031] A plurality of evaluation indexes on the verification set are calculated to evaluate the performance of the model.
[0032] In the second aspect, the embodiments of the present application provide an insulator defect detection device in a snow and weak light environment based on an improved YOLO11s, which comprises: an adjusting module configured to adjust the brightness of a first insulator image dataset collected by using a camera exposure formula to form a second insulator image dataset, the first insulator image dataset being an insulator image dataset collected by a UAV; a correction module configured to perform brightness processing on the second insulator image dataset by using an adaptive Gamma correction network to obtain a third insulator image dataset; an obtaining module configured to introduce an SPD convolution module and an MPDIOU loss function into a YOLO11 network to obtain a SPD-YOLO11s target detection network model; a training module configured to train the SPD-YOLO11s target detection network model by using the third insulator image dataset to obtain an optimal weight pt; and a detection module configured to detect insulator defects by using the SPD-YOLO11s target detection network model with the optimal weight pt.
[0033] In the third aspect, the embodiments of the present application provide a terminal device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the insulator defect detection method in a snow and weak light environment based on an improved YOLO11s when executing the computer program.
[0034] In the fourth aspect, the embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, and the computer program is executable by a processor to implement the insulator defect detection method in a snow and weak light environment based on an improved YOLO11s.
[0035] Beneficial effects: the scheme of the present application first adjusts the brightness of the collected first insulator image data set by using the camera exposure formula to form a second insulator image data set, the first insulator data set is the insulator image data set collected by the unmanned aerial vehicle, then the brightness of the second insulator image data set is processed by using the adaptive Gamma correction network to obtain a third insulator image data set, the SPD convolution module and the MPDIOU loss function are introduced into the YOLO11 network to obtain the SPD-YOLO11s target detection network model, the SPD-YOLO11s target detection network model is trained by using the third insulator image data set to obtain the best weight pt, and then the SPD-YOLO11s target detection network model of pt is used to detect the insulator defects. The present application effectively improves the precision and stability of the insulator defect detection under the weak light condition in the snow, and provides reliable technical support for the safe operation of the power system. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0037] Figure 1 is a flowchart of the insulator defect detection method in the snow and weak light environment based on the improved YOLO11s provided by an embodiment of the present application;
[0038] Figure 2 is a structural diagram of the YOLO11 model provided by an embodiment of the present application;
[0039] Figure 3 is a structural diagram of the SPD-YOLO11s target detection network model provided by an embodiment of the present application;
[0040] Figure 4 is a structural diagram of the SPD convolution module provided by an embodiment of the present application;
[0041] Figure 5 is a calculation diagram of the MPDIoU loss function provided by an embodiment of the present application;
[0042] Figure 6 is a structural diagram of the insulator defect detection device in the snow and weak light environment based on the improved YOLO11s provided by an embodiment of the present application;
[0043] Figure 7 is a structural diagram of the terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0044] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0045] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0046] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0047] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0048] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0049] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0050] With reference to the accompanying drawings, a snow weak light environment insulator defect detection method, device, terminal equipment and storage medium based on improved YOLO11s provided by the present application are described in detail below.
[0051] Figure 1 A flowchart of a snow weak light environment insulator defect detection method based on improved YOLO11s is shown.
[0052] As Figure 1 shown, the snow weak light environment insulator defect detection method based on improved YOLO11s specifically includes the following steps:
[0053] S1, using a camera exposure formula to adjust the brightness of the collected first insulator image dataset to form a second insulator image dataset, the first insulator dataset being an insulator image dataset collected by a drone;
[0054] In an embodiment, the insulator image dataset from the dataset website Roboflow is screened to select insulator images actually taken by a drone to form a first insulator dataset, and then the camera exposure formula is used to adjust the brightness of the first insulator dataset to simulate insulator images taken by a drone in a snow weak light environment to form a second insulator image dataset.
[0055] S2, using an adaptive Gamma correction network to process the brightness of the second insulator image dataset to obtain a third insulator image dataset;
[0056] It should be noted that the adaptive Gamma correction network mainly adjusts the brightness and contrast of the image dynamically to enhance the clarity and details of the image in the snow weak light environment. The network calculates the average brightness of the image and adjusts the gamma value adaptively according to the target brightness value, thereby effectively suppressing the influence of low light and noise interference. The adaptive Gamma correction network can enhance the visual information of the image and restore the fine features in the image, providing a more clear and accurate input image for the subsequent SPD-YOLO11s target detection network model, thereby improving the performance and stability of target detection.
[0057] The original Gamma brightness correction formula is described as follows:
[0058]
[0059] wherein is the pixel value (range 0 to 255) of the input image, is the pixel value of the output image after Gamma correction. is the Gamma value, used to control the brightness adjustment of the image, usually will make the image dark, will make the image bright. Gamma correction adjusts the pixel values of an image non-linearly to enhance or suppress details in a certain brightness range.
[0060] The original Gamma correction has the disadvantages of fixed Gamma value, inability to adapt to complex scenes, global adjustment, and sensitivity to noise. Because it uses a fixed Gamma value and global brightness adjustment, it cannot flexibly cope with the brightness differences in different regions of the image, especially in low-light or high-noise environments, which may result in loss of image details or enhancement of noise. Therefore, adaptive Gamma correction networks have emerged, which dynamically adjust the gamma value to optimize according to the brightness and contrast changes of the image, thereby more effectively enhancing the image quality and providing a clearer and more stable input for subsequent target detection tasks.
[0061] Further, in the embodiments of the present application, the above step S2 comprises:
[0062] According to the total number of image pixels in the second insulator image data set and the pixel value of each gray image, the average brightness of the image is calculated
[0063]
[0064] wherein, is each pixel value in the gray image, and N is the total number of pixels in the image;
[0065] According to the average brightness, the Gamma value is dynamically adjusted
[0066]
[0067] wherein, is the minimum value of Gamma, is the maximum value of Gamma, is the target brightness value;
[0068] The pixel value I(i) of each image is corrected using the Gamma value to obtain a third insulator image data set; wherein,
[0069] The pixel value I(i) of each image is corrected using the Gamma value, specifically:
[0070]
[0071] wherein, is the pixel value after Gamma correction.
[0072] Through the above formula, the image brightness can be dynamically adjusted according to the original brightness of each image.
[0073] S3, introducing the SPD convolution module and the MPDIOU loss function into the YOLOv1 network to obtain an SPD-YOLOv1s target detection network model;
[0074] YOLOv1 is a single-stage target detection algorithm. YOLOv1 introduces a C3k2 mechanism, replaces the original C2f module with a C3k2 module to enhance the feature extraction capability. In addition, a C2PSA module is added after the SPPF (Spatial Pyramid Pooling Fast) module to further improve the expression capability of the model. In the decoupling head design, YOLOv1 replaces the convolution operation in the classification and detection head with a depth separable convolution, effectively reducing the parameter quantity and the calculation amount while maintaining the high performance of the model. According to the parameter quantity and the complexity, YOLOv1 has five versions, n, s, m, l, and x, which can adapt to different performance application hardware. Figure 2 As shown in FIG. 2, it is a model structure diagram of YOLOv1.
[0075] Further, in the embodiment of the present application, the above step S3 comprises:
[0076] S31, replacing all the original convolution down-sampling structures in the backbone feature extraction module of YOLOv1 with SPD convolution modules;
[0077] Lightweight design is crucial for deploying computing tasks on unmanned aerial vehicles (UAVs) because UAV platforms usually have limited computing resources, storage space, and energy supply. Complex deep learning models require a large amount of computing resources, and overly large models can cause delays, affecting real-time processing capabilities. At the same time, in the case of limited storage space, traditional models may not be able to be deployed completely, and higher energy consumption can accelerate battery depletion, affecting flight time and task completion efficiency. Lightweight design can improve system performance and resource utilization efficiency by reducing computational complexity, reducing storage requirements, and optimizing energy consumption, thereby ensuring efficient and accurate task execution on UAV platforms. Therefore, the present application introduces an SPD convolution module to replace the convolution module of the original YOLOv1 network backbone. As shown in FIG. 3, it is a structure diagram of the SPD-YOLOv1s target detection network model. Figure 3
[0078] As shown in FIG. 4, it is a schematic diagram of the SPD convolution module. The SPD convolution discards the step convolution and pooling operations widely used in traditional convolution. Considering an intermediate feature map X of any size Figure 4
[0079]
[0080] Each sub-graph size is The SPD convolution module does not lose learnable information in the down-sampling process, and also avoids the stride convolution and pooling operation, improving the performance of the model in detecting low-resolution images and small target objects.
[0081] S32, in the loss function module of the YOLO11 network, the original CIoU loss function is replaced with the MPDIoU loss function to obtain an SPD-YOLO11s target detection network model.
[0082] The SPD-YOLO11s target detection network discards the CIoU loss function used by the original YOLO11 model and introduces the MPDIoU loss function. As shown in Figure 5 , it is a calculation diagram of MPDIoU.
[0083] MPDIoU is a new type of bounding box similarity comparison measurement standard based on the minimum point distance, which directly minimizes the distance between the upper left corner and the lower right corner of the predicted bounding box and the actual labeled bounding box. MPDIoU contains all relevant factors considered in existing loss functions, i.e. overlapping or non-overlapping regions, center point distance and width-height deviation, while simplifying the calculation process.
[0084] Specifically, the calculation process of the MPDIoU loss function in the above step S32 is as follows:
[0085]
[0086]
[0087]
[0088]
[0089]
[0090] wherein, and represent the left upper corner coordinates and the right lower corner coordinates of the real frame respectively, and represent the left upper corner coordinates and the right lower corner coordinates of the predicted frame respectively, represents the distance between the upper left corner of the real frame and the upper left corner of the predicted frame, denotes the distance between the right lower corner point of the real box and the right lower corner point of the prediction box, h and w denote the width and height of the image respectively, and IoU denotes the IoU loss, A is the area of the prediction box, is the area of the real box, is the target function for minimizing the MPDIoU loss.
[0091] S4, training the SPD-YOLO11s target detection network model using the third insulator image dataset to obtain the best weight pt;
[0092] Further, in the embodiments of the present application, after the above step S4, further comprising:
[0093] S41, verifying the SPD-YOO11s target detection network model using the best weight pt.
[0094] Further, in the embodiments of the present application, the above step S41 comprises:
[0095] A preset part in the third insulator image dataset is taken as a verification set, and the verification set is input into the SPD-YOLO11s model, and the best weight pt is used for inference;
[0096] A plurality of evaluation indexes on the verification set are calculated to evaluate the performance of the model.
[0097] S5, detecting the insulator defects using the SPD-YOLO11s target detection network model with the best weight pt.
[0098] The insulator defect detection method based on the improved YOLO11s in the snow and weak light environment provided by the present application first adjusts the brightness of the collected first insulator image dataset using the camera exposure formula to form a second insulator image dataset, and the first insulator dataset is an insulator image dataset collected by a UAV. Then, the adaptive Gamma correction network is used to process the brightness of the second insulator image dataset to obtain a third insulator image dataset. The SPD convolution module and the MPDIoU loss function are introduced into the YOLO11 network to obtain the SPD-YOLO11s target detection network model. The SPD-YOLO11s target detection network model is trained using the third insulator image dataset to obtain the best weight pt. The SPD-YOLO11s target detection network model with the best weight pt is used to detect the insulator defects. The present application effectively improves the precision and stability of the insulator defect detection in the snow and weak light conditions, and provides reliable technical support for the safe operation of the power system.
[0099] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0100] The insulator defect detection method in a snow and weak light environment based on the improved YOLO11s corresponding to the above embodiment, Figure 6 The structure block diagram of the insulator defect detection device in a snow and weak light environment based on the improved YOLO11s provided by the embodiments of the present application is shown, and only the parts related to the embodiments of the present application are shown for the convenience of description.
[0101] With reference to Figure 6 The device 600 comprises:
[0102] The adjusting module 601 is configured to perform brightness adjustment on the collected first insulator image data set by using a camera exposure formula to form a second insulator image data set, and the first insulator data set is an insulator image data set collected by a UAV;
[0103] The correcting module 602 is configured to perform brightness processing on the second insulator image data set by using an adaptive Gamma correction network to obtain a third insulator image data set;
[0104] The obtaining module 603 is configured to introduce an SPD convolution module and an MPDIOU loss function into a YOLO11 network to obtain an SPD-YOLO11s target detection network model;
[0105] The training module 604 is configured to train the SPD-YOLO11s target detection network model by using the third insulator image data set to obtain an optimal weight pt;
[0106] The detection module 605 is configured to detect insulator defects by using the SPD-YOLO11s target detection network model with the optimal weight pt.
[0107] In actual use, the insulator defect detection device in a snow and weak light environment based on the improved YOLO11s provided by the embodiments of the present application can be configured in any terminal device to execute the aforementioned insulator defect detection method in a snow and weak light environment based on the improved YOLO11s.
[0108] The application provides an insulator defect detection device in a snow and weak light environment based on an improved YOLO11s, which adjusts the brightness of a first insulator image data set collected by a camera exposure formula to form a second insulator image data set, the first insulator data set is an insulator image data set collected by a UAV, then the brightness of the second insulator image data set is processed by using an adaptive Gamma correction network to obtain a third insulator image data set, an SPD convolution module and an MPDIOU loss function are introduced into the YOLO11 network to obtain an SPD-YOLO11s target detection network model, the SPD-YOLO11s target detection network model is trained by using the third insulator image data set to obtain the best weight pt, and then the SPD-YOLO11s target detection network model of pt is used to detect insulator defects. The application effectively improves the precision and stability of insulator defect detection in a snow and weak light condition, and provides reliable technical support for the safe operation of a power system.
[0109] It should be noted that the information interaction, execution process and the like between the above devices / units are based on the same concept as the method embodiments of the application, and the specific functions and the technical effects brought by the same can be referred to the method embodiments part, which will not be repeated here.
[0110] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0111] In order to realize the above-mentioned embodiments, the application further provides a terminal device.
[0112] Figure 7 The structure schematic diagram of the terminal device of one embodiment of the application.
[0113] As Figure 7 shown, the terminal device 200 includes:
[0114] The memory 210 and the at least one processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, when the processor 220 executes the program, the improved YOLO11s-based insulator defect detection method in a snowy and weak light environment is realized.
[0115] The bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, industry standard architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video electronics standards association (VESA) local bus, and peripheral component interconnect (PCI) bus.
[0116] The terminal device 200 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the terminal device 200, including volatile and nonvolatile media, removable and non-removable media.
[0117] The memory 210 can also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The terminal device 200 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 260 can be used for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 7 (not shown) is typically referred to as a "hard disk drive"). Although Figure 7 (not shown) is typically referred to as a "hard disk drive"). Although
[0118] The program / utility 280 having a set of (at least one) program modules 270, such as an operating system, one or more application programs, other program modules, and program data, can be stored in, for example, the memory 210, such as each of these examples or some combination thereof, can include implementation of a network environment. The program modules 270 generally carry out the functions and / or methodologies of embodiments described herein.
[0119] Terminal device 200 can also be in communication with one or more external devices 290 such as a keyboard, a pointing device, a display 291, etc.; one or more devices that enable a user to interact with terminal device 200; and / or any devices (e.g., network card, modem, etc.) that enable terminal device 200 to communicate with one or more other computing devices. Such communication can be facilitated by an Input / Output (I / O) interface 292. Still yet, terminal device 200 can be in communication with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter 293. As depicted, network adapter 293 communicates with the other components of terminal device 200 through bus 230. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with terminal device 200. Such as, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0120] Processor 220 performs various function applications and data processing by running programs stored in memory 210.
[0121] It should be noted that the implementation process and technical principles of the terminal device of the embodiment are referred to the foregoing explanation and description of the insulator defect detection method in snow and weak light environment based on improved YOLO11s of the embodiment of the application, which will not be repeated here.
[0122] The computer readable storage medium of the embodiment of the application also stores a computer program, and the computer program is executed by a processor to realize the steps in each method embodiment.
[0123] The computer program product of the embodiment of the application, when the computer program product is run on the terminal device, enables the terminal device to execute the steps in each method embodiment.
[0124] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer readable storage medium. The computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0125] The progressiveness of the scheme of the present application will be described below according to an embodiment.
[0126] I. Experimental environment
[0127] The experimental environment configuration is shown in Table 1.
[0128] Table 1
[0129]
[0130] II. Evaluation index
[0131] In order to objectively evaluate the experimental results, four commonly used evaluation indexes in the target detection field are selected in this paper, which are precision, recall, map@0.5 and map@0.5:0.95, and the calculation formulas are as follows:
[0132]
[0133]
[0134]
[0135]
[0136] In the target detection task, TP (true positive), FP (false positive) and FN (false negative) represent correct detection frame, false detection frame and missed detection frame, respectively.
[0137] TP: True for the true label value, and Positive for the model prediction value;
[0138] FP: False for the true label value, and Positive for the model prediction value;
[0139] FN: False for the true label value, and Negative for the model prediction value.
[0140] AP (average precision) is calculated by integrating the Precision-Recall curve, which measures the detection performance of the model. N represents the total number of classes. mAP@0.5 represents the average value of the AP of each class when the IoU threshold is set to 0.5. The higher the value of mAP@0.5, the better the detection performance of the model.
[0141] III. Experimental results
[0142] The experimental results are shown in Table 2 using the dataset Gamma to train and validate the model
[0143] Table 2
[0144]
[0145] From the above experimental results, it can be seen that the SPD-YOLO11s target detection network improves the accuracy by 1.3% and the mAP@0.5 by 1.1% compared with the original YOLO11s model. Compared with the original YOLO11s model, the FPS of SPD-YOLO11s is improved by 31.5, and the parameter quantity and GFLOPS are reduced by 1.1M and 3.1G respectively, reducing the computational overhead. Considering the computational overhead and detection accuracy, the SPD-YOLO11s model is suitable for deployment on platforms such as unmanned aerial vehicles, which are resource-constrained.
[0146] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0147] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0148] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal device and method can be implemented in other manners. For example, the embodiments of the apparatus / terminal device described above are merely schematic, and the division of the modules or units is merely logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0149] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0150] The above-described embodiments are merely used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalent replacements; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. An improved YOLO11s-based insulator defect detection method in a snowy and weak light environment, characterized by, The application relates to an insulator defect detection method and device. The application comprises the following steps: The first insulator image dataset collected by the unmanned aerial vehicle is subjected to brightness adjustment by using a camera exposure formula to form a second insulator image dataset; The second insulator image dataset is subjected to brightness processing by using an adaptive Gamma correction network to obtain a third insulator image dataset; An SPD convolution module and an MPDIOU loss function are introduced into a YOLO11 network to obtain an SPD-YOLO11s target detection network model; The SPD-YOLO11s target detection network model is trained by using the third insulator image dataset to obtain optimal weights pt; The SPD-YOLO11s target detection network model with the optimal weights pt is used to detect insulator defects; The SPD convolution module and the MPDIOU loss function are introduced into the YOLO11 network to obtain the SPD-YOLO11s target detection network model, which comprises the following steps: In a backbone feature extraction module of the YOLO11 network, all original convolution downsampling structures are replaced by SPD convolution modules; In a loss function module of the YOLO11 network, an MPDIoU loss function is used to replace an original CIoU loss function to obtain the SPD-YOLO11s target detection network model; wherein, and respectively represent the left upper corner coordinate and the right lower corner coordinate of the real box, and respectively represent the left upper corner coordinate and the right lower corner coordinate of the predicted box, d1 represents the distance between the left upper corner point of the real box and the left upper corner point of the predicted box, d2 represents the distance between the right lower corner point of the real box and the right lower corner point of the predicted box, h and w respectively represent the width and the height of the image, IoU represents the intersection over union loss, A is the area of the predicted box, A GT is the area of the real box, is the target function for minimizing the MPDIoU loss.
2. The method of claim 1, wherein, The calculation process of the MPDIoU loss function is as follows: According to the total number of image pixels in the second insulator image data set and the pixel value of each gray image, the average brightness B of the image is calculated avg : where I gray (i) is each pixel value in a grayscale image, and N is the total number of pixels in the image. The second insulator image dataset is subjected to brightness processing by using the adaptive Gamma correction network to obtain the third insulator image dataset, which comprises the following steps: where γ min is the minimum value of Gamma, γ max is the maximum value of Gamma, B target is the target brightness value; The Gamma value gamma is dynamically adjusted according to the average brightness; The pixel value I(i) of each image is corrected by using the Gamma value to obtain the third insulator image dataset; wherein, where I corrected (i) is the pixel value after Gamma correction.
3. The method of claim 1, wherein, The pixel value I(i) of each image is corrected by using the Gamma value, and the specific process is as follows: After the SPD-YOLO11s target detection network model is trained by using the third insulator image dataset to obtain the optimal weights pt, the SPD-YOLO11s target detection network model is verified by using the optimal weights pt.
4. The method of claim 3, wherein, The SPD-YOLO11s target detection network model is verified by using the optimal weights pt, which comprises the following steps: A preset part in the third insulator image dataset is taken as a verification set, the verification set is input into the SPD-YOLO11s model, and the optimal weights pt are used for reasoning; A plurality of evaluation indexes on the verification set are calculated to evaluate the performance of the model.
5. The improved YOLO11s-based insulator defect detection device in a snowy and weak light environment according to claim 1, characterized in that, The application comprises the following steps: An adjustment module is used to adjust the brightness of a first insulator image dataset collected by an unmanned aerial vehicle by using a camera exposure formula to form a second insulator image dataset; A correction module is used to process the brightness of the second insulator image dataset by using an adaptive Gamma correction network to obtain a third insulator image dataset; An obtaining module is used to introduce an SPD convolution module and an MPDIOU loss function into a YOLO11 network to obtain an SPD-YOLO11s target detection network model; a training module configured to train the SPD-YOLO11s target detection network model using a third insulator image dataset to obtain optimal weights pt; a detection module configured to detect insulator defects using the SPD-YOLO11s target detection network model with the optimal weights pt.
6. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program, when executed by the processor, implements the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Rainy day insulator defect detection method based on improved MS-PReNet and GAM-YOLOv7
CN117422689A
Power transmission line insulator detection method based on lightweight improved YOLO algorithm
CN118351420A