# A Deep Learning-Based Algorithm for Ceramic Product Defect Detection
## 3 Experiments and Results
### Ceramic Product Crack Detection Algorithm Based on Adaptive Canny
#### 3.2.2 Ablation Experiments  
To validate the improvement effects of the adaptive Canny algorithm in ceramic product crack detection, this study utilized the lightweight YOLOv10s model to filter out defect images containing cracks as the experimental dataset. ROIs were precisely delineated based on the detection boxes to focus on crack features and reduce background interference. The impacts of the key improvement strategies of the algorithm were systematically analyzed through ablation experiments, and the results are presented in Table 5.  
As shown in Table 5, in the ceramic crack edge detection experiments, the original Canny algorithm, due to its use of a fixed threshold strategy, resulted in significant deviations in edge localization in high-noise areas, with an average ELE of 3.2 px. In contrast, the improved adaptive Canny algorithm, by introducing an adaptive thresholding method, effectively reduced noise interference, bringing the edge localization closer to the actual cracks. The average ELE was reduced to 2.4 px, representing a 25% reduction in error. Given the stringent requirements for localization accuracy in ceramic crack detection, the notable decrease in ELE significantly enhanced the reliability of the detection. In terms of edge connectivity, the original Canny algorithm frequently suffered from weak crack edge discontinuities due to its fixed threshold, resulting in an ECR of only 76%. In comparison, the adaptive Canny algorithm, by preserving more weak edge information, increased the ECR to 91%, representing a 15% improvement in connectivity. Considering the importance of a complete crack profile for assessing crack severity (such as through-cracks), the increase in ECR effectively avoided missed detections. Furthermore, in terms of weak edge response capability, the original Canny algorithm, due to its fixed high-threshold strategy, resulted in severe missed detections of light-colored or fine cracks, with a WER of only 65%. The adaptive Canny algorithm, by dynamically adjusting the threshold, significantly enhanced the response capability to weak edges, increasing the WER to 82%, representing a 17% improvement in detection rate. Given the importance of detecting micro-cracks (such as cracking in glazes) on ceramic surfaces for early defect identification, the increase in WER contributed to improving the sensitivity of defect recognition. Although the improved adaptive Canny algorithm experienced a slight decrease in frame rate, it still met the requirements for real-time detection on production lines (typically requiring \(\geq\)30 frames per second). Therefore, considering multiple factors such as detection accuracy, connectivity, weak edge response capability, and real-time performance, the proposed adaptive Canny algorithm exhibits significant advantages in ceramic crack detection. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **ELE (px)** & **ECR (\%)** & **WER (\%)** & **FPS (f/s)** \\ \hline Lightweight YOLOv10s + Canny & 3.2 & 76 & 65 & 44 \\ Lightweight YOLOv10s + Adaptive Canny & 2.4 & 91 & 82 & 40 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results of ablation experiments. As shown in Figure 8, the ceramic crack edge detection results based on the adaptive Canny algorithm are presented. After obtaining the detection results using the lightweight YOLOv10s model, the defect type and relevant information about the detection bounding boxes are acquired. Subsequently, the algorithm delineates the ROI on the original image based on the bounding box coordinates of the crack defect. This operation significantly reduces the area of the subsequent detection region, not only helping to shorten the detection time but also effectively excluding interference from irrelevant background information, thereby improving detection efficiency and accuracy. After determining the ROI, tests are conducted using both the original Canny algorithm and the adaptive Canny algorithm proposed in this paper.