A processing control method and system of a current transformer
By using an improved YOLOv8 model to inspect the welding quality of current transformers, the problems of low efficiency and misjudgment/missed detection in manual inspection have been solved, achieving efficient and accurate automated inspection, thus improving production efficiency and product quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 滁州航佑电气有限公司
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-23
AI Technical Summary
The current current transformer manufacturing process suffers from low welding quality inspection efficiency and is easily affected by human experience, leading to misjudgments and missed inspections, which affects product quality and production efficiency.
An improved YOLOv8 model is used for welding quality inspection. A dual-branch downsampling module preserves fine-grained features, a hybrid attention module suppresses background interference, a small target detection head is added, and the WIoU loss function is combined to optimize bounding box regression, thereby achieving automated image recognition.
It significantly improves the efficiency and accuracy of welding quality inspection, reduces reliance on manual labor, lowers the rate of misjudgment and missed detection, and improves production efficiency and product quality stability.
Smart Images

Figure CN122265175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision inspection technology, specifically to a processing control method and system for current transformers. Background Technology
[0002] Current transformers, as crucial components in power systems for current measurement and protection, require high-quality welding during their manufacturing process. The welding area typically connects conductors, coil leads, or terminal structures. Problems with welding quality, such as incomplete welds, missing welds, cracks, or holes, can lead to increased contact resistance, unstable signal transmission, and even overheating or loosening during long-term operation, thus affecting the measurement accuracy and operational reliability of the current transformer. Therefore, quality inspection of the welding area is a critical step in ensuring product quality during current transformer manufacturing.
[0003] In existing production processes, preliminary inspection of welding quality often relies on manual visual inspection, depending on inspectors who visually assess the appearance of solder joints, judging solder distribution, joint morphology, and surface defects. This method has significant limitations in actual production, such as low inspection efficiency, high susceptibility to operator experience, and the potential for visual fatigue under prolonged repetitive inspection tasks, leading to misjudgments or missed detections and allowing defective products to enter subsequent processing stages. If welding problems are only discovered during later quality or functional testing, products that have already undergone multiple processing steps often need to be disassembled or reworked, significantly reducing production efficiency. Summary of the Invention
[0004] The purpose of this invention is to solve the problems mentioned in the background art, such as low efficiency of manual inspection and easy misjudgment or omission due to fatigue, and to propose a processing control method for current transformers.
[0005] A first aspect of the present invention provides a method for controlling the fabrication of a current transformer, the method comprising: Image acquisition is performed on the welding area of the current transformer to obtain welding images; The welding image is preprocessed to obtain the target image; The target image is input into a pre-trained defect detection model to obtain defect detection results. The defect detection model is an improvement based on the YOLOv8 model, which includes: retaining the first CBS module in the backbone network and replacing the remaining CBS modules with a preset dual-branch downsampling module to retain fine-grained features while downsampling; inserting a preset hybrid attention module after the SPPF module in the backbone network to suppress invalid background and enhance defect features; replacing the C2f module in the neck network with a preset C2fGhost module to reduce computational redundancy; and adding a small target detection head to improve the robustness of small target defect detection. Based on the defect detection results, determine whether rework is necessary.
[0006] By implementing this technical solution, efficient and automated inspection of the welding quality of current transformers has been achieved, significantly improving inspection efficiency and accuracy, reducing reliance on manual labor, and thus increasing production efficiency.
[0007] Optionally, the preprocessing of the welding image to obtain the target image includes: The welding image is subjected to Gaussian filtering to obtain a denoised image; The denoised image is converted to the YCrCb color space, histogram equalization is performed on the Y channel, the CrCb channel is kept unchanged, and it is converted back to the RGB color space to obtain a contrast-enhanced image. The contrast-enhanced image is resized and normalized to obtain the target image.
[0008] By implementing this technical solution, image noise can be effectively removed and the contrast of defect areas can be enhanced, making defect features more prominent. This provides high-quality input images for subsequent model recognition, improving the robustness and accuracy of detection.
[0009] Optionally, the operation process of the dual-branch downsampling module includes: The input feature map X1 is divided equally along the channel dimension to obtain two feature maps X2 and X3; For feature map X2, we downsample it using max pooling with a window size of 3×3 and a stride of 2 to obtain feature map X4; then we extract features and expand channels using 1×1 convolution to obtain feature map X5. For feature map X3, it is split in the spatial dimension with a stride of 2 to obtain four non-overlapping feature maps UL, UR, LL, and LR; feature maps UL, UR, LL, and LR are concatenated along the channel dimension to obtain feature map X6; then feature extraction and channel dimensionality reduction are performed through 1×1 convolution to obtain feature map X7. Feature maps X5 and X7 are concatenated along the channel dimension to obtain feature map X8, which is then output.
[0010] By implementing this technical solution, more fine-grained information can be retained during feature extraction, enhancing the ability to perceive minute defects and improving the accuracy of model detection.
[0011] Optionally, the computation process of the hybrid attention module includes: For the input feature map Y1, channel attention and spatial attention mechanisms are used in parallel to enhance it, resulting in feature maps Y2 and Y3. For feature maps Y2 and Y3, 1×1 convolution is used to compress them into single-channel feature maps, and global average pooling is used to obtain their respective attention scores. The attention scores are normalized using the softmax function to obtain weighting coefficients. Based on the weighting coefficients, feature maps Y2 and Y3 are weighted and fused to obtain feature map Y4, and Y4 is output.
[0012] By implementing this technical solution, feature enhancement in both channel and spatial dimensions was achieved, effectively suppressing background interference, highlighting defect areas, and improving the model's attention to and recognition accuracy of key defect features.
[0013] Optionally, during model training, the WIoU loss function is used as the bounding box regression loss for the detector head; the calculation formula for the WIoU loss function is: ; Where IoU is the intersection-over-union ratio of the predicted box and the ground truth box; d is the Euclidean distance between the centers of the predicted box and the ground truth box; c is the diagonal length of the minimum bounding box of the predicted box and the ground truth box; and r is the aspect ratio difference between the predicted box and the ground truth box. and It is the weighting coefficient.
[0014] By implementing this technical solution, the overlap, center offset, scale difference, and shape matching between the predicted and actual bounding boxes are comprehensively considered, thereby optimizing the bounding box regression accuracy and improving the accuracy of defect localization.
[0015] A second aspect of the present invention provides a processing control system for a current transformer, the system comprising: The image acquisition module is used to acquire images of the welding area of the current transformer and obtain welding images; The preprocessing module is used to preprocess the welding image to obtain the target image; A quality detection module is used to input the target image into a pre-trained defect detection model to obtain defect detection results. The defect detection model is an improvement based on the YOLOv8 model, which includes: retaining the first CBS module in the backbone network and replacing the remaining CBS modules with a preset dual-branch downsampling module to retain fine-grained features while downsampling; inserting a preset hybrid attention module after the SPPF module of the backbone network to suppress invalid background and enhance defect features; replacing the C2f module of the neck network with a preset C2fGhost module to reduce computational redundancy; and adding a small target detection head to improve the robustness of small target defect detection. The process control module is used to determine whether rework is required based on the defect detection results.
[0016] Optionally, the preprocessing module includes: The denoising module is used to perform Gaussian filtering on the welding image to obtain a denoised image; The enhancement module is used to convert the denoised image to the YCrCb color space, perform histogram equalization on the Y channel, keep the CrCb channel unchanged, and convert it back to the RGB color space to obtain a contrast-enhanced image. An adaptation module is used to resize and normalize the contrast-enhanced image to obtain the target image.
[0017] Optionally, the operation process of the dual-branch downsampling module includes: The input feature map X1 is divided equally along the channel dimension to obtain two feature maps X2 and X3; For feature map X2, we downsample it using max pooling with a window size of 3×3 and a stride of 2 to obtain feature map X4; then we extract features and expand channels using 1×1 convolution to obtain feature map X5. For feature map X3, it is split in the spatial dimension with a stride of 2 to obtain four non-overlapping feature maps UL, UR, LL, and LR; feature maps UL, UR, LL, and LR are concatenated along the channel dimension to obtain feature map X6; then feature extraction and channel dimensionality reduction are performed through 1×1 convolution to obtain feature map X7. Feature maps X5 and X7 are concatenated along the channel dimension to obtain feature map X8, which is then output.
[0018] Optionally, the computation process of the hybrid attention module includes: For the input feature map Y1, channel attention and spatial attention mechanisms are used in parallel to enhance it, resulting in feature maps Y2 and Y3. For feature maps Y2 and Y3, 1×1 convolution is used to compress them into single-channel feature maps, and global average pooling is used to obtain their respective attention scores. The attention scores are normalized using the softmax function to obtain weighting coefficients. Based on the weighting coefficients, feature maps Y2 and Y3 are weighted and fused to obtain feature map Y4, and Y4 is output.
[0019] Optionally, during model training, the WIoU loss function is used as the bounding box regression loss for the detector head; the calculation formula for the WIoU loss function is: ; Where IoU is the intersection-over-union ratio of the predicted box and the ground truth box; d is the Euclidean distance between the centers of the predicted box and the ground truth box; c is the diagonal length of the minimum bounding box of the predicted box and the ground truth box; and r is the aspect ratio difference between the predicted box and the ground truth box. and It is the weighting coefficient. Attached Figure Description
[0020] Figure 1 A flowchart of a processing control method for a current transformer provided in an embodiment of the present invention; Figure 2 This is a diagram of the original network architecture of YOLOv8 provided in an embodiment of the present invention; Figure 3 This is a network architecture diagram of a defect detection model provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a dual-branch downsampling module provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a hybrid attention module provided in an embodiment of the present invention; Figure 6 This is an architecture diagram of a current transformer processing control system provided in an embodiment of the present invention. Detailed Implementation
[0021] To further illustrate the technical means and effects of the present invention in achieving the intended purpose, the following detailed description of the specific implementation methods, structures, features and effects of the present invention is provided in conjunction with the accompanying drawings and preferred embodiments.
[0022] This invention provides a method for controlling the fabrication of a current transformer. See also... Figure 1 , Figure 1 A flowchart illustrating a manufacturing control method for a current transformer according to an embodiment of the present invention. The method includes the following steps: S101, image acquisition is performed on the welding area of the current transformer to obtain welding images.
[0023] S102, preprocess the welding image to obtain the target image.
[0024] S103: Input the target image into the pre-trained defect detection model to obtain the defect detection result.
[0025] S104. Based on the defect detection results, determine whether rework is necessary.
[0026] The present invention provides a processing control method for current transformers, which, by introducing automated image recognition and intelligent detection technology, achieves efficient detection of welding quality in current transformers. Compared with traditional manual visual inspection, this method significantly improves inspection efficiency, reduces reliance on the experience of inspection personnel, and avoids misjudgments or missed inspections caused by visual fatigue from prolonged operation. Simultaneously, it facilitates the timely identification of products with welding defects in the early stages of production, preventing defective products from entering subsequent processing stages, thereby reducing rework costs and improving product quality stability.
[0027] In one embodiment, preprocessing includes: Step one: Perform Gaussian filtering on the welding image to obtain a denoised image. By performing Gaussian filtering on the welding image, random noise caused by sensor noise or changes in ambient light during image acquisition can be effectively removed, thereby improving the smoothness of the image.
[0028] Step two involves converting the denoised image to the YCrCb color space, performing histogram equalization on the Y channel while keeping the CrCb channel unchanged, and then converting it back to the RGB color space to obtain a contrast-enhanced image. Performing histogram equalization only on the Y channel (luminance channel) enhances image contrast without altering color information, highlighting the visual features of welding defects (such as incomplete welds, cracks, and porosity) and improving the distinguishability of these defects.
[0029] Step 3: Resize and normalize the contrast-enhanced image to obtain the target image.
[0030] In one embodiment, the defect detection model (denoted as DAH-YOLO) is an improvement upon the YOLOv8 model, used for the identification and classification of welding images. See also Figure 2 , Figure 2This is a diagram of the original network architecture of a YOLOv8 model provided in an embodiment of the present invention. The model consists of a backbone network, a neck network, and a head. The backbone network is used for feature extraction, the neck network for feature fusion, and the head for target recognition and classification. Modules such as CBS, C2f, SPPF, Upsample, Concat, and Detect are original components of the YOLOv8 model and are well-known to those skilled in the art; therefore, they will not be described in detail here.
[0031] See Figure 3 , Figure 3 This is a network architecture diagram of a defect detection model provided in an embodiment of the present invention. Compared with the original YOLOv8 model, it has the following improvements.
[0032] 1. A dual-branch downsampling module (Ddown) is proposed. See [link / reference]. Figure 4 , Figure 4 This is a schematic diagram of a dual-branch downsampling module provided in an embodiment of the present invention. In the diagram, Split represents channel splitting, MaxPool represents max pooling, 1×1Conv represents a 1×1 convolutional layer; Divide represents spatial partitioning; and Concat represents channel concatenation. The operation process of this module includes: Step 1, input feature map X1 ( Divide the channel along its dimension into two feature maps, X2 and X3. ).
[0033] Step 2: For feature map X2, downsampling is performed using max pooling with a window size of 3×3 and a stride of 2 to obtain feature map X4. Then, feature extraction and channel expansion are performed using 1×1 convolution to obtain feature map X5. ).
[0034] Step 3: For feature map X3, divide it in the spatial dimension with a step size of 2 to obtain four non-overlapping feature maps: UL (top left), UR (top right), LL (bottom left), and LR (bottom right). That is, with a window size of 2×2, slide the window with a step size of 2, and take the full channel of each position of the window to form a feature map; The feature maps UL, UR, LL, and LR are concatenated along the channel dimensions to obtain feature map X6. Then, feature extraction and channel dimensionality reduction are performed using 1×1 convolution to obtain feature map X7 ( ); ).
[0035] Step 4: Concatenate feature maps X5 and X7 along the channel dimension to obtain feature map X8. ), output X8.
[0036] Traditional downsampling tends to lose details of small targets or minor defects. However, the dual-branch downsampling module proposed in this embodiment can effectively preserve local detail features and improve the sensitivity to defects such as minor cracks and holes through spatial segmentation and feature fusion.
[0037] In one implementation, the first CBS module in the backbone network is retained, and the remaining CBS modules are replaced with this dual-branch downsampling module, which can retain fine-grained features while downsampling.
[0038] 2. A Hybrid Attention Module (HAM) is proposed. See [link / reference] Figure 5 , Figure 5 This is a schematic diagram of a hybrid attention module provided in an embodiment of the present invention. In the diagram, GAP represents global average pooling, FC represents a fully connected layer, Sigmoid is an activation function; Mul represents element-wise multiplication, CMax represents channel-wise max pooling, CAvg represents channel-wise average pooling, 7×7Conv represents a 7×7 convolutional layer, Softmax is a normalization function, and Add represents element-wise addition. The operation process of this module includes: Step 1: For the input feature map Y1, channel attention and spatial attention mechanisms are used in parallel to enhance it, resulting in feature maps Y2 and Y3.
[0039] Step 2: For feature maps Y2 and Y3, 1×1 convolution is used to compress them into single-channel feature maps, and global average pooling is used to obtain their corresponding attention scores S2 and S3. The attention scores are then normalized using the softmax function to obtain weighting coefficients T2 and T3. .
[0040] Step 3: Based on the weighting coefficients, the feature maps Y2 and Y3 are weighted and fused to obtain feature map Y4, and Y4 is output.
[0041] In one implementation, the channel attention enhancement process includes: first, performing global average pooling on the input feature map to obtain channel descriptors; then, inputting the channel descriptors into two fully connected layers and obtaining channel weights through the sigmoid function; and finally, multiplying the channel weights by the input feature map to obtain a channel attention-enhanced feature map.
[0042] In one implementation, the spatial attention enhancement process includes: first, performing average pooling and max pooling in parallel along the channel dimension on the input feature map to obtain two single-channel feature maps; concatenating the two single-channel feature maps and inputting them into a 7×7 convolutional layer, and obtaining spatial weights through the Sigmoid function; multiplying the spatial weights with the input feature map to obtain the spatial attention-enhanced feature map.
[0043] The hybrid attention module proposed in this embodiment introduces both channel attention and spatial attention mechanisms simultaneously, adaptively highlighting key channels and important spatial regions. This makes the network pay more attention to the salient features of welding defects. After weighted fusion, the two mechanisms enhance the feature representation ability and reduce the impact of background interference on the detection results, thereby effectively improving the recognition accuracy and robustness of welding defects such as microcracks and porosity.
[0044] In one implementation, the hybrid attention module is inserted after the SPPF module of the backbone network to suppress invalid background and enhance defect features.
[0045] 3. Add a small target detection head. The original detection head of the YOLOv8 model has three detection heads, which process feature maps of different sizes (20*20, 40*40, and 80*80). In addition to these three detection heads, a small target detection head is added. See [link to relevant documentation]. Figure 3 The part within the dashed box is detected by performing target detection on a higher resolution feature map (e.g., 160*160), thereby preserving more detailed information, improving the model's ability to detect small defects, and significantly improving the detection accuracy and robustness of small targets.
[0046] 4. Replace the C2f module in the neck network with the C2fGhost module. The original C2f module consists of a standard convolutional module (CBS) and a bottleneck module (Bottleneck). Each Bottleneck includes two CBS moquas. Replace the convolutional layers (Conv) of the CBS in the Bottleneck with phantom convolutions (GhostConv) to obtain the lightweight BottleneckGhost module. Replacing the Bottleneck in C2f with the lightweight BottleneckGhost module yields the lightweight C2fGhost module.
[0047] Phantom convolutions first generate a subset of core features using fewer standard convolutions, then generate the remaining features from these core features through inexpensive linear operations, resulting in the same number of output channels as the original convolution. This method reduces most of the multiply-accumulate computations in convolution operations while preserving feature expressiveness. By replacing some convolutions in the neck network with phantom convolutions, the number of parameters and computational cost can be significantly reduced while maintaining feature expressiveness, thereby lowering the model's storage requirements and inference latency, and improving the efficiency of the detection system in real-time online detection scenarios.
[0048] In one embodiment, during model training, the WIoU loss function is used as the bounding box regression loss for the detector head; the formula for calculating the WIoU loss function is: ; Where IoU is the intersection-over-union ratio of the predicted box and the ground truth box; d is the Euclidean distance between the centers of the predicted box and the ground truth box; c is the diagonal length of the minimum bounding box of the predicted box and the ground truth box; and r is the aspect ratio difference between the predicted box and the ground truth box. and These are weighting coefficients, which can be optimized during training.
[0049] WIoU not only considers the degree of overlap between the predicted box and the ground truth box (IoU), but also introduces factors such as the center offset distance of the predicted box, the size of the bounding box, and the difference in aspect ratio. By comprehensively measuring position, scale, and shape errors, the model can more accurately regress the bounding box during training.
[0050] The original YOLOv8 suffers from problems such as loss of fine-grained features and limited ability to perceive minute defects in defect detection. Direct application is difficult to meet the requirements of high-precision detection. Therefore, by introducing a dual-branch downsampling module to preserve details, a hybrid attention module to enhance the focus on key features, and combining WIoU loss to optimize bounding box regression, the ability to identify minute welding defects can be improved while ensuring detection accuracy.
[0051] To verify the performance of the defect detection model (DAH-YOLO) proposed in this invention, a comparative experiment was conducted, comparing the improved model of this invention with the original YOLOv8n model. The experiment (training + testing) was based on the PyTorch deep learning framework, and all training and validation were performed on the same hardware platform. The experimental parameter configurations are shown in Table 1.
[0052] Table 1 After training and validation on the same dataset, the improved DAH-YOLO model significantly outperformed the original YOLOv8n model in all performance metrics. Specifically, the precision improved from 87.4% to 93.7%, the recall from 80.3% to 85.2%, and the mAP@0.5 from 87.1% to 92.6%. This demonstrates that DAH-YOLO can more accurately identify defects and reduce missed and false detections in welding defect detection.
[0053] This invention provides a manufacturing control system for a current transformer. See also... Figure 6 , Figure 6 This is an architectural diagram of a current transformer manufacturing control system provided in an embodiment of the present invention. The system includes: The image acquisition module is used to acquire images of the welding area of the current transformer and obtain welding images.
[0054] The preprocessing module is used to preprocess the welding images to obtain the target image.
[0055] The quality detection module is used to input the target image into a pre-trained defect detection model to obtain defect detection results.
[0056] The process control module is used to determine whether rework is necessary based on the defect detection results.
[0057] The current transformer processing control system provided in this invention introduces automated image recognition and intelligent detection technologies to achieve efficient inspection of the welding quality of current transformers. Compared with traditional manual visual inspection, this method significantly improves inspection efficiency, reduces reliance on the experience of inspection personnel, and avoids misjudgments or missed inspections caused by visual fatigue from prolonged operation. Simultaneously, it facilitates the timely identification of products with welding defects in the early stages of production, preventing defective products from entering subsequent processing stages, thereby reducing rework costs and improving product quality stability.
[0058] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention are within the scope of the claims of the present invention.
Claims
1. A method for controlling the fabrication of a current transformer, characterized in that, The method includes: Image acquisition is performed on the welding area of the current transformer to obtain welding images; The welding image is preprocessed to obtain the target image; The target image is input into a pre-trained defect detection model to obtain defect detection results. The defect detection model is an improvement based on the YOLOv8 model, which includes: retaining the first CBS module in the backbone network and replacing the remaining CBS modules with a preset dual-branch downsampling module to retain fine-grained features while downsampling; inserting a preset hybrid attention module after the SPPF module in the backbone network to suppress invalid background and enhance defect features; replacing the C2f module in the neck network with a preset C2fGhost module to reduce computational redundancy; and adding a small target detection head to improve the robustness of small target defect detection. Based on the defect detection results, determine whether rework is necessary.
2. The processing control method for a current transformer according to claim 1, characterized in that, The preprocessing of the welding image to obtain the target image includes: The welding image is subjected to Gaussian filtering to obtain a denoised image; The denoised image is converted to the YCrCb color space, histogram equalization is performed on the Y channel, the CrCb channel is kept unchanged, and it is converted back to the RGB color space to obtain a contrast-enhanced image. The contrast-enhanced image is resized and normalized to obtain the target image.
3. The processing control method for a current transformer according to claim 1, characterized in that, The operation process of the dual-branch downsampling module includes: The input feature map X1 is divided equally along the channel dimension to obtain two feature maps X2 and X3; For feature map X2, we downsample it using max pooling with a window size of 3×3 and a stride of 2 to obtain feature map X4; then we extract features and expand channels using 1×1 convolution to obtain feature map X5. For feature map X3, it is split in the spatial dimension with a stride of 2 to obtain four non-overlapping feature maps UL, UR, LL, and LR; feature maps UL, UR, LL, and LR are concatenated along the channel dimension to obtain feature map X6; then feature extraction and channel dimensionality reduction are performed through 1×1 convolution to obtain feature map X7. Feature maps X5 and X7 are concatenated along the channel dimension to obtain feature map X8, which is then output.
4. The processing control method for a current transformer according to claim 1, characterized in that, The computation process of the hybrid attention module includes: For the input feature map Y1, channel attention and spatial attention mechanisms are used in parallel to enhance it, resulting in feature maps Y2 and Y3. For feature maps Y2 and Y3, 1×1 convolution is used to compress them into single-channel feature maps, and global average pooling is used to obtain their respective attention scores. The attention scores are normalized using the softmax function to obtain weighting coefficients. Based on the weighting coefficients, feature maps Y2 and Y3 are weighted and fused to obtain feature map Y4, and Y4 is output.
5. The processing control method for a current transformer according to claim 1, characterized in that, During model training, the WIoU loss function is used as the bounding box regression loss for the detector head; the formula for calculating the WIoU loss function is: ; Where IoU is the intersection-over-union ratio of the predicted box and the ground truth box; d is the Euclidean distance between the centers of the predicted box and the ground truth box; c is the diagonal length of the minimum bounding box of the predicted box and the ground truth box; and r is the aspect ratio difference between the predicted box and the ground truth box. and It is the weighting coefficient.
6. A processing control system for a current transformer, characterized in that, The system includes: The image acquisition module is used to acquire images of the welding area of the current transformer and obtain welding images; The preprocessing module is used to preprocess the welding image to obtain the target image; A quality detection module is used to input the target image into a pre-trained defect detection model to obtain defect detection results. The defect detection model is an improvement based on the YOLOv8 model, which includes: retaining the first CBS module in the backbone network and replacing the remaining CBS modules with a preset dual-branch downsampling module to retain fine-grained features while downsampling; inserting a preset hybrid attention module after the SPPF module of the backbone network to suppress invalid background and enhance defect features; replacing the C2f module of the neck network with a preset C2fGhost module to reduce computational redundancy; and adding a small target detection head to improve the robustness of small target defect detection. The process control module is used to determine whether rework is required based on the defect detection results.
7. The processing control system for a current transformer according to claim 6, characterized in that, The preprocessing module includes: The denoising module is used to perform Gaussian filtering on the welding image to obtain a denoised image; The enhancement module is used to convert the denoised image to the YCrCb color space, perform histogram equalization on the Y channel, keep the CrCb channel unchanged, and convert it back to the RGB color space to obtain a contrast-enhanced image. An adaptation module is used to resize and normalize the contrast-enhanced image to obtain the target image.
8. The processing control system for a current transformer according to claim 6, characterized in that, The operation process of the dual-branch downsampling module includes: The input feature map X1 is divided equally along the channel dimension to obtain two feature maps X2 and X3; For feature map X2, we downsample it using max pooling with a window size of 3×3 and a stride of 2 to obtain feature map X4; then we extract features and expand channels using 1×1 convolution to obtain feature map X5. For feature map X3, it is split in the spatial dimension with a stride of 2 to obtain four non-overlapping feature maps UL, UR, LL, and LR; feature maps UL, UR, LL, and LR are concatenated along the channel dimension to obtain feature map X6; then feature extraction and channel dimensionality reduction are performed through 1×1 convolution to obtain feature map X7. Feature maps X5 and X7 are concatenated along the channel dimension to obtain feature map X8, which is then output.
9. The processing control system for a current transformer according to claim 6, characterized in that, The computation process of the hybrid attention module includes: For the input feature map Y1, channel attention and spatial attention mechanisms are used in parallel to enhance it, resulting in feature maps Y2 and Y3. For feature maps Y2 and Y3, 1×1 convolution is used to compress them into single-channel feature maps, and global average pooling is used to obtain their respective attention scores. The attention scores are normalized using the softmax function to obtain weighting coefficients. Based on the weighting coefficients, feature maps Y2 and Y3 are weighted and fused to obtain feature map Y4, and Y4 is output.
10. The processing control system for a current transformer according to claim 6, characterized in that, During model training, the WIoU loss function is used as the bounding box regression loss for the detector head; the formula for calculating the WIoU loss function is: ; Where IoU is the intersection-over-union ratio of the predicted box and the ground truth box; d is the Euclidean distance between the centers of the predicted box and the ground truth box; c is the diagonal length of the minimum bounding box of the predicted box and the ground truth box; and r is the aspect ratio difference between the predicted box and the ground truth box. and It is the weighting coefficient.