# Detecting and Measuring Defects in Wafer Die Using GAN and YOLOv3
## 4 Conclusions  
Defect sample collection, defect annotation, and feature engineering have always been the most time-consuming tasks in defect detection. To address this issue, this research integrated the technology of generative pseudo defective samples (using GAN), automatic pseudo defect annotation (using DIP), and automatic feature extraction (using YOLOv3). The methods proposed in this study need not to rely on experts for feature engineering and did not need bulk defect samples. Massive defect annotations are not required, either. Users need only to prepare a few defect image sets, manually annotate them, and complete the model training before conducting the inferences. This means that the method has great potential for application in various die patterns, where appearances are changeable and complex. In addition, the experimental results show that after the addition of the GAN mechanism, both the overall detection precision of the predicted bounding box and the measurement accuracy of quality classification were improved. This indicates that the pseudo defect images generated by the GAN help enrich the diversity of the training data set, which to some extent improved the versatility of the model.  
If nematic segmentation methods make a breakthrough in the inference speed in the future, it may be possible to combine the GAN and sematic segmentation methods to perform defect segmentation. The annotation process of the object segmentation model captures the outline of the defect in the  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Evaluation Metrics Methods** & **Testing AP** & **Testing Coordinate Prediction Error** \\ \hline YOLOv3 & 81.39\% & \(1.6456\times 10^{-3}\) \\ GAN + YOLOv3 (1.5-fold increase) & 88.12\% & \(2.9662\times 10^{-4}\) \\ GAN + YOLOv3 (2-fold increase) & 88.72\% & \(1.5851\times 10^{-4}\) \\ CycleGAN + YOLOv3 (1.5-fold increase) & 33.14\% & \(6.4880\times 10^{-1}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of methods by different evaluation metrics.  
Figure 8: Precision–recall (PR) curve for each method.  
image, rather than simply annotating the rectangular bounding box, as happens in the object detection model. Therefore, the annotation does not contain the background and does not consider the angle. The annotation may include other rectangles near the defects. In this way, the process of removing the background and the process of extracting blobs from the predicted bounding box can be omitted, and the efficiency of model inference can be improved.  
Conceptualization, S.-H.C. and D.-B.P.; methodology, S.-H.C.; software, C.-H.K.; validation, S.-H.C., C.-H.K. and D.-B.P.; formal analysis, C.-H.K.; data curation, D.-B.P.; writing--original draft preparation, S.-H.C.; writing--review and editing, D.-B.P.; funding acquisition, S.-H.C. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Ministry of Science and Technology, Taiwan, grant number MOST 108-2221-E-131-006-MY2 and The APC was funded by Ming Chi University of Technology.  
We are grateful to three anonymous reviewers for comments. The authors acknowledge all participants, [PERSON], [PERSON] and [PERSON], for their domain knowledge and annotation support of the study.  
The authors declare no conflict of interest.