Strain clamp defect identification method, system, equipment and medium

By optimizing image preprocessing and lightweight network architecture, combined with pruning strategies, the problem of low defect recognition rate of tension clamps was solved, and an efficient and lightweight model suitable for resource-constrained environments was achieved.

CN120976147APending Publication Date: 2025-11-18GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511087348.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies require excessive computation, waste resources, and have a low recognition rate when identifying defects in the crimping of tension clamps, making it difficult to efficiently identify minute defects in resource-constrained environments.

Method used

Image preprocessing techniques are employed to improve the visibility of defect features. A lightweight FasterNet backbone network and GS-Detect detection head are used, combined with partial convolution, pointwise convolution and residual connections. A pruning strategy is employed to compress the model size and optimize the model architecture.

Benefits of technology

It significantly improves the recognition rate of minute defects, reduces computational complexity and memory consumption, and generates an efficient and lightweight model suitable for resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976147A_ABST
    Figure CN120976147A_ABST
Patent Text Reader

Abstract

The invention discloses a strain clamp defect identification method, system and device and a medium. The method comprises the following steps: acquiring an original strain clamp image; using a neural network architecture as a backbone network, and performing feature extraction on the preprocessed image to obtain a feature extraction result; based on a feature extraction result, optimizing a detection head part of the neural network architecture to obtain an improved model architecture; performing pruning operation on the improved model architecture, and compressing the size of the model to obtain a pruned strain clamp defect identification model; and training the pruned strain clamp defect identification model, and verifying the pruned strain clamp defect identification model by using test set data to generate a strain clamp defect identification report. According to the method, the recognition rate of tiny defects is remarkably improved, and efficient operation of the model in a resource-constrained environment is also ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image recognition, and in particular to a strain clamp defect recognition method, system, device and medium. BACKGROUND

[0002] The strain clamp compression is not in place is a very small defect, and the existing algorithm has a large amount of calculation for small defects, although it has a good recognition rate, but causes excessive waste of resources, and still has certain deficiencies. The strain clamp compression is not in place defect recognition difficulties are: (1) the compression is not in place defect in the picture is very small, it is difficult to identify the tiny defect. (2) The contrast of the defect is not obvious, and the shooting angle is not fixed. SUMMARY

[0003] In view of the above existing problems, the present application is proposed.

[0004] Therefore, the present application provides a strain clamp defect recognition method, system, device and medium to solve the problem of low defect recognition rate of the existing strain clamp defect recognition method.

[0005] To solve the above technical problems, the present application provides the following technical scheme:

[0006] In a first aspect, the present application provides a strain clamp defect recognition method, comprising:

[0007] Obtaining an original strain clamp image;

[0008] Using a neural network architecture as a backbone network to extract features from the preprocessed image to obtain a feature extraction result;

[0009] Based on the feature extraction result, the detection head part of the neural network architecture is optimized to obtain an improved model architecture;

[0010] Pruning operation is performed on the improved model architecture to compress the model size to obtain a pruned strain clamp defect recognition model;

[0011] The pruned strain clamp defect recognition model is trained and verified with test set data to generate a strain clamp defect recognition report.

[0012] As a preferred scheme of the strain clamp defect recognition method of the present application, wherein: the neural network architecture is used as a backbone network, comprising:

[0013] A partial convolution layer is introduced to perform partial convolution, and only the selected partial input channels are subjected to convolution operation;

[0014] Two pointwise convolution layers are used to expand and compress the number of channels to optimize the feature integration process;

[0015] Residual connections are used at the end of the neural network architecture to add the input feature map to the output feature map.

[0016] The beneficial effects of the preferred technical solution are that the calculation amount and model complexity are effectively reduced by introducing partial convolution, channel compression and expansion, and residual connection, while maintaining feature expression ability, improving model efficiency and training stability.

[0017] As a preferred scheme of the tension clamp defect recognition method, the two point-by-point convolution layers include a first point-by-point convolution layer and a second point-by-point convolution layer.

