A YOLOv5s component packaging defect X-ray detection method
Patent Information
- Application Number
- CN202211528460.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-11-30
AI Technical Summary
但是现有的深度学习方法依赖于强大的算力,在实际工业场景下,由于算力和存储空间的限制,目标检测模型推理速度较低
[0011] The proposed model has a small number of parameters and fast inference speed, effectively addressing the limitations of storage space and computing resources in some industrial scenarios. With a reasonably constructed dataset, it can effectively detect bubble defects with high accuracy. Furthermore, it allows for retraining by adding difficult-to-distinguish defects later, offering significant room for optimization. This invention is of great significance and practical value for utilizing computer vision technology in chip defect detection.
Smart Images

Figure CN115861229B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of component packaging defect detection or image processing, and in particular to a YOLOv5s-based X-ray detection method for component packaging defects. Background Technology
[0002] Components are prone to defects such as voids during the packaging process, affecting their performance. X-ray inspection can non-destructively detect defects within the package, especially internal defects caused by sealing processes, foreign objects, incorrect internal lead connections, and poor chip bonding. Currently, X-ray inspection mainly relies on manual methods, using X-ray equipment to photograph internal defects, followed by professional inspection personnel judging the defect areas. This manual inspection is inefficient and lacks stability, failing to meet the demands of large-scale component inspection. Therefore, using computer vision-based methods to replace manual inspection is of great significance. However, voids in components are characterized by irregular shapes, large scale variations, high similarity between defects and backgrounds, and small defect proportions, leading to high false negative rates in machine vision algorithms. With the development of computer vision technology, more and more deep learning-based target detection methods have emerged, improving the poor adaptability and high false negative rates of traditional machine vision algorithms. Deep learning-based object detection algorithms are mainly divided into two categories: one is two-stage object detection algorithms, which first extract candidate regions to obtain object proposal boxes, and then perform object classification and location prediction, such as Fast R-CNN and Faster R-CNN; the other is single-stage object detection algorithms, which omit the candidate region generation process and directly regress the object's category and location, mainly including the YOLO series and SSD algorithms. However, existing deep learning methods rely on powerful computing power. In real-world industrial scenarios, due to limitations in computing power and storage space, the inference speed of object detection models is relatively low. Summary of the Invention
[0003] To address the shortcomings of existing technologies and improve detection speed without compromising accuracy, this invention optimizes the structure of the original YOLOv5s target detection network to address the characteristics of adhesive void defects. It designs a lightweight network suitable for deployment in devices with limited computing resources, making it more applicable to real-world detection environments. Furthermore, it can be extended to automated X-ray inspection and processing applications in the future, such as real-time scenarios where images are taken and processed simultaneously on the production line.
[0004] Firstly, a method for X-ray inspection of component packaging defects is provided, including:
[0005] Multiple anchor frames are marked on N training samples of component packaging images, and the anchor frames correspond to defects on the training samples of component packaging images.
[0006] Multiple anchor frame categories are derived based on anchor frame dimensions;
[0007] The training samples of the N component package images are input into the YOLOv5 model to be trained to perform training. The multiple detection heads of the YOLOv5 model are used to output the anchor box recognition results of the multiple anchor box categories.
[0008] Based on the loss function, the anchor box recognition results, and the multiple anchor boxes marked on the training samples, the parameters of the YOLOv5 model are adjusted to obtain the trained YOLOv5 model.
[0009] The image of the component package to be detected is input into the trained YOLOv5 model to obtain the anchor box recognition result corresponding to the image of the component package to be detected.
[0010] Compared with the prior art, the solution provided in this application has at least the following beneficial technical effects:
[0011] The proposed model has a small number of parameters and fast inference speed, effectively addressing the limitations of storage space and computing resources in some industrial scenarios. With a reasonably constructed dataset, it can effectively detect bubble defects with high accuracy. Furthermore, it allows for retraining by adding difficult-to-distinguish defects later, offering significant room for optimization. This invention is of great significance and practical value for utilizing computer vision technology in chip defect detection.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes:
[0013] K-means++ was used to classify the anchor boxes labeled on the training samples of the N component package images, including:
[0014] a) Randomly select a point as the initial cluster center point, the initial cluster center point is cluster center point i, i=1;
[0015] b) Calculate the distance between each sample and the cluster center i, and classify the sample into the category corresponding to the cluster center that is closest to it;
[0016] c) Calculate the probability that each sample is identified as cluster center i+1, and select the sample with the highest probability as the next center. In other words, cluster center i+1 can be the sample farthest from all previous cluster centers (i.e., cluster centers 1, ..., i). P(x) is the probability that a sample is identified as the next cluster center. Let x be the cluster center closest to x, and let A be the set of all clusters.
[0017] d) i = i + 1, and repeat steps b) and c) until k (number of clusters) cluster centers are determined.
[0018] K-means++ optimizes the selection of initial cluster centers, which can improve the error of classification results and achieve better clustering performance. The input can be the width and height of manually labeled tags, and the output can be the width and height of anchor boxes.
[0019] In conjunction with the first aspect, in some implementations of the first aspect, the YOLOv5 model is the YOLOv5s model.
[0020] YOLOv5s is the network with the smallest depth and feature map width in the entire series. A lightweight YOLOv5s detection model is built to fully utilize multi-scale semantic information.
[0021] In conjunction with the first aspect, in some implementations of the first aspect, the YOLOv5 model includes a backbone network, a BiFPN module, and a detection head module.
[0022] Because X-ray defect image datasets often contain small targets, their features tend to disappear as convolution deepens. The original YOLOv5 primarily utilizes feature layers downsampled by 8x to detect small targets, neglecting the use of details and location information in shallower layers. This leads to the loss of much information about small targets, hindering their detection. Therefore, to improve the detection performance of small defects, it is necessary to transfer details and location information from shallow features to deeper features. This paper improves the original YOLOv5 neckline by replacing the PAN+FPN module with a BiFPN module.
[0023] In conjunction with the first aspect, in some implementations of the first aspect, the C3 module of the YOLOv5 model is the C3Ghost module.
[0024] The Ghost module was introduced to replace the original C3 module, which lightweighted the backbone network and improved the detection speed without reducing accuracy.
[0025] In conjunction with the first aspect, in some implementations of the first aspect, the plurality of anchor frame categories are divided into 9 anchor frame categories according to area and aspect ratio. The detection head module includes a first detection head, a second detection head, and a third detection head. The anchor frame area detected by the first detection head is greater than the anchor frame area detected by the second detection head, and the anchor frame area detected by the second detection head is greater than the anchor frame area detected by the third detection head.
[0026] Different detection heads are used to output defect detection results for different anchor frame areas, which is beneficial for outputting targeted identification results according to the size.
[0027] In conjunction with the first aspect, in some implementations of the first aspect, the backbone network includes, from shallow to deep, a first C3Ghost module, a second C3Ghost module, a third C3Ghost module, a fourth C3Ghost module, and an SPPF module; the BiFPN module includes, from shallow to deep, a first upsampling module, a fifth C3Ghost module, a second upsampling module, a sixth C3Ghost module, a seventh C3Ghost module, and an eighth C3Ghost module. The sixth C3Ghost module corresponds to the third detection head, the seventh C3Ghost module corresponds to the second detection head, and the eighth C3Ghost module corresponds to the first detection head.
[0028] Based on the shallow-to-deep relationship of the YOLOv5 model, relatively shallow modules are used to output small targets. This takes into account the utilization of details and positional information in shallower layers, thus improving accuracy.
[0029] In conjunction with the first aspect, in some implementations of the first aspect, the data output by the second C3Ghost module is used as input to the sixth C3Ghost module and the seventh C3Ghost module.
[0030] Adding lateral connections between features at the same scale mitigates feature information loss caused by excessive network layers, thus fusing more features without significantly increasing computational cost. Shallow data can be fed into deeper networks, closer to the detection head, where small defects are submerged in the network, resulting in better small target detection capabilities.
[0031] In conjunction with the first aspect, in some implementations of the first aspect, the data output by the third C3Ghost module is used as input to the fifth C3Ghost module.
[0032] In conjunction with the first aspect, in some implementations of the first aspect, the data output by the SPPF module is used as input to the eighth C3Ghost module.
[0033] In conjunction with the first aspect, in some implementations of the first aspect, the loss function of the YOLOv5 model is S = s1QFL1(σ) + s2QFL2(σ) + s3L BCE3 ,
[0034] QFL(σ)=-α t |y-σ| β ((1-y)log(1-σ)+ylog(σ)), L BCE=-log(p t ),
[0035] s i Let σ be the weight, i=1 be the classification loss, i=2 be the prediction box confidence loss, i=3 be the prediction box position loss, σ be the prediction result, β be the modulation parameter, y be the predicted value after label smoothing, y∈[0,1], y=0 represent negative samples, and α be the prediction result. t = y*α + (1-y)*(1-α), where α is the weight coefficient of the positive and negative samples, p t This represents the category probability.
[0036] The problem of imbalanced positive and negative samples can be solved by replacing the binary cross-entropy loss function with QFocal loss.
[0037] In a second aspect, an electronic device is provided for performing the method as described in any of the implementations of the first aspect above. Attached Figure Description
[0038] Figure 1 This is the original YOLOv5 network structure diagram.
[0039] Figure 2 This is a diagram of the improved YOLOv5 network structure.
[0040] Figure 3 This is a schematic diagram of the Ghost module.
[0041] Figure 4 The image shown is a chip image (original image) acquired by an X-ray detection device, which is a specific application example of the present invention.
[0042] Figure 5 These are sample labeled images in a specific application example of the present invention.
[0043] Figure 6 This is a comparison chart of network detection results before and after the improvement in a specific application example of the present invention. Detailed Implementation
[0044] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0045] 1.1 Image Preprocessing
[0046] Because of the small size of the chip, when X-ray inspection equipment images the central chip area, it simultaneously captures images of multiple surrounding chips, resulting in images containing other complete or incomplete chip images. To avoid data duplication and achieve high-precision detection of a single chip, it is necessary to segment and extract the target chip at the center of each original image. This invention first performs center cropping on the image, then performs adaptive thresholding and morphological operations to refine the segmentation results. Next, it calculates the minimum bounding rectangle for the segmented contours, and finally performs rotation correction through affine transformation and scaling to a uniform scale using bilinear interpolation.
[0047] Input: Images containing multiple components acquired by X-ray inspection equipment (e.g., ... Figure 4 (As shown); Output: An image with a uniform size of 460*460 after bilinear interpolation following extraction of components in the central region (e.g., Figure 5 (As shown).
[0048] The specific process is as follows:
[0049] 1) Image center cropping: Extract the central region and remove the influence of other background elements;
[0050] 2) Binarization: After selecting an appropriate threshold using the OTSU algorithm, the component image is binarized.
[0051] 3) Morphological operations: Using the closing operation in morphological operations, the connected regions are first dilated and then eroded to refine the image segmentation effect and improve the accuracy of contour detection;
[0052] 4) Minimum bounding rectangle extraction: Fit the target contour and match the minimum bounding rectangle of the contour to obtain the rotation angle and size of the central component;
[0053] 5) Affine transformation: The components are rotated and corrected by affine transformation. After correction, the size is unified to 460*460 by bilinear interpolation.
[0054] 1.2 Detection of void defects
[0055] First, a sample dataset was constructed, consisting of acquired X-ray chip images. Labels for each image were manually annotated, including the center point coordinates (bx, by), width and height values (bw, bh), and category of the bubble defect. Next, the K-means++ algorithm was used to cluster the width and height values (bw, bh) of the ground truth bounding boxes in the chip dataset, obtaining initial values for the prior boxes at three scales. Then, a lightweight YOLOv5s detection model was built. To fully utilize multi-scale semantic information, a lightweight BiFPN multi-scale bidirectional feature fusion network was constructed. The Ghost module was introduced to replace the original C3 module, further lightweighting the backbone network and improving detection speed without sacrificing accuracy. Finally, a loss function was constructed, using QFocal loss instead of the original binary cross-entropy loss function to address the imbalance between positive and negative samples.
[0056] The defect detection method provided in this application can be applied to the YOLOv5 model. By inputting a preprocessed image into the YOLOv5 model, defect detection results can be output, which can indicate the minimum bounding rectangle of the defects in the image.
[0057] YOLOv5 belongs to the YOLO family and is a single-stage object detection algorithm. It builds upon YOLOv3 with some new improvements. The YOLOv5 model does not use a single scale but includes models of multiple scales: YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x.
[0058] In some embodiments of this application, the detection method can be applied to the YOLOv5s model or a derived model of the YOLOv5s model. YOLOv5s is the network with the smallest depth and feature map width in the entire series. The remaining YOLOv5m, YOLOv5l, and YOLOv5x are all based on this, continuously increasing in depth and width. The network structure of the YOLOv5s model is mainly divided into four parts: the input layer adopts adaptive scaling, anchor box calculation, and mosaic data augmentation; the backbone network adopts the C3 module and SPPF module; the neck structure adopts a structure combining FPN and PAN; the output layer outputs a vector containing the class probability of the target object, confidence score, and the location of the target detection box.
[0059] The original YOLOv5 detection model is as follows: Figure 1 As shown. The original YOLOv5 model is suitable for the COCO dataset and has a significant advantage in detecting large targets. However, the targets for detecting component defects are mostly small targets. Therefore, in practical applications, the original model needs to be improved for component packaging defect detection tasks. The improved YOLOv5 network structure is shown below. Figure 2As shown.
[0060] 1) Anchor frame improvement
[0061] The YOLOv5 model detection relies on generating a series of anchor boxes on the input image, and the selection of these anchor boxes directly impacts the model's performance. Before training the YOLOv5 model, anchor boxes can be calibrated on the training samples of the defect images. Furthermore, the anchor box category can be determined based on its size-related information. In some embodiments provided in this application, such as... Figure 1 As shown, the output layer of the YOLOv5 model has 3 detection modules, each of which can detect m categories. Therefore, the YOLOv5 model can be used to detect 3*m=k categories.
[0062] For example, anchor frames can be categorized into large, medium, and small anchor frames based on their area. YOLOv5 model detection module 1 can output information about large anchor frames, YOLOv5 model detection module 2 can output information about medium anchor frames, and YOLOv5 model detection module 3 can output information about small anchor frames. The value of m can be 3, further categorized according to the aspect ratio of the anchor frames. Large anchor frames can be divided into categories where the length is greater than the width and the difference between the length and width is relatively large; categories where the length is less than the width and the difference between the length and width is relatively large; and categories where the length and width are approximately equal, i.e., the difference is relatively small.
[0063] In some embodiments, anchor box classification can be achieved through algorithms. The original anchor box parameters in YOLOv5 were designed based on the COCO dataset and do not meet the actual needs of X-ray image defects. The original K-means algorithm has strong randomness in the selection of initial points, leading to a large deviation between the final cluster centers and the optimal cluster centers. The detection method provided in this application can use K-means++ to cluster void objects in the component dataset. Compared with the K-means algorithm, K-means++ optimizes the selection of initial cluster centers, improving the classification error and achieving better clustering results. The input can be the width and height of manually labeled tags, and the output can be the width and height of the anchor boxes.
[0064] The specific implementation steps are as follows: a) First, randomly select a point as the initial cluster center point, i = 1; b) Calculate the distance between each sample and cluster center point i, and classify the sample into the category corresponding to the cluster center with the smallest distance; c) Calculate the probability that each sample is identified as cluster center point i+1, and calculate the sample with the highest probability as the next center. That is, cluster center point i+1 can be the sample with the largest distance from all cluster centers before cluster center point i+1 (i.e., cluster centers 1, ..., i); d) i = i+1, and repeat steps b) and c) until k (the number of clusters) cluster centers are determined. The relevant calculation formula is:
[0065]
[0066]
[0067] In the formula: Let x be the nearest cluster center; D(x) be the Euclidean distance; P(x) be the probability that a sample is identified as the next cluster center; and A be the set of all clusters.
[0068] After obtaining k initial cluster centers, for each sample point x in the dataset... i Calculate the distance from the node to each of the k cluster centers, and assign it to the cluster corresponding to the cluster center with the smallest distance. For each cluster, recalculate its cluster center. Repeat the above process until the position of the cluster center no longer changes.
[0069] 2) Lightweight improvements
[0070] Yolov5s contains abundant redundant features, which, while ensuring model generalization ability, consume significant computational resources and increase model complexity. The Ghost module primarily consists of Ghost convolutions. Ghost convolutions divide the generation of intermediate feature maps into two parts: one part is generated through ordinary convolution operations, these are called intrinsic feature maps; the other part is generated through grouped convolution operations on the intrinsic feature maps, these are called Ghost feature maps. The final output is obtained by concatenating these two parts. Therefore, the Ghost module replaces the original C3 module (see...). Figure 2 Ghost module diagram as shown below Figure 3 As shown.
[0071] 3) Improved feature fusion network structure
[0072] Because X-ray defect image datasets often contain small targets, their features tend to disappear as convolution deepens. The original YOLOv5 primarily utilizes feature layers downsampled by 8x to detect small targets, neglecting the use of details and location information in shallower layers. This leads to the loss of much information about small targets, hindering their detection. Therefore, to improve the detection performance of small defects, it is necessary to transfer details and location information from shallow features to deeper features. This paper improves the original YOLOv5 neckline by replacing the PAN+FPN module with a BiFPN module.
[0073] The BiFPN module employs a bidirectional fusion approach, constructing a top-down and bottom-up bidirectional channel. It fuses information from different scales in the backbone network by unifying the feature resolution scale through upsampling and downsampling, and adds lateral connections between features at the same scale. This mitigates feature information loss caused by excessive network layers, thus fusing more features without significantly increasing computational cost. Shallow data can be fed into deeper networks, closer to the detection head, where small defects are buried in the network, resulting in better small target detection capabilities.
[0074] like Figure 2 As shown, the backbone network can include four C3Ghost modules, from shallowest to deepest: C3Ghost module a1, C3Ghost module a2, C3Ghost module a3, and C3Ghost module a4. The BiFPN module can also include four C3Ghost modules, from shallowest to deepest: C3Ghost module b1, C3Ghost module b2, C3Ghost module b3, and C3Ghost module b4.
[0075] The BiFPN module performs an initial upsampling on the SPPF output data from the backbone network. This initially upsampled data can be fused with the C3Ghost module a3 and then input into the C3Ghost module b1 of the BiFPN module. In other words, the matrix size obtained from the initial upsampling can be the same as the matrix size output by the C3Ghost module a3.
[0076] The data output from the BiFPN module after the second upsampling can be fused with the data output from the C3Ghost module a2 and then input into the BiFPN module's C3Ghost module b2. The data output from the BiFPN module's C3Ghost module b2 can be used for small anchor box detection. In other words, the matrix size obtained from the second upsampling can be the same as the matrix size output from the C3Ghost module a2.
[0077] The data output from C3Ghost module b2 can be further processed by the Ghost convolution module, undergoing a third fusion with the data output from C3Ghost module a2, and then input into the BiFPN module's C3Ghost module b3. The data output from C3Ghost module b3 is used for anchor box detection. In other words, the matrix size output from C3Ghost module b2 via the Ghost convolution module can be the same as the matrix size output from C3Ghost module a2.
[0078] The data output from C3Ghost module b3 can also be processed by the Ghost convolution module and fused with the data obtained before the first upsampling of the BiFPN module, and then input into C3Ghost module b4. The data output from C3Ghost module b4 is used to detect large anchor boxes. In another embodiment, the data obtained before the first upsampling of the BiFPN module can be directly used for the detection of large anchor boxes.
[0079] 4) Improved loss function
[0080] The loss function of YOLOv5 consists of three parts: classification loss, predicted box confidence loss, and predicted box location loss.
[0081] In some embodiments, the classification loss, the predicted box confidence loss, and the predicted box location loss can all be binary cross-entropy loss (BCE Loss).
[0082] S = s1L BCE1 +s2L BCE2 +s3L BCE3 = -s1log(p t1 )-s2log(p t2 )-s3log(p t3 ),
[0083] Where s i For the weight, p ti Let i = 1 be the class probability, i = 2 be the classification loss, i = 3 be the prediction box confidence loss, and i = 3 be the prediction box position loss.
[0084] In some embodiments provided in this application, Quality Focal Loss can be used instead of BCE Loss as the prediction box confidence loss and class loss for YOLOv5, respectively. This effectively balances positive and negative samples as well as easy and difficult samples, and is also compatible with continuous probability distribution supervision based on IoU. QFocal Loss (Quality Focal Loss) is an extension of Focal Loss for continuous label values, and its specific expression is as follows:
[0085] QFL(σ)=-αt |y-σ| β ((1-y)log(1-σ)+ylog(σ))
[0086] Where σ is the prediction result, β represents the modulation parameter, y represents the predicted value after label smoothing, y∈[0,1], y=0 represents a negative sample, and α t =y*α+(1-y)*(1-α) is used to balance positive and negative samples, where α is the weight coefficient of positive and negative samples.
[0087] The loss function S of YOLOv5 can satisfy:
[0088] S=s1QFL1(σ)+s2QFL2(σ)+s3L BCE3 , s1=s2=s3.
[0089] The network model obtained through the above method, after training, can be used to perform defect target detection and localization. Specifically, the preprocessed image can be input into the trained network model, and the network model can output the position and size of the detection box containing the defect in the image.
[0090] Figure 6 The comparison charts before and after the improvement are shown. Compared with existing technologies, the proposed model has fewer parameters and faster inference speed, effectively solving the problem of limited storage space and computing resources in some industrial scenarios. With a reasonably constructed dataset, it can effectively detect void defects with high accuracy. Furthermore, new defect types can be added later for retraining, offering significant room for optimization. This invention is of great significance and practical value for using computer vision technology for X-ray defect detection in components.
[0091] 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 possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope defined in the claims of the present invention.
Claims
1. A method for X-ray inspection of component packaging defects, characterized in that, include: Multiple anchor frames are marked on N training samples of component packaging images, and the anchor frames correspond to defects on the training samples of component packaging images. The K-means++ method was used to divide the anchor frames into multiple categories based on their dimensions; specifically, these included: a) Randomly select a point as the initial cluster center point, the initial cluster center point is cluster center point i, i=1; b) Calculate the distance between each sample and the cluster center i, and classify the sample into the category corresponding to the cluster center that is closest to it; c) Calculate the probability that each sample is identified as cluster center i+1, and select the sample with the highest probability as the next center. In other words, cluster center i+1 can be the sample farthest from all previous cluster centers (i.e., cluster centers 1, ..., i). , This represents the probability that a sample will be identified as the next cluster center. , distance The nearest cluster center It is the set of all; d) i = i + 1, and repeat steps b) and c) until k cluster centers are determined; k is the number of clusters; The N component package images are used as training samples and input into the YOLOv5s model to be trained for training. The YOLOv5s model includes a backbone network, a BiFPN module, and a detection head module. The multiple anchor box categories are divided into 9 anchor box classes according to area and aspect ratio. The detection head module includes a first detection head, a second detection head, and a third detection head. The multiple detection heads are used to output the anchor box recognition results of the multiple anchor box categories. The anchor box area detected by the first detection head is larger than the anchor box area detected by the second detection head, and the anchor box area detected by the second detection head is larger than the anchor box area detected by the third detection head. The backbone network... The network, from shallow to deep, includes a first C3Ghost module, a second C3Ghost module, a third C3Ghost module, a fourth C3Ghost module, and an SPPF module. The BiFPN module, from shallow to deep, includes a first upsampling module, a fifth C3Ghost module, a second upsampling module, a sixth C3Ghost module, a seventh C3Ghost module, and an eighth C3Ghost module. The sixth C3Ghost module corresponds to the third detection head, the seventh C3Ghost module corresponds to the second detection head, and the eighth C3Ghost module corresponds to the first detection head. Based on the loss function, the anchor box recognition results, and the multiple anchor boxes labeled on the training samples, the parameters of the YOLOv5s model are adjusted to obtain the trained YOLOv5s model; the loss function S= , , In the formula, s j Let j=1 be the classification loss, j=2 be the predicted bounding box confidence loss, and j=3 be the predicted bounding box location loss. It is a prediction result. Indicates modulation parameters, This represents the predicted value after label smoothing. , Indicates a negative sample. , These are the weighting coefficients for positive and negative samples. For class probabilities; The image of the component package to be detected is input into the trained YOLOv5s model to obtain the anchor box recognition result corresponding to the image of the component package to be detected. Specifically, the data output by the second C3Ghost module is used to input to the sixth and seventh C3Ghost modules; the data output by the third C3Ghost module is used to input to the fifth C3Ghost module; and the data output by the SPPF module is used to input to the eighth C3Ghost module.
Citation Information
Patent Citations
Communication maintenance tool identification method based on YOLO V5
CN114972888A
Small transparent plastic product defect detection method based on YOLOv5
CN115147380A
Cloth flaw detection method based on lightweight cascade network
CN115205274A
PCB small target defect detection method and system based on improved YOLOv5
CN115359016A