Real-time defect detection method for copper foil
By introducing a dual convolution module and a deformable large-core attention mechanism in the YOLO V8 model and applying the Shape IoU loss function, the problem of insufficient detection accuracy and efficiency in metal surface defect detection by the YOLO V8 model is solved, and high accuracy is achieved , high-speed real-time defect detection effect.
Patent Information
- Application Number
- CN202411224368.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-02-07
AI Technical Summary
The existing YOLO V8 model lacks processing efficiency and detection accuracy in metal surface defect detection, making it difficult to improve detection accuracy without sacrificing efficiency.
By introducing a dual convolution module in the Backbone and Neck of the YOLO V8 model, and integrating the deformable large-core attention (D-LKAAttention) mechanism, and applying the Shape IoU loss function in the loss function to optimize the feature extraction and fusion process. Improve the model's ability to identify defect shapes.
It significantly improves the accuracy of defect detection while maintaining high speed, which is suitable for real-time application requirements in industrial production environments.
Smart Images

Figure CN119399095A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image intelligent recognition and defect detection, and specifically designs a real-time defect detection method for copper foil based on the YOLO V8 model, which is applied to defect detection on metal surfaces. Background Art
[0002] The detection of metal surface defects is crucial to ensure product quality, especially in key industrial fields such as automobiles, aviation, and shipbuilding. With the in-depth development of industrialization, the demand for metal materials has surged, and higher requirements have been placed on material quality. During the production process, defects such as pits and scratches on the metal surface may significantly affect the mechanical properties and corrosion resistance of the product. Therefore, fast and accurate defect detection technology is essential to maintain material quality. Traditional manual detection methods are time-consuming and subject to subjective factors, while modern deep learning technology, especially convolutional neural networks (CNNs), provides an effective way to automate defect detection. CNN's powerful feature learning ability makes it show great potential in metal surface defect recognition. The YOLO series of algorithms are highly favored in real-time processing applications for their efficient target detection capabilities. The accuracy, speed, and stability of YOLOV8 detection make it widely used. However, in the field of real-time defect detection, how to improve detection accuracy without sacrificing efficiency is the focus of current research. YOLO V8 achieves fast detection by reducing the number of parameters and computational complexity, but the accuracy is reduced. Therefore, improving YOLO V8 to improve detection accuracy is of great significance to industrial automated detection. The present invention proposes a real-time defect detection method for copper foil based on Yolo V8 model. Summary of the invention
[0003] The present invention provides an improved YOLO V8 model for efficiently detecting tiny defects on copper foil and other metal surfaces. The model incorporates the Deformable Large Kernel Attention (D-LKA Attention) mechanism and optimizes the feature extraction and fusion process by integrating dual convolution modules in the Backbone and Neck of YOLO V8. In addition, the present invention adopts the Shape IoU loss function to enhance the model's ability to recognize defect shapes. This innovative method not only significantly improves the accuracy of defect detection, but also ensures the high speed of the detection process, which is suitable for real-time application requirements in industrial production environments.
[0004] The present invention is achieved through the following technical solutions:
[0005] A real-time defect detection method for copper foil based on Yolo V8 model includes the following steps:
[0006] 1. Establish a dataset of copper foil surface defects: Collect different types of defect images on the copper foil surface, including scratches, peeling, plaques, pits, holes, and oxidation. Calibrate the collected training set images to obtain a dataset of 2,400 images in total.
[0007] 1.1: Classify and calibrate different defect types. The acquired images include six categories: scratches, peeling, plaques, pits, holes, and oxidation.
[0008] 1.2: Scale the images in the dataset and adjust the image resolution to meet the requirements of the model input.
[0009] 1.3: Crop the images in the dataset and set the defect areas to the same size.
[0010] 1.4: Normalize the data set and standardize the pixel values to make the model training process more stable and converge faster.
[0011] 1.5: Select negative samples that are difficult to identify from the misclassified samples for focused training.
[0012] 1.6: Perform quality check on the image to ensure that the image is clear and the defect marking is accurate.
[0013] 1.7: Divide the dataset into training set, validation set and test set.
[0014] 2. Build the Yolo V8 model: adjust and configure the corresponding environment and parameters, including model configuration, dataset path, training parameters, etc. Select a model that meets the real-time defect detection requirements, and adjust and configure the corresponding parameters.
[0015] 3. Improve the Yolo V8 model: Use the dual convolution (DualConv) structure to replace the single convolution structure of the Backbones network and neck network in the model, integrate the deformable large kernel attention (D-LKAAttention) mechanism in the SPPF module in the Backbones network, and apply the Shape IoU loss function to the position loss part of the loss function in the Head network.
[0016] 3.1 Based on the principle of double convolution, design a new convolution module, modify the model configuration file or network definition code, and replace the original single convolution layer with the newly designed double convolution module. In the Backbones network, replace the original convolution layer with a double convolution layer to ensure that the new layer can receive and process the feature map from the input. In the Neck network, replace the single convolution layer with a double convolution layer to enhance the ability of feature fusion and multi-scale feature extraction.
[0017] 3.1.1 This module will combine the advantages of 3×3 and 1×1 convolution kernels. The mathematical principle of double convolution is expressed as follows:
[0018] Assume the input feature map F has dimensions H×W×C (height×width×number of channels). Divide the input feature map F into G groups, each group Fg contains Cg channels. Apply a 3×3 convolution kernel to each group Fg Then there is Here * indicates the convolution operation. Next, the result of the 3×3 convolution Apply a 1×1 convolution kernel Perform feature fusion: Finally, the results of all groups Merge back into a feature map O. The entire operation of double convolution can be expressed as:
[0019] 3.1.2 Dual Convolution (DualConv) combines the advantages of 3×3 and 1×1 convolution kernels. The 3×3 convolution kernel can capture a wider range of spatial features, while the 1×1 convolution kernel helps to fuse features in the channel dimension, thereby enhancing the model's ability to express complex features. By optimizing the use of convolution kernels, dual convolution can reduce the model's computational burden and storage requirements without sacrificing performance.
[0020] 3.2 Replace the traditional SPPF module in the Backbones network with the SPPF module of the deformable large kernel attention (D-LKAAttention). That is, register the new SPPF_D_LKA module in the network task configuration file of YOLO V8 to ensure that it is correctly identified and used. By combining D-LKAAttention with SPPF, more effective attention is achieved on features of different scales, which improves the accuracy of the model in target detection. At the same time, the amount of calculation is reduced while maintaining sensitivity to contextual information. The model's adaptability to different target shapes and sizes is improved, which is particularly important for real-time target detection systems.
[0021] 3.3 Introduce the cross-stage local network module VoV-GSCSP in the neck network, and use the VoV-GSCSP module to extract and integrate the features of the processed feature map. The VoV-GSCSP module can improve the model's ability to detect targets of different sizes. Define the VoV-GSCSP module in the configuration file, adjust the neck network architecture to integrate the VoV-GSCSP module, adjust its parameters, and ensure that it can be used normally.
[0022] 3.4 Shape IoU is a new bounding box regression loss that focuses on the shape and scale of the bounding box itself and is particularly friendly to small target detection. Therefore, applying the Shape IoU loss function in the loss function can achieve detection and recognition of smaller defects.
[0023] 3.4.1 Define the calculation logic of Shape IoU loss function in the loss calculation module of YOLO V8.
[0024] 3.4.2 In the loss function of the detection head, find the part responsible for calculating the position loss. The loss function of the YOLO series model usually includes three parts: object confidence loss, position loss, and classification loss. The calculation of position loss needs to be replaced with a calculation method based on the Shape IoU loss function.
[0025] 3.4.3 In the model’s configuration file or class definition, update the detection head to use the new Shape IoU loss function.
[0026] 3.4.4Shape IoU loss function can be expressed as:
[0027] Shape IoU Loss(B p ,B g )=1-IoU(B p ,B g )-λ·Shape
[0028] Consistency(B p ,B g )-μ·Scale Consistency(B p ,B g )
[0029] Here, IoU(B p ,B g ) is the traditional intersection-over-union ratio, λ and μ are weight coefficients used to balance shape consistency and scale consistency. p ,B g ) is shape consistency, Scale Consistency (B p ,B g ) is the scale consistency. Specifically:
[0030]
[0031] d(B p ,B g ) represents the difference in the shapes of two bounding boxes, which can be computed based on their aspect ratio or other shape descriptors.
[0032]
[0033] A p and A g are the areas of the predicted bounding box and the true bounding box, respectively.
[0034] 4. Training and optimization: Input the labeled training set into YOLO V8 to train the improved model. Finally, verify the training effect through the validation set to adjust the hyperparameters and select the model. Run the model on the test set to evaluate its final performance.
[0035] 4.1 Use the YOLO V8 model for training, set the training cycle to 1000 generations, and set the training batch size (batch_size) to 32. Adjust the model parameter settings according to the training results.
[0036] 4.2 Save the weights after each training, use the optimal weights to verify the validation set, and evaluate the performance of the model. After reaching the standard, test it in the test set and evaluate the final performance.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] 1. Aiming at the insufficient processing efficiency and detection accuracy of the existing YOLO V8 model in metal surface defect detection, this paper introduces the innovative dual convolution (DualConv) technology, which enhances the feature expression ability and reduces the computational burden of the model by combining the advantages of 3×3 and 1×1 convolution kernels. The improved YOLO V8 model improves the detection accuracy of metal surface defects while maintaining real-time performance.
[0039] 2. In view of the wide variety of metal surface defects, different sizes, and complex background environment, the present invention optimizes the Backbones and Neck networks of the model, integrates a dual convolution module, and introduces a deformable large kernel attention (D-LKAAttention) mechanism. This optimization not only enhances the feature learning ability of the model, but also avoids a significant increase in the amount of calculation, maintaining the high processing speed and performance of the model.
[0040] 3. Applying the Shape IoU loss function in the Head network enhances the model’s ability to identify tiny defects, ensures detection efficiency when metal is transported on a fast conveyor belt, and meets the inference speed requirements for real-time detection.
[0041] In summary, the copper foil real-time defect detection method of the present invention not only improves the recognition accuracy, but also ensures the defect recognition rate, is suitable for real-time detection in industry, has broad application prospects, and can implement the optimized optimal model in industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0043] Figure 1 It is a flow chart of a method for real-time defect detection of copper foil based on Yolo V8 model in an embodiment of the present invention.
[0044] Figure 2 It is a schematic diagram of the dual convolution (DualConv) structure in the present invention.
[0045] Figure 3 It is a structural diagram of the SPPF module integrating deformable large kernel attention (D-LKAAttention) in the present invention.
[0046] Figure 4 It is a structural diagram of the VoV-GSCSP module introduced in the present invention.
[0047] Figure 5 It is a schematic diagram of the training and test results of the improved YOLO V8 model used in the present invention.
[0048] Figure 6 Schematic diagram of the copper foil surface defect sample detection results in an embodiment of the present invention.
[0049] Figure 7 This is the improved YOLO V8 model structure diagram in the present invention DETAILED DESCRIPTION
[0050] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0051] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0052] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0053] The embodiments of the present invention are described in detail below. The present invention improves the YOLO V8 model to improve detection accuracy and efficiency. A real-time defect detection method for copper foil based on the YOLO V8 model comprises:
[0054] 1.: Establish a data set of copper foil surface defects.
[0055] 1.1: Confirm the inspection object, use the camera to find and collect the surface defects of the copper foil, including scratches, peeling, plaques, pits, holes, and oxidation.
[0056] 1.2: Classify and calibrate different defect types. The acquired images include six categories: scratches, peeling, plaques, pits, holes, and oxidation.
[0057] 1.3: Scale the images in the dataset and adjust the image resolution to meet the requirements of the model input.
[0058] 1.4: Crop the images in the dataset and set the defect areas to the same size.
[0059] 1.5: Normalize the data set and standardize the pixel values to make the model training process more stable and converge faster.
[0060] 1.6: Select negative samples that are difficult to identify from the misclassified samples for focused training.
[0061] 1.7: Perform quality check on the image to ensure that the image is clear and the defect marking is accurate.
[0062] 1.8: Divide the dataset into training set, validation set, and test set.
[0063] Table 1: Distribution of different types of defect datasets
[0064] Defect Type Number of defects Number of pictures Scratches 1897 400 Peeling 1261 400 Plaque 2036 400 Pits 2160 400 Holes 957 400 Oxidation 1576 400 total 9887 2400
[0065] 2. Build the Yolo V8 model: adjust and configure the corresponding environment and parameters, including model configuration, data set path, training parameters, etc. Select a model that meets the real-time defect detection requirements and adjust and configure the corresponding parameters. Thanks to the fast detection speed and high detection accuracy of YOLO V8n, this embodiment selects the YOLO V8n model, that is, uses the YOLO V8n.yaml file to adjust and configure the corresponding parameters.
[0066] 3: Improve the YOLO V8n model: Use the dual convolution (DualConv) structure to replace the single convolution structure, introduce the deformable large kernel attention (D-LKAAttention) mechanism, and use the Shape IoU loss function.
[0067] 3.1: The single convolution structure of the Backbones network (responsible for feature extraction) and the neck network (responsible for feature fusion) is replaced with a double convolution structure. Double convolution can capture richer feature information while maintaining computational efficiency, thereby improving the processing efficiency and detection accuracy of the model.
[0068] 3.1.1: A single convolution structure refers to a convolution layer that uses only one size of convolution kernel to extract features. This structure is very common in convolutional neural networks and can be a convolution kernel of any size, such as 1x1, 3x3, 5x5, etc.
[0069] 3.1.2: The dual convolution structure is an innovative convolution layer design that combines two sizes of convolution kernels to enrich the feature extraction process. This structure generally consists of a larger convolution kernel, such as 3x3, and a smaller convolution kernel, such as 1x1. In this structure, the 3x3 convolution kernel is responsible for capturing local features in the image, and the 1x1 convolution kernel follows closely, with the goal of reducing the dimension of the feature map while optimizing the expression of the features. When the input feature map is divided into multiple subgroups, each subgroup is processed independently by these two convolution kernels, and then the processing results are merged to achieve deep fusion of features. In addition, the 1x1 convolution kernel can be designed to share weight parameters with the 3x3 convolution kernel, which helps to reduce the number of parameters of the overall model. The advantage of the dual convolution structure is that it can effectively control computational costs and memory usage while maintaining efficient feature expression, providing flexibility for designing efficient neural networks.
[0070] 3.2: Integrate the deformable large kernel attention (D-LKA Attention) mechanism into the SPPF module of the Backbones network.
[0071] 3.2.1: The SPPF module is an improved implementation of Spatial Pyramid Pooling. It captures features of different scales in the image through multiple pooling windows of different sizes, thereby generating a multi-scale feature representation, which helps to detect objects of different sizes.
[0072] 3.2.2: Deformable Large Kernel Attention (D-LKAAttention) is an attention mechanism that allows the model to adaptively adjust the shape and size of the convolution kernel to better adapt to the shape and size of the target. This mechanism is implemented through deformable convolution, where the sampling points of the convolution kernel can be dynamically adjusted on the input feature map to capture the geometric changes of the target.
[0073] 3.2.3: Integrating D-LKAAttention into the SPPF module enables the model to not only capture multi-scale features, but also perform adaptive feature extraction for different target shapes. This fusion enhances the model's ability to locate targets, especially when the target shape varies.
[0074] 3.2.4: In the YOLO V8n configuration file, find the Backbones definition section, register the new SPPF_D_LKA module, and replace the original SPPF module with the SPPF_D_LKA module. According to the characteristics of the SPPF_D_LKA module, adjust the relevant parameters, such as convolution kernel size, step size, padding, etc., to ensure that the new module is compatible with other parts of the existing network, including data flow, dimension matching, etc.
[0075] 3.3: Introduce the cross-stage local network module VoV-GSCSP into the neck network, and use the VoV-GSCSP module to extract and integrate features of the processed feature map.
[0076] 3.3.1: The VoV-GSCSP module can integrate multi-scale and multi-depth feature maps, which helps to improve the model's detection ability for targets of different sizes while maintaining computational efficiency.
[0077] 3.3.2: Define the VoV-GSCSP module in the configuration file and adjust the neck network architecture to integrate the VoV-GSCSP module.
[0078] 3.3.3: Adjust the module’s hyperparameters to ensure it works properly.
[0079] 3.4: Using the Shape IoU loss function can improve the generalization ability and accuracy of the target detection model in applications that require fine positioning and are sensitive to small targets in complex industrial production environments.
[0080] 3.4.1: Define the Shape IoU loss function to calculate IoU (calculate the intersection-over-union ratio between the predicted box and the real box), Shape Consistency (calculate shape consistency, which can be described by the aspect ratio of the bounding box or other shapes), and Scale Consistency (calculate scale consistency, based on the area of the predicted box and the real box). Specifically:
[0081] Shape IoU Loss(B p ,B g )=1-IoU(B p ,B g )-λ·Shape
[0082] Consistency(B p ,B g )-μ·Scale Consistency(B p ,B g )
[0083] Here, IoU(B p ,B g ) is the traditional intersection-over-union ratio, and λ and μ are weight coefficients used to balance shape consistency and scale consistency. p ,B g ) is shape consistency, Scale Consistency (B p ,B g ) is the scale consistency. Specifically:
[0084]
[0085] d(B p ,B g ) represents the difference in the shapes of two bounding boxes, which can be computed based on their aspect ratio or other shape descriptors.
[0086]
[0087] A p and A g are the areas of the predicted bounding box and the true bounding box, respectively.
[0088] 3.4.2: In the loss function calculation module of YOLO V8n, define a new function to calculate Shape IoU loss according to step 3.3.1. This function will accept the predicted bounding box B p and the ground-truth bounding box B g As input, and calculate the loss value.
[0089] 3.4.3: Replace the original position loss calculation part with Shape IoU loss function.
[0090] 3.4.4: In the model's configuration file or class definition, find the configuration section for the detection head. Update the configuration to use the new Shape IoU loss function to ensure it works properly.
[0091] 3.4.5: According to the training results, adjust the hyperparameters in the Shape IoU loss function, such as the values of λ and μ, to optimize the performance.
[0092] 4: Training and optimizing YOLO network model:
[0093] 4.1: Use the new YOLO model for training, where the training epochs are set to 1000 and the batch size batch_size is set to 32.
[0094] 4.2 Adjust model parameters based on training results.
[0095] 4.3: Save the model parameters after each training, use the optimal parameters to verify the validation set, test the test set, and evaluate the performance of the model. Compared with the original Yolo V8n model, the mAP of the improved model increased by 3.6%, and the FPS also increased. The specific test results are compared in Table 2.
[0096] Model mAP(%) FPS Original YoloV8n 79.8 318.4 After Improvement 83.7 332.6
[0097] 5.: Implement application.
Claims
1. A method for real-time defect detection of copper foil, characterized in that: The following steps are included: Step 1: Establish a data set of copper foil surface defects: collect different types of defect images on the copper foil surface, calibrate the collected training set images, and obtain a copper foil defect data set; Step 2: Build the Yolo V8 model: adjust and configure the corresponding environment and parameters, including model configuration, data set path, training parameters, etc.; select a model that meets the real-time defect detection requirements, and adjust and configure the corresponding parameters; Step 3: Improve the Yolo V8 model to enhance the real-time performance and detection accuracy of the model; Step 4: Train and optimize the YOLO V8 model. Input the labeled training set for training, adjust the hyperparameters and select the model through the validation set, and finally evaluate the performance on the test set.
2. The copper foil real-time defect detection method according to claim 1, characterized in that: In step 2, set up the YOLO environment on the local computer, divide the data set into training set, validation set and test set, compare different configuration files, and finally select the yolov8n.yaml configuration file.
3. The copper foil real-time defect detection method according to claim 1, characterized in that: In step 1, building an improved model specifically includes the following steps: S1.1 classifies and calibrates different defect types; the acquired images include six categories: scratches, peeling, plaques, pits, holes, and oxidation; S1.2: Scale the images in the dataset, adjust the image resolution to meet the model input requirements, crop the images in the dataset, and set the defect areas to the same size; S1.3: Select negative samples that are difficult to identify from the misclassified samples and conduct focused training; perform quality checks on the images to ensure that the images are clear and the defects are accurately labeled; Divide the dataset into training set, validation set, and test set.
4. The copper foil real-time defect detection method according to claim 1, characterized in that: In step 2, configure the YOLO environment on the local computer, adjust and configure the corresponding environment and parameters, including model configuration, dataset path, training parameters, etc.; select a model that meets the real-time defect detection requirements, and adjust and configure the corresponding parameters.
5. The copper foil real-time defect detection method according to claim 1, characterized in that: In step three, building an improved model specifically includes the following steps: S3.1 uses a dual convolution (DualConv) structure to replace the single convolution structure of the Backbones network and neck network in the model; S3.2 The SPPF module in the Backbones network integrates the deformable large kernel attention (D-LKA Attention) mechanism; S3.3 applies the Shape IoU loss function to the position loss part of the loss function located in the Head network.
6. The copper foil real-time defect detection method according to claim 1, characterized in that: In step 4, building the improved model specifically includes the following steps: S4.1 uses the YOLO V8 model for training, sets the training cycle to 1000 generations, and sets the training batch size (batch_size) to 32; adjusts the model parameter settings according to the training results; S4.2 saves the weights after each training, uses the optimal weights to verify the validation set, and evaluates the performance of the model; after meeting the standards, test it again in the test set to evaluate the final performance.
7. The copper foil real-time defect detection method according to claim 3, characterized in that: According to the principle of double convolution, a new convolution module is designed, and the model configuration file or network definition code is modified to replace the original single convolution layer with the newly designed double convolution module. In the Backbones network, the original convolution layer is replaced with a double convolution layer to ensure that the new layer can receive and process the feature map from the input.
8. The copper foil real-time defect detection method according to claim 6, characterized in that: This module will combine the advantages of 3×3 and 1×1 convolution kernels; the mathematical principle of double convolution is expressed as follows: Assume that the input feature map F has dimensions H×W×C (height×width×number of channels); divide the input feature map F into G groups, each group Fg contains Cg channels; apply a 3×3 convolution kernel to each group Fg Then there is Here * indicates the convolution operation; next, the result of the 3×3 convolution Apply a 1×1 convolution kernel Perform feature fusion: Finally, the results of all groups Merge back into a feature map O; the entire operation of double convolution can be expressed as:
9. The copper foil real-time defect detection method according to claim 7, characterized in that: DualConv combines the advantages of 3×3 and 1×1 convolution kernels. The 3×3 convolution kernel can capture a wider range of spatial features, while the 1×1 convolution kernel helps to fuse features in the channel dimension, thereby enhancing the model's ability to express complex features. By optimizing the use of convolution kernels, dual convolution can reduce the model's computational burden and storage requirements without sacrificing performance.
10. The copper foil real-time defect detection method according to claim 3, characterized in that: Replace the traditional SPPF module in the Backbones network with the SPPF module of the deformable large kernel attention (D-LKA Attention); that is, register the new SPPF_D_LKA module in the network task configuration file of YOLO V8 to ensure that it is correctly identified and used; define the calculation logic of the Shape IoU loss function in the loss calculation module of YOLO V8. In the loss function of the detection head, find the part responsible for calculating the position loss; the loss function of the YOLO series model usually includes three parts: object confidence loss, position loss and classification loss; the calculation of the position loss needs to be replaced with a calculation method based on the Shape IoU loss function; in the configuration file or class definition of the model, update the detection head to use the new Shape IoU loss function.
Citation Information
Cited By
Copper foil surface defect detection method, system and equipment based on machine learning
CN120107195A
Copper foil surface defect detection method, system and equipment based on machine learning
CN120107195B