[0018] The first point-by-point convolution layer uses point-by-point convolution to expand the number of channels, and performs feature transformation and information aggregation in the channel dimension.

[0019] The second point-by-point convolution layer uses point-by-point convolution again to reduce the number of channels, forming an inverted residual block structure.

[0020] As a preferred scheme of the tension clamp defect recognition method, the preprocessing includes:

[0021] The initial tension clamp image is cropped;

[0022] The image is rotated and flipped;

[0023] Gamma correction is used to adjust the contrast of the image;

[0024] After completing the contrast enhancement, the image is filtered.

[0025] As a preferred scheme of the tension clamp defect recognition method, the optimization of the detection head part of the neural network architecture includes:

[0026] The input channel number is divided into a first channel group and a second channel group;

[0027] Select some channels in each group for convolution operation;

[0028] The convolved channels are spliced with the unoperated channels through shuffling.

[0029] The beneficial effects of the preferred technical solution are that the calculation amount and memory occupation are effectively reduced by grouping the input channels, selecting some channels for convolution, and using channel shuffling splicing, while maintaining the diversity of features and the expression ability of the model, improving the overall inference efficiency and lightweight level.

[0030] As a preferred scheme of the tension clamp defect recognition method, the pruning operation includes:

[0031] Calculate the importance score of each convolutional layer filter, and select the filter to be pruned according to the set proportion;

[0032] According to the pruning standard, the convolutional layers in the backbone network and the detection head part are subjected to the first structured pruning;

[0033] According to the predetermined proportion, gradually prune and prepare fine tuning after each pruning until the target compression rate is reached.

[0034] As a preferred scheme of the tension clamp defect recognition method, the tension clamp defect recognition model after pruning is trained and verified using test set data, which includes:

[0035] The tension clamp defect recognition model after pruning is trained using a learning rate;

[0036] The tension clamp defect recognition model after pruning is verified using an independent test set, the accuracy, recall rate and average precision are recorded, and a tension clamp defect recognition report is generated.

[0037] In a second aspect, the present application provides a tension clamp defect recognition system, comprising:

[0038] An acquisition module is configured to acquire an original tension clamp image;

[0039] A feature extraction module is configured to use a neural network architecture as a backbone network to extract features from the preprocessed image, and obtain a feature extraction result;

[0040] A detection head optimization module is configured to optimize the detection head part of the neural network architecture based on the feature extraction result, and obtain an improved model architecture;

[0041] A model compression module is configured to perform pruning operation on the improved model architecture, compress the model size, and obtain a tension clamp defect recognition model after pruning;

[0042] A model training and evaluation module is configured to train the tension clamp defect recognition model after pruning and verify it using test set data, and generate a tension clamp defect recognition report.

[0043] In a third aspect, the present application provides an electronic device, comprising:

[0044] A memory is configured to store programs;

[0045] A processor is configured to execute the computer executable instructions, which, when executed by the processor, implement the steps of the tension clamp defect recognition method.

[0046] In a fourth aspect, the present application provides a computer readable storage medium comprising: the program, when executed by a processor, implements the steps of the tension clamp defect identification method.

[0047] The present application has the following beneficial effects: the present application uses image preprocessing technology, including cropping, rotation, flipping, contrast enhancement and filtering processing, so that the defect features of the tension clamp are more obvious, thereby improving the recognition rate of the model for small defects; by introducing a lightweight FasterNet backbone network and GS-Detect detection head optimization, using partial convolution (PConv) and point-wise convolution (PWConv) for efficient feature extraction and information aggregation, and further optimizing feature representation through channel shuffling splicing, the calculation complexity and memory occupation are reduced, and the lightweight and efficiency of the model are realized; through the structured pruning and iterative fine-tuning strategy, the model size is gradually reduced while maintaining or improving the model performance, combined with residual connection to enhance gradient flow, ensuring the stability and recognition accuracy of the model after a large amount of compression, and finally generating a tension clamp defect recognition model that is both lightweight and efficient, suitable for actual deployment in resource-constrained environments. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. 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. Among them:

