# Enhanced YOLOv8 with BiFPN-SimAM for Precise Defect Detection in Miniature Capacitors
## 1 Introduction  
In the contemporary landscape of electronic product development, the significance of miniature capacitors is increasingly recognized, particularly in applications requiring high-precision charge storage and voltage regulation. These components are vital in the operation of high-frequency circuits and communication systems, playing a critical role in maintaining voltage stability and suppressing noise interference. A primary challenge in the utilization of these devices is the accurate detection and characterization of minuscule defects, which, despite their small size, can lead to substantial complications, such as system instability, data corruption, and increased security vulnerabilities [1, 2]. Traditional methodologies for the quality assessment of micro-capacitors, including microscopic inspection and electrical performance tests, are progressively being outpaced by the demands of modern technology. These methods, albeit being reliable to a certain extent, are limited in their ability to detect defects at the micron scale. For instance, microscopic inspection is heavily dependent on the skill level of the operator and necessitates specialized expertise. Additionally, electrical performance tests may fail to identify minorphysical anomalies that do not immediately affect functionality but could potentially lead to long-term degradation [3,4]. The use of automated visual inspection technologies has become the norm to overcome these constraints. These systems take advantage of recent developments in pattern recognition and image processing, especially with the introduction of deep learning methods like convolutional neural networks (CNNs). Numerous CNN-based models, such as Fast R-CNN, Faster R-CNN, and R-CNN itself, have shown a great deal of effectiveness in detecting flaws in electronic components [5,6]. Nevertheless, these models are not very good at identifying minuscule flaws, which is made worse by the difficulty in labeling the data. To surmount these challenges, this paper proposes an advanced approach employing the YOLOv8 model, known for its proficient single-stage target detection. YOLOv8 has a proven track record of processing complicated visual data and provides a speed-accuracy balance that is better than that of conventional two-stage models, such as the R-CNN family models [7,8]. To improve YOLOv8, we introduced the BiFPN (bidirectional feature pyramid network) and SimAM (simplified attention module). The goal of adding the SimAM was to improve the model's capacity to identify important elements in intricate visual data--a situation that frequently arises in the identification of micro-capacitor defects. SimAM accomplishes this by more efficiently directing the model's attention, which improves the accuracy of small-scale flaw identification [8]. The issues, caused by a lack of labeled data, are addressed by the incorporation of the BiFPN architecture. Through the establishment of a modified feature layer hierarchy, BiFPN enables more efficient feature integration and transfer across scales, improving the accuracy of the defect detection model [9, 10, 11]. In addition, the WISE-IOU (WIoU) loss function was introduced to improve the robustness and generalization of the model [12]. This is essential in real-world situations where sample variability and the effects of outliers are common. This enhancement was achieved via a refined feature layer hierarchy, which facilitates more effective feature transfer and integration across various scales, thus boosting the accuracy and dependability of defect detection [13,14]. Moreover, the incorporation of the WISE-IOU (WIoU) loss function significantly bolstered the model's generalization capabilities and robustness [12]. These improvements culminated in a notable enhancement of the model's performance, as evidenced by achieving a 95.8% [EMAIL_ADDRESS], representing a substantial 9.3 percentage point increase compared with the baseline YOLOv8 architecture.