Defect detection method and system based on small sample
By constructing a small-sample defect detection model and combining YOLOv8 and knowledge graph, the overfitting problem of defect diagnosis for small sample sets of power equipment was solved, and accurate detection and type identification of power equipment defects were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-27
AI Technical Summary
In the diagnosis of defects and faults in power equipment, existing technologies, such as deep learning models based on single-modal data, are prone to overfitting when diagnosing defects and faults with small sample sets, such as oil leakage, cracks, and corrosion, which affects the generalization performance.
A defect detection model based on small samples is constructed. By combining the YOLOv8 model and knowledge graph, image preprocessing, feature extraction, sample augmentation, and domain knowledge enhancement are performed. The model is trained using a joint loss function to achieve accurate detection of defects in power equipment.
It improves the detection accuracy and generalization ability of defects in small sample sets, and can accurately identify the defect types of power equipment.
Smart Images

Figure CN121746835A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and more specifically to a defect detection method and system based on small samples. Background Technology
[0002] For defect and fault assessment of substation equipment, current research focuses on developing numerous defect and fault diagnosis models based on artificial intelligence and big data analysis, utilizing single-modal data such as visible light images and videos, infrared thermal images, and acoustic fingerprint data. Deep learning algorithms have been used to train these models, but these models often require large amounts of defect data for effective training. However, diagnosing small sample sets of defects such as oil leaks, cracks, and corrosion can easily lead to overfitting and affect generalization performance. Therefore, a defect detection method and system based on small sample sizes is needed to accurately detect defects in substation equipment. Summary of the Invention
[0003] The purpose of this invention is to provide a defect detection method and system based on small samples, which can accurately detect defects in substation equipment.
[0004] To achieve the above objectives, embodiments of the present invention provide a defect detection method based on small samples, the defect detection method comprising: Construct a small-sample defect detection model for power equipment; Small sample training data on power equipment is fed into the small sample defect detection model to train the small sample defect detection model. Acquire images of the power equipment and perform image preprocessing; The preprocessed image is subjected to defect detection to detect whether there are defects in the image; If defects exist, query the type of defects present in the image; If no defect type is found in the image, the image is fed into the trained small sample defect detection model to detect the corresponding defect type.
[0005] Optionally, an image of the substation equipment is acquired and image preprocessing is performed, including: Acquire images of the substation equipment and unify the acquired images to the same size; The image after being standardized is subjected to geometric transformation so that the image can be corrected; The corrected image is then subjected to image enhancement processing to complete the image preprocessing.
[0006] Optionally, the preprocessed image is subjected to defect detection to detect whether the image has defects, including: Collect a large number of unlabeled training images of power equipment, including various defective or normal samples; The training images are subjected to sample augmentation to generate two related sample pairs; The sample pairs are fed into an encoder that uses the YOLOv8 backbone network as a feature extractor. The encoder extracts features from the sample pairs to obtain feature representations, and then maps them to a high-dimensional space through a projection head; In a high-dimensional space, the consistency between positive sample pairs in the sample pair is maximized and the similarity between negative samples is minimized by a contrastive loss function to complete the pre-training of the encoder weights.
[0007] Optionally, the preprocessed image is subjected to defect detection to detect whether the image has defects, including: Construct a YOLOv8 model and initialize the backbone network of the YOLOv8 model with the weights of the pre-trained encoder; The labeled training images are fed into the YOLOv8 model, and the set number of layers in the YOLOv8 model is frozen. The YOLOv8 model is trained using its loss function.
[0008] Optionally, the preprocessed image is subjected to defect detection to detect whether the image has defects, including: Acquire domain knowledge about the power equipment, including the type, location, size range, shape characteristics, and coexistence relationship of defects with other defects; The acquired domain knowledge about the power equipment is structured to construct a knowledge graph; After obtaining the knowledge graph, the trained YOLOv8 model is augmented using the knowledge graph to enhance the key recognition range of the YOLOv8 model. The enhanced YOLOv8 model's output is post-processed to check the reasonableness of the predicted bounding boxes, including: Determine whether the predicted bounding boxes output by the YOLOv8 model are within the typical defect area, and filter out predicted bounding boxes whose sizes do not meet the requirements. Adjust the test results based on the coexistence of defects; The preprocessed image is fed into the trained and enhanced YOLOv8 to obtain the prediction box; Obtain the overlap rate between the prediction bounding box of the post-processed YOLOv8 model and the target window of the power equipment; If the overlap rate is greater than a preset threshold, the image is determined to have a defect.
[0009] Optionally, when pre-training the encoder weights by maximizing the consistency between positive sample pairs and minimizing the similarity between negative samples using a contrastive loss function, and when training and jointly training the YOLOv8 model using its loss function, the loss function used is a joint loss function, which is:
[0010] Among them, L union It is a joint training function; α and β These are the weights of the contrastive loss function and the YOLOv8 loss function, respectively; when α =0 and β When ≠0, it is the YOLOv8 loss function. L YOLO ;when β =0 and α When ≠0, it is a contrastive loss function. L con ;when α ≠0 and β When ≠0, it is the joint loss function. L union .
[0011] Optionally, query the types of defects present in the image, including: Obtain the prediction bounding box of the YOLOv8 model; The prediction box is segmented to obtain multiple image blocks, and each image block is expanded into a column vector along the rows to concatenate the image blocks into a detection matrix; The defect images in the defect library are expanded into a row vector at any three positions along the column, thus obtaining three row vectors; The three row vectors of the defective image are multiplied by the detection matrix to obtain the corresponding similarity scores, and the mean of the similarity scores is calculated. After obtaining the mean similarity, determine whether the mean is greater than a preset threshold; If the defect type is greater than a preset threshold, the defect type of the corresponding defect image is determined as the defect type of the corresponding prediction box, which is the defect type of the corresponding image.
[0012] Optionally, query the types of defects present in the image, including: If the value is not greater than a preset threshold, it is determined that the prediction box did not find the corresponding defect type.
[0013] On the other hand, the present invention also provides a defect detection system based on small samples, the defect detection system comprising: The image acquisition module is used to acquire images of the substation equipment; The defect detection module is used to perform a small-sample-based defect detection method as described above based on the acquired images.
[0014] Through the above technical solution, this invention provides a small-sample defect detection method and system. By constructing a small-sample defect detection model for substation equipment, small-sample training data about the substation equipment can be fed into the small-sample defect detection model for training. Images of the substation equipment can then be acquired and preprocessed. After preprocessing, the preprocessed images can be subjected to defect detection to determine if defects exist. If defects are found, the defect type in the image is queried. If no defect type is found, the image is fed into the trained small-sample defect detection model to detect the corresponding defect type. This defect detection method can accurately detect defects in substation equipment.
[0015] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a small-sample-based defect detection method according to an embodiment of the present invention; Figure 2 This is a flowchart of the preprocessing of a small-sample-based defect detection method according to an embodiment of the present invention; Figure 3 This is a flowchart of the training encoder for a small-sample-based defect detection method according to an embodiment of the present invention; Figure 4 This is a flowchart of training a YOLOv8 model for a small-sample-based defect detection method according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating the determination of a defect based on a small sample defect detection method according to an embodiment of the present invention. Figure 6This is a flowchart illustrating the determination of defect types using a small-sample-based defect detection method according to an embodiment of the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0018] In the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.
[0019] Figure 1 This is a flowchart of a small-sample-based defect detection method according to an embodiment of the present invention. In this invention, the defect detection process may include: In step S1, a small-sample defect detection model for power equipment is constructed.
[0020] In step S2, small sample training data on the power equipment is fed into the small sample defect detection model to train the small sample defect detection model.
[0021] In step S3, images of the power equipment are acquired and image preprocessing is performed.
[0022] In step S4, the preprocessed image is subjected to defect detection to detect whether there are defects in the image.
[0023] In step S5, if defects exist, the type of defect present in the image is queried.
[0024] In step S6, if no defect type is found in the image, the image is fed into the trained small sample defect detection model to detect the corresponding defect type.
[0025] In this invention, during defect detection, a small-sample defect detection model for substation equipment can be constructed. Small-sample training data for the substation equipment can then be fed into this model for training. Images of the substation equipment can then be acquired and preprocessed. After preprocessing, the preprocessed images can be subjected to defect detection to determine if defects exist. If defects are found, the defect type in the image is queried. If no defect type is found, the image is fed into the trained small-sample defect detection model to detect the corresponding defect type. This defect detection method can accurately detect defects in substation equipment.
[0026] In one embodiment of the present invention, such as Figure 2 As shown, the preprocessing flow may include: In step S7, images of the power equipment are acquired and the acquired images are standardized to the same size.
[0027] In step S8, the image after being standardized is geometrically transformed so that the image can be corrected.
[0028] In step S9, the corrected image is subjected to image enhancement processing to complete the image preprocessing.
[0029] In this invention, during preprocessing, images of the power equipment can be acquired and standardized to the same size. Then, geometric transformations can be performed on the standardized images to correct them. Finally, image enhancement processing is applied to the corrected images, thus completing the image preprocessing.
[0030] In one embodiment of the present invention, such as Figure 3 As shown, the process of training the encoder may include: In step S10, a large number of unlabeled training images of substation equipment are collected. The training images include various defective or normal samples.
[0031] In step S11, the training images are subjected to sample augmentation processing to generate two related sample pairs.
[0032] In step S12, the sample pairs are fed into the encoder, which uses the YOLOv8 backbone network as the feature extractor.
[0033] In step S13, the encoder extracts features from the sample pairs to obtain feature representations, which are then mapped to a high-dimensional space by the projection head.
[0034] In step S14, the consistency between positive sample pairs and the similarity between negative samples are maximized by the contrastive loss function in the high-dimensional space to complete the pre-training of the encoder weights.
[0035] In this invention, during encoder pre-training, a large number of unlabeled training images of substation equipment can be collected, which may include various defective or normal samples. The training images can be augmented to generate two related sample pairs. These sample pairs can then be fed into an encoder using a YOLOv8 backbone network as a feature extractor. The encoder can extract features from the sample pairs to obtain feature representations, which can then be mapped to a high-dimensional space via a projection head. In the high-dimensional space, a contrastive loss function can be used to maximize the consistency between positive sample pairs and minimize the similarity between negative samples, thus completing the pre-training of the encoder weights.
[0036] In one embodiment of the present invention, such as Figure 4 As shown, the process of training a YOLOv8 model may include: In step S15, a YOLOv8 model is constructed, and the backbone network of the YOLOv8 model is initialized with the weights of the pre-trained encoder.
[0037] In step S16, the labeled training images are fed into the YOLOv8 model, and the set number of layers in the YOLOv8 model is frozen.
[0038] In step S17, the YOLOv8 model is trained using its loss function.
[0039] In this invention, a YOLOv8 model can be constructed, and its backbone network can be initialized with the weights of a pre-trained encoder. Labeled training images can then be fed into the YOLOv8 model, and the set number of layers can be frozen. Finally, the model can be trained using its loss function.
[0040] In one embodiment of the present invention, such as Figure 5 As shown, the process for identifying defects may include: In step S18, domain knowledge about the power equipment is acquired, including the type, location, size range, shape characteristics, and coexistence relationship of defects with other defects.
[0041] In step S19, the acquired domain knowledge about power equipment is structured to construct a knowledge graph.
[0042] In step S20, after obtaining the knowledge graph, the trained YOLOv8 model is augmented using the knowledge graph to enhance the key recognition range of the YOLOv8 model.
[0043] In step S21, the output of the enhanced YOLOv8 model is post-processed to check the reasonableness of the predicted bounding boxes output by the YOLOv8 model, including: Determine whether the predicted bounding boxes output by the YOLOv8 model are within the typical defect area, and filter out predicted bounding boxes whose sizes do not meet the requirements. Adjust the test results based on the coexistence of defects; In step S22, the preprocessed image is fed into the trained and enhanced YOLOv8 to obtain the prediction box.
[0044] In step S23, the overlap rate between the prediction box of the post-processed YOLOv8 model and the target window of the power equipment is obtained.
[0045] In step S24, if the overlap rate is greater than a preset threshold, it is determined that the image has a defect.
[0046] In this invention, when a defect is determined to exist, domain knowledge about the substation equipment can be acquired. This domain knowledge can include the type, location, size range, shape features, and coexistence relationship of the defect with other defects. The acquired domain knowledge about the substation equipment can be structured to construct a knowledge graph. After acquiring the knowledge graph, data augmentation processing can be performed on the trained YOLOv8 model to enhance its key recognition range. The output of the augmented YOLOv8 model can be post-processed to check the rationality of the predicted bounding boxes output by the YOLOv8 model, including: determining whether the predicted bounding boxes output by the YOLOv8 model are within typical defect areas and filtering predicted bounding boxes whose sizes do not meet the requirements; adjusting the detection results according to the coexistence relationship of defects. Then, the pre-processed image can be fed into the trained and augmented YOLOv8 to obtain predicted bounding boxes. After obtaining the predicted bounding boxes, the overlap rate between the predicted bounding boxes of the post-processed YOLOv8 model and the target window of the substation equipment can be obtained. If the overlap rate is greater than a preset threshold, it can be determined that the image has a defect.
[0047] In one embodiment of the present invention, when pre-training the encoder weights by maximizing the consistency between positive sample pairs and minimizing the similarity between negative samples using a contrastive loss function, and training and jointly training the encoder using the loss function of the YOLOv8 model, the loss function used can be a joint loss function, which is:
[0048] Among them, L union It is a joint training function; α and β These are the weights of the contrastive loss function and the YOLOv8 loss function, respectively; when α =0 and β When ≠0, it is the YOLOv8 loss function. L YOLO ;when β =0 and α When ≠0, it is a contrastive loss function. L con ;when α ≠0 and β When ≠0, it is the joint loss function. L union .
[0049] In one embodiment of the present invention, such as Figure 6 As shown, the process for determining the defect type may include: In step S25, the predicted bounding boxes of the YOLOv8 model are obtained.
[0050] In step S26, the prediction box is segmented to obtain multiple image blocks, and each image block is expanded into a column vector along the rows to concatenate the image blocks into a detection matrix.
[0051] In step S27, the defect images in the defect library are expanded into a row vector at any three positions along the column, thus obtaining three row vectors.
[0052] In step S28, the three row vectors of the defect image are multiplied by the detection matrix to obtain the corresponding similarity, and the mean of the similarity is calculated.
[0053] In step S29, after obtaining the mean similarity, it is determined whether the mean is greater than a preset threshold.
[0054] In step S30, if the defect type is greater than a preset threshold, the defect type of the corresponding defect image is determined as the defect type of the corresponding prediction box, which is the defect type of the corresponding image.
[0055] In this invention, when determining the defect type, the predicted bounding box of the YOLOv8 model can be obtained. This bounding box can then be segmented into multiple image patches, and each patch can be expanded along its rows into a column vector. These image patches are then concatenated into a detection matrix. Defect images from the defect database can be expanded along any three columns into row vectors, resulting in three row vectors. These three row vectors are then multiplied by the detection matrix to obtain their respective similarities, and the mean of these similarities is calculated. After obtaining the mean similarity, it can be determined whether the mean is greater than a preset threshold. If it is greater than the preset threshold, the defect type of the corresponding defect image can be determined as the defect type of the corresponding predicted bounding box, which is also the defect type of the corresponding image.
[0056] In one embodiment of the present invention, such as Figure 6 As shown, in step S31, if the value is not greater than a preset threshold, it can be determined that the predicted box has not found the corresponding defect type. Therefore, the predicted box needs to be fed into the trained small-sample defect detection model to detect the corresponding defect type.
[0057] On the other hand, the present invention can also provide a small-sample-based defect detection system, the defect detection system comprising: an image acquisition module and a defect detection module. The image acquisition module can be used to acquire images of the substation equipment. The defect detection module can be used to execute a small-sample-based defect detection method as described above based on the acquired images.
[0058] Through the above technical solution, this invention provides a small-sample defect detection method and system. By constructing a small-sample defect detection model for substation equipment, small-sample training data about the substation equipment can be fed into the small-sample defect detection model for training. Images of the substation equipment can then be acquired and preprocessed. After preprocessing, the preprocessed images can be subjected to defect detection to determine if defects exist. If defects are found, the defect type in the image is queried. If no defect type is found, the image is fed into the trained small-sample defect detection model to detect the corresponding defect type. This defect detection method can accurately detect defects in substation equipment.
[0059] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0060] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0061] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0062] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0063] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0064] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0065] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0066] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0067] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A defect detection method based on small samples, characterized in that, The defect detection method includes: Construct a small-sample defect detection model for power equipment; Small sample training data on power equipment is fed into the small sample defect detection model to train the small sample defect detection model. Acquire images of the power equipment and perform image preprocessing; The preprocessed image is subjected to defect detection to detect whether there are defects in the image; If defects exist, query the type of defects present in the image; If no defect type is found in the image, the image is fed into the trained small sample defect detection model to detect the corresponding defect type.
2. The defect detection method according to claim 1, characterized in that, Acquire images of the power equipment and perform image preprocessing, including: Acquire images of the substation equipment and unify the acquired images to the same size; The image after being standardized is subjected to geometric transformation so that the image can be corrected; The corrected image is then subjected to image enhancement processing to complete the image preprocessing.
3. The defect detection method according to claim 1, characterized in that, The preprocessed image is subjected to defect detection to detect whether the image has defects, including: Collect a large number of unlabeled training images of power equipment, including various defective or normal samples; The training images are subjected to sample augmentation to generate two related sample pairs; The sample pairs are fed into an encoder that uses the YOLOv8 backbone network as a feature extractor. The encoder extracts features from the sample pairs to obtain feature representations, and then maps them to a high-dimensional space through a projection head; In a high-dimensional space, the consistency between positive sample pairs in the sample pair is maximized and the similarity between negative samples is minimized by a contrastive loss function to complete the pre-training of the encoder weights.
4. The defect detection method according to claim 3, characterized in that, The preprocessed image is subjected to defect detection to detect whether the image has defects, including: Construct a YOLOv8 model and initialize the backbone network of the YOLOv8 model with the weights of the pre-trained encoder; The labeled training images are fed into the YOLOv8 model, and the set number of layers in the YOLOv8 model is frozen. The YOLOv8 model is trained using its loss function.
5. The defect detection method according to claim 4, characterized in that, The preprocessed image is subjected to defect detection to detect whether the image has defects, including: Acquire domain knowledge about the power equipment, including the type, location, size range, shape characteristics, and coexistence relationship of defects with other defects; The acquired domain knowledge about the power equipment is structured to construct a knowledge graph; After obtaining the knowledge graph, the trained YOLOv8 model is augmented using the knowledge graph to enhance the key recognition range of the YOLOv8 model. The enhanced YOLOv8 model's output is post-processed to check the reasonableness of the predicted bounding boxes, including: Determine whether the predicted bounding boxes output by the YOLOv8 model are within the typical defect area, and filter out predicted bounding boxes whose sizes do not meet the requirements. Adjust the test results based on the coexistence of defects; The preprocessed image is fed into the trained and enhanced YOLOv8 to obtain the prediction box; Obtain the overlap rate between the prediction bounding box of the post-processed YOLOv8 model and the target window of the power equipment; If the overlap rate is greater than a preset threshold, the image is determined to have a defect.
6. The defect detection method according to claim 5, characterized in that, When pre-training the encoder weights by maximizing the consistency between positive sample pairs and minimizing the similarity between negative samples using a contrastive loss function, and when training and jointly training the YOLOv8 model using its loss function, the loss function used is a joint loss function, which is: Among them, L union It is a joint training function; α and β These are the weights of the contrastive loss function and the YOLOv8 loss function, respectively; when α =0 and β When ≠0, it is the YOLOv8 loss function. L YOLO ;when β =0 and α When ≠0, it is a contrastive loss function. L con ;when α ≠0 and β When ≠0, it is the joint loss function. L union .
7. The defect detection method according to claim 5, characterized in that, The types of defects present in the image can be queried, including: Obtain the prediction bounding box of the YOLOv8 model; The prediction box is segmented to obtain multiple image blocks, and each image block is expanded into a column vector along the rows to concatenate the image blocks into a detection matrix; The defect images in the defect library are expanded into a row vector at any three positions along the column, thus obtaining three row vectors; The three row vectors of the defective image are multiplied by the detection matrix to obtain the corresponding similarity scores, and the mean of the similarity scores is calculated. After obtaining the mean similarity, determine whether the mean is greater than a preset threshold; If the defect type is greater than a preset threshold, the defect type of the corresponding defect image is determined as the defect type of the corresponding prediction box, which is the defect type of the corresponding image.
8. The defect detection method according to claim 5, characterized in that, The types of defects present in the image can be queried, including: If the value is not greater than a preset threshold, it is determined that the prediction box did not find the corresponding defect type.
9. A defect detection system based on small samples, characterized in that, The defect detection system includes: The image acquisition module is used to acquire images of the substation equipment; The defect detection module is used to perform a small-sample-based defect detection method as described in any one of claims 1-8 based on the acquired image.