[0049] Figure 1 The basic flowchart of a tension clamp defect identification method provided by an embodiment of the present application is shown in the figure;

[0050] Figure 2 The backbone network FasterNet of a tension clamp defect identification method provided by an embodiment of the present application is shown in the figure;

[0051] Figure 3 The structure diagram of the head Detect module of a tension clamp defect identification method provided by an embodiment of the present application before and after improvement is shown in the figure. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0053] Embodiment 1, refer to Figure 1 For an embodiment of the present application, a tension clamp defect recognition method is provided, comprising:

[0054] S100: Obtain an original tension clamp image;

[0055] S200: Use a neural network architecture as a backbone network to perform feature extraction on the preprocessed image to obtain a feature extraction result;

[0056] S300: Based on the feature extraction result, optimize the detection head part of the neural network architecture to obtain an improved model architecture;

[0057] S400: Perform pruning operation on the improved model architecture to compress the model size to obtain a pruned tension clamp defect recognition model;

[0058] S500: Train the pruned tension clamp defect recognition model and verify it with test set data to generate a tension clamp defect recognition report.

[0059] It should be noted that the tension clamp compression defect recognition method faces a series of challenges during operation, mainly including image quality problems, due to the fixed shooting angle and low defect contrast, it is difficult to clearly identify the tiny compression defects; calculation resource limitation, traditional algorithm calculation amount is large and model is complex, it is difficult to efficiently run on resource limited edge device; model lightweight and performance balance problem, it is necessary to reduce the model size and calculation amount while maintaining high recognition accuracy, to ensure the effective detection of subtle defects; finally, the lack of training data and diversity problem, the defect sample is limited and diverse in actual application scene, which increases the requirement of model generalization ability. These challenges require the use of advanced preprocessing technology, lightweight network architecture and effective pruning strategy to ensure the efficiency and accuracy of the final model.

[0060] Therefore, in view of the above-mentioned problem that the existing tension clamp defect recognition method has low defect recognition rate, through the steps of S100-S500, the visibility of defect features is improved by introducing image preprocessing technology, efficient feature extraction and information aggregation are realized by using lightweight FasterNet backbone network and GS-Detect detection head optimization, and the model size and calculation complexity are greatly reduced by using structured pruning and iterative fine-tuning strategy, while maintaining high recognition accuracy. These comprehensive technical means not only significantly improve the recognition rate of tiny defects, but also ensure the efficient operation of the model in the resource limited environment, finally generate a lightweight and high performance defect recognition model suitable for tension clamp compression quality detection task in actual deployment.

[0061] Embodiment 2, refer to Figures 2-3For an embodiment of the present application, a tension clamp defect identification method is provided based on the previous embodiment, comprising:

[0062] In the embodiments of the present application, the original tension clamp image obtained in step S100 contains various states of the tension clamp, including but not limited to defects such as improper crimping.

[0063] In the embodiments of the present application, the preprocessing in step S200 includes:

[0064] cropping the initial tension clamp image;

[0065] rotating and flipping the image;

[0066] adjusting the contrast of the image using gamma correction;

[0067] filtering the image after contrast enhancement.

[0068] In the embodiments of the present application, the cropping operation includes cropping the initial tension clamp image to remove unnecessary edge parts and focus on the core area containing the tension clamp and its potential defects.

[0069] In the embodiments of the present application, the rotating and flipping operation includes rotating and flipping the image to ensure that the model can identify tension clamp defects at different angles. This step helps to increase the diversity of the data set and helps the model to learn more robust feature representation.

[0070] In the embodiments of the present application, the contrast of the image is adjusted using gamma (Gamma) correction. In this way, the contrast between the tension clamp and the background can be significantly improved, making the defect part more obvious. This is crucial for subsequent feature extraction and defect detection.

[0071] In an optional implementation, the contrast of the image in step S200 can also be adjusted by adjusting the image gray scale distribution to improve the contrast between the defect part and the background, and more accurately identify the defect of improper crimping of the tension clamp.

