## 5 Conclusions  
This paper proposes a solution combining camera position control and an efficient object detection algorithm for the detection of micro-defects on the machined surfaces of mechanical parts. It effectively addresses issues such as low detection efficiency and high miss rates associated with traditional methods. By designing a precise camera position control strategy, the lens optical axis center was calculated using a calibration method. Combined with the requirements of defect dimensions, the optimal imaging area and installation height of the camera were determined, enabling the acquisition of a dataset with well-defined dimensional characteristics and laying a solid foundation for improving the accuracy of subsequent detection algorithms. In terms of detection algorithms, this study employs a shared feature encoder based on ResNet50 and YOLO, along with a dual-decoder structure for classification and localization. This significantly improves the efficiency and  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Miss Rate** & \begin{tabular}{c} **False Alarm** \\ **Rate** \\ \end{tabular} & \
\begin{tabular}{c} **Accuracy** \\ **Accuracy** \\ **(Hours)** \\ \end{tabular} &
\begin{tabular}{c} **Training** \\ **Speed (fps)** \\ \end{tabular} \\ \hline Faster-RCNN & 15.4 & 30.1 & 70.4 & 3.5 & 24.3 \\ SSD & 18.6 & 15.2 & 71.5 & 2.8 & 34.6 \\ YOLO-V3 & 10.4 & 16.3 & 76.7 & 2.4 & 36.2 \\ YOLO-V5 & 8.7 & 9.6 & 79.8 & 2.5 & 73.5 \\ YOLO-V8 & 5.9 & 3.2 & 86.2 & 2.2 & 76.7 \\ Our model & 4.2 & 3.6 & 87.5 & 1.8 & 79.1 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of different network models.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Network Model** & **False Negative Rate** & **False Positive Rate** & **Accuracy** \\ \hline YOLO-V5 & 8.7 & 9.6 & 79.8 \\ YOLO-V5+CBAM & 8.5 & 10.6 & 74.5 \\ YOLO-V5+SE & 7.2 & 8.4 & 82.3 \\ YOLO-V5+CA & 9.4 & 11.7 & 81.9 \\ Our model & 4.2 & 3.6 & 87.5 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Attention ablation experiment.  
accuracy of defect detection. Additionally, the introduction of a sliding window technique divides high-resolution images into smaller classification tasks, effectively reducing computational complexity. The ECA attention mechanism was also incorporated into the experiments to optimize the weight distribution of channel features, enhancing the model's focus on key features. The experimental results demonstrate that this method outperforms traditional approaches in key metrics such as miss rate, false positive rate, and overall accuracy. It exhibits exceptional performance in handling tiny defects and high-resolution images. The synergy between camera position control and algorithm optimization not only meets real-time detection requirements but also significantly enhances the reliability and robustness of the detection process.  
Conceptualization, H.L. and Z.W.; methodology, L.Q.; software, H.L.; validation, Z.W., L.Q. and X.W.; formal analysis, H.L.; investigation, H.L.; resources, Z.W.; data curation, H.L.; writing--original draft preparation, H.L.; writing--review and editing, L.Q.; visualization, X.W.; supervision, X.W.; project administration, X.W.; funding acquisition, X.W. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author/s.  
The authors declare no conflict of interest.