[0072] In another optional implementation, the contrast of the image in step S200 can also be adjusted by creating a CLAHE object and applying its apply() method to the brightness channel of the image to dynamically adjust the contrast of the local area, highlight the defect features, and identify the problem of improper crimping of the tension clamp.

[0073] In the embodiment of the present application, after the contrast enhancement is completed, the image is further filtered. The image is smoothed using Gaussian filtering to reduce noise interference, thereby highlighting potential defect features. This step helps to improve image quality and provides clearer and more accurate input for subsequent analysis.

[0074] In an alternative embodiment, the smoothing of the image in step S200 can also reduce noise in the image by taking the average value of all pixels in a pixel and its neighborhood as the new value of the pixel.

[0075] In another alternative embodiment, the smoothing of the image in step S200 can also preserve key edge details of the tension clamp defects while removing noise by adjusting the diameter, color space standard deviation and coordinate space standard deviation parameters, and performing defect recognition on the tension clamp.

[0076] In the embodiment of the present application, the neural network architecture used in step S200 includes:

[0077] A partial convolution layer is introduced to perform partial convolution, which only convolves selected input channels;

[0078] Two pointwise convolution layers are used to expand and compress the number of channels, optimizing the feature integration process;

[0079] A residual connection is used at the end of the neural network architecture to add the input feature map and the output feature map.

[0080] In the embodiment of the present application, the two pointwise convolution layers include a first pointwise convolution layer and a second pointwise convolution layer;

[0081] In the embodiment of the present application, the first pointwise convolution layer uses pointwise convolution to expand the number of channels and perform feature transformation and information aggregation in the channel dimension;

[0082] In the embodiment of the present application, the second pointwise convolution layer again uses pointwise convolution to reduce the number of channels, forming an inverted residual block structure.

[0083] In the embodiment of the present application, as shown in Figure 2 The lightweight FasterNet is used to replace the original DarkNet-53 module in the YOLOv8 algorithm to realize the lightweight of the model while ensuring the accuracy of the recognition. The idea of lightweight is that the feature quantities in different channels of the image have high similarity, and if all channels are convolved, a lot of resources will be wasted. Therefore, only a part of the channels need to be convolved, which can reduce a lot of unnecessary operations and realize the lightweight of the model and improve the feature extraction speed.

[0084] In an optional embodiment, the backbone network in step S200 can also adjust the pre-training parameters and network structure to adapt to the needs of the strain clamp defect recognition task, and perform corresponding training and optimization to ensure that the model improves the accuracy and efficiency of defect detection while maintaining lightweight.

[0085] In another optional embodiment, the backbone network in step S200 can also adjust the depth and width coefficients of EfficientNet according to the specific needs of strain clamp defect recognition to optimize model performance, and perform necessary training and pruning operations to ensure that the model remains lightweight and efficient while improving defect recognition accuracy.

[0086] In the embodiments of the present application, FasterBlock is the core building block of FasterNet, which combines partial convolution (PConv) and point-wise convolution (PWConv) to achieve efficient feature extraction and information aggregation. The following is the detailed design and function of FasterBlock:

[0087] The basic structure of FasterBlock includes a PConv layer, two PWConv layers, and a residual connection.

[0088] The PConv layer reduces redundant calculations and memory access by only performing convolution operations on a portion of the input channels. Specifically, PConv selects a portion of the channels (e.g., 1 / 4 of the channels) for convolution, while the other channels remain unchanged. PConv significantly reduces computational complexity while improving FLOPS by reducing memory access.

[0089] The two point-wise convolution (PWConv) layers are 1x1 convolutions used to perform feature transformation and information aggregation in the channel dimension, better integrating the feature information extracted by PConv into all channels. The two PWConv layers, the first PWConv layer is used to expand the number of channels, and the second PWConv layer is used to reduce the number of channels, forming an inverted residual block structure.

[0090] Residual connection is used at the end of the block to add the input feature map and the output feature map to help gradient flow and improve training stability.

[0091] In the embodiments of the present application, the detection head part of the neural network architecture (YOLOv8 algorithm) in step S300 is optimized, including:

[0092] Divide the input channel number into a first channel group c1 and a second channel group c2;

[0093] Select a portion of the channels in each group for convolution operation;

[0094] The channels after convolution are spliced with the unoperated channels through a shuffling manner.

[0095] It should be noted that the Detect module is the head detection part in the existing YOLOv8 algorithm, which is constructed by using 12 convolution kernels with a size of 3x3. The overall calculation amount is too large and the algorithm complexity is large.

[0096] In the embodiments of the present application, in order to further lighten the model, it is proposed to replace the 3x3 convolution kernel with a 1x1 convolution kernel, as shown in Figure 3 The CBL is replaced with a GSConv, and the number is also reduced. The design idea of the GSConv is to reduce the calculation amount by compressing the channel number. The channel number is divided into two halves c1 and c2. A part of the channels of the two parts is selected for convolution operation. The channels are spliced in a channel shuffling (Shuffle) manner. Through such operation, the number of convolution channels is halved, and the memory amount and calculation amount of the improved GS-Detect are halved compared with the Detect module before improvement.

[0097] In an optional embodiment, the head detection part in step S300 can also reconstruct the feature extraction process by sequentially applying deep convolution and point-by-point convolution, and adjust the network parameters according to the requirements of the strain clamp defect recognition task, and then perform training optimization, to ensure that the model reduces the calculation amount while maintaining high defect detection performance.

[0098] In another optional embodiment, the head detection part in step S300 can also dynamically adjust the channel weight by adding a global average pooling and two fully connected layers to enhance the feature expression capability, and then perform training after optimizing the network structure according to the requirements of the strain clamp defect recognition, to ensure that the model improves the accuracy and detail capturing ability while maintaining the calculation efficiency.

[0099] In the embodiments of the present application, the pruning operation in step S400 includes:

[0100] The importance scores of the filters of each convolution layer are calculated, and the filters to be pruned are selected according to a set proportion;

[0101] According to the pruning standard, the convolution layers in the backbone network and the detection head part are subjected to the first structured pruning;

[0102] The pruning is gradually performed according to a predetermined proportion, and fine tuning after each pruning is prepared until the target compression rate is reached.

[0103] In the embodiments of the present application, the importance scores (L1 norm) of the filters of each convolution layer are calculated, and a pruning proportion (for example, 50%) is set to determine which filters need to be removed. These standards will directly affect the effect of subsequent pruning and the model performance.

[0104] In the embodiments of the present application, the convolutional layers in the FasterNet backbone network and the GS-Detect module are pruned for the first time based on the defined pruning criteria. The result of this step will directly affect the effect of subsequent fine-tuning, because the pruned model may lose some accuracy and needs to be recovered through fine-tuning.

[0105] In the embodiments of the present application, a short period of fine-tuning is performed after each pruning to ensure that the model can adapt to the new architecture changes. This process is repeated until the predetermined target compression rate is reached or a significant performance drop is detected. Fine-tuning after each pruning is to minimize the performance loss caused by pruning and gradually optimize the model.

[0106] In the embodiments of the present application, the training of the pruned tension clamp defect identification model in step S500 and the verification using test set data include short-time training using a small learning rate, which aims to let the model adapt to the new structure instead of learning features from scratch, avoiding unstable training or sharp accuracy drop. The learning rate is adjusted appropriately according to the pruning amplitude to balance the model's learning ability for new structures and the preservation of existing knowledge. The model after each fine-tuning serves as the basis for the next round of pruning, forming a closed-loop optimization process that gradually approaches the balance point of lightweight and performance. Using a longer training period and a step-by-step learning rate strategy such as cosine annealing and learning rate decay, the model is allowed to fully converge. Based on the accuracy, recall rate, and average precision of the test set, the performance of the final trained model is verified.

[0107] In the embodiments of the present application, accuracy, recall rate, and average precision are commonly used to measure the performance in the field of image target detection, and are assumed to be represented by P, R, and P s respectively. There are four types of results in target detection: a positive sample is correctly predicted as a positive sample TT, a positive sample is incorrectly predicted as a negative sample TF, a negative sample is correctly predicted as a negative sample FF, and a negative sample is incorrectly predicted as a positive sample FT. The number of predicted outputs is assumed to be N TT , N TF , N FF , and N FT respectively.

[0108] The accuracy P is defined as follows, which is used to represent the proportion of correctly detected frames to all selected frames.

[0109]

[0110] The recall rate R is defined as follows, which is used to represent the proportion of correctly predicted frames to all predicted frames.

[0111]

[0112] Average accuracy P s Defined as the following formula, it is used to test the prediction accuracy of the algorithm, where P is the accuracy and R is the recall.

[0113]

[0114] Use P as The average precision across all categories is represented by the following formula, where n is the number of categories and N is the total number of categories. P as A higher value indicates better overall algorithm performance and higher recognition accuracy. Furthermore, to reflect the algorithm's computational speed Fs, the number of frames processed per second is defined as the total number of images processed per second divided by the processing time.

[0115]

[0116] This application proposes a method for identifying defects in tension clamps based on an improved YOLOv8 algorithm. The method includes image preprocessing, using rotation, Gaussian filtering, and contrast enhancement to make defects more apparent. A lighter FasterNet is used to replace DarkNet-53 as the backbone network, and a lightweight GS-Detect module is designed to replace the Detect module. Pruning is then performed to compress the model size. After training, the model is validated in practice, demonstrating significant advantages over the YOLOv8 algorithm in both defect recognition rate and model lightweighting.

[0117] Example 3, referring to Table 1, is an embodiment of the present invention. This embodiment provides a method for identifying defects in tension clamps. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through specific implementation methods and implementation effects.

[0118] The specific details of this embodiment are as follows:

[0119] This paper compares the detection performance of commonly used defect detection algorithms with SSD, YOLOv5, and RetinaNet. The same training set was used for model training, and a sufficient number of samples were selected for testing. As shown in Table 1, the proposed algorithm achieves the best accuracy and size, with an average detection precision of 92.2%, demonstrating good performance and suitability for detecting small defects. The RetinaNet algorithm offers the fastest processing speed and good accuracy, and is commonly used for defect detection. The YOLOv5 algorithm performs poorly, and its large model size makes it difficult to deploy on edge computing devices. The proposed algorithm's lightweight design, utilizing a more efficient backbone network, improves the defect recognition rate and makes it more suitable for detecting defects such as improper crimping of tension clamps. It also facilitates deployment on edge computing devices, requiring less memory and computational resources.

[0120] Table 1 Comparison table of defect detection effects of different algorithms

[0121]

[0122] Embodiment 4, which is an embodiment of the application, differs from the first embodiment in that a strain clamp defect identification system is provided.

[0123] It should be noted that the technical scheme of the strain clamp defect identification system belongs to the same concept as the technical scheme of the strain clamp defect identification method described above. The technical scheme of the strain clamp defect identification system in this embodiment is not described in detail, and the details can be referred to the description of the technical scheme of the strain clamp defect identification method.

[0124] The strain clamp defect identification system in this embodiment comprises:

[0125] The acquisition module is configured to acquire an original strain clamp image.

[0126] The feature extraction module is configured to use a neural network architecture as a backbone network to perform feature extraction on the preprocessed image to obtain a feature extraction result.

[0127] The detection head optimization module is configured to optimize the detection head part of the neural network architecture based on the feature extraction result to obtain an improved model architecture.

[0128] The model compression module is configured to perform pruning operation on the improved model architecture to compress the model size and obtain a pruned strain clamp defect identification model.

[0129] The model training and evaluation module is configured to train the pruned strain clamp defect identification model and verify it with test set data to generate a strain clamp defect identification report.

[0130] The embodiment also provides an electronic device suitable for a strain clamp defect identification method, comprising:

[0131] The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions to implement the strain clamp defect identification method as described in the above embodiment.

[0132] The embodiment also provides a storage medium having a computer program stored thereon, which is executed by a processor to implement the strain clamp defect identification method as described in the above embodiment.

[0133] The storage medium proposed in the embodiment belongs to the same inventive concept as the method for identifying defects of a tension clamp proposed in the above embodiment. Technical details not described in the embodiment can be seen from the above embodiment, and the embodiment has the same beneficial effects as the above embodiment.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH, a hard disk or an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of each embodiment of the present application.

[0135] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and all of them should be covered in the scope of the claims of the present application.

Claims

1. A method for identifying defects in a strain clamp, the method comprising: obtaining a plurality of images of the strain clamp; and identifying defects in the strain clamp based on the plurality of images. The method comprises the following steps: obtaining an original strain clamp image; using a neural network architecture as a backbone network to perform feature extraction on the preprocessed image, obtaining a feature extraction result; optimizing the detection head part of the neural network architecture based on the feature extraction result, obtaining an improved model architecture; pruning the improved model architecture to compress the model size, obtaining a pruned strain clamp defect recognition model; training the pruned strain clamp defect recognition model and verifying it with test set data to generate a strain clamp defect recognition report.

2. The dead-end anchor clamp defect recognition method of claim 1, wherein: The use of a neural network architecture as a backbone network comprises: introducing a partial convolution layer to perform partial convolution, only convolving selected input channels; using two pointwise convolution layers to expand and compress the number of channels, optimizing the feature integration process; using a residual connection at the end of the neural network architecture to add the input feature map and the output feature map.

3. The dead-end clamp defect recognition method of claim 1 or 2, wherein: The two pointwise convolution layers include a first pointwise convolution layer and a second pointwise convolution layer; The first pointwise convolution layer uses pointwise convolution to expand the number of channels and perform feature transformation and information aggregation in the channel dimension; The second pointwise convolution layer again uses pointwise convolution to reduce the number of channels, forming an inverted residual block structure.

4. The dead-end anchor clamp defect recognition method of claim 3, wherein: The preprocessing comprises: cropping the initial strain clamp image; rotating and flipping the image; using gamma correction to adjust the contrast of the image; after completing the contrast enhancement, filtering the image.

5. The dead-end anchor clamp defect recognition method of claim 4, wherein: The optimization of the detection head part of the neural network architecture comprises: dividing the input channels into a first channel group and a second channel group; selecting part of the channels in each group for convolution operation; splicing the convolved channels and the unoperated channels through shuffling.

6. The dead-end anchor clamp defect recognition method of claim 5, wherein: The pruning operation comprises: calculating the importance score of each convolution layer filter and selecting the filters to be pruned according to the set proportion; performing the first structured pruning on the convolution layers in the backbone network and the detection head part according to the pruning standard; gradually pruning according to the predetermined proportion and preparing fine tuning after each pruning until the target compression rate is reached.

7. The dead-end anchor clamp defect recognition method of claim 6, wherein: The training and verification of the pruned strain clamp defect recognition model comprises: training the pruned strain clamp defect recognition model using the learning rate; verifying the pruned strain clamp defect recognition model using an independent test set, recording the accuracy, recall rate, and average precision, and generating a strain clamp defect recognition report.

8. A system for the identification of defects in strain clamps, applying the method according to any one of claims 1 to 7, characterized in that The method comprises the following steps: an acquisition module for acquiring an original strain clamp image; a feature extraction module for using a neural network architecture as a backbone network to perform feature extraction on the preprocessed image, obtaining a feature extraction result; a detection head optimization module for optimizing the detection head part of the neural network architecture based on the feature extraction result, obtaining an improved model architecture; a model compression module for pruning the improved model architecture to compress the model size, obtaining a pruned strain clamp defect recognition model; a model training and evaluation module for training the pruned strain clamp defect recognition model and verifying it with test set data to generate a strain clamp defect recognition report.

9. An electronic device, comprising: The method comprises the following steps: a memory for storing a program; a processor for loading said program to perform the steps of the method according to any of claims 1-7.

10. A computer-readable storage medium storing a program, characterized in that, said program, when executed by a processor, implements the steps of the method according to any of claims 1-7.