Model Comparison, Explainability and Trust in Computer Vision
Using Yu et al. (2024) as a comparison framework, I consider how conventional machine learning and deep learning could be evaluated for production-line visual inspection, and how their decisions could be explained to the people expected to act on them.
1. Model Comparison in Practice: Visual Defect Inspection
My selected domain is automated visual quality inspection, specifically estimating surface defects from production-line images to decide whether an item should pass, be reworked or receive manual inspection. A conventional pipeline might extract colour, edge, texture and defect-area measurements for a random forest, support vector machine, multilayer perceptron or decision tree. A CNN instead learns spatial features directly from pixels, which suits the local relationships among edges, textures and shapes (Mienye and Swart, 2024).
Yu et al. (2024) solve a different but transferable regression problem: predicting supply-chain management distribution cost (SCMDC) from 12 order and shipping variables. Their 180,519 records are divided into 70% training, 15% testing and 15% validation data. Five model families are evaluated on the same target, partitions and error measures. The labelled test results in Table 2 are:
| Model | RMSE | R² |
|---|---|---|
| CNN | 0.518 | 0.961 |
| Decision tree | 1.372 | 0.896 |
| Random forest | 1.738 | 0.892 |
| SVM | 1.815 | 0.887 |
| MLP | 1.874 | 0.885 |
Lower RMSE indicates predictions closer to observed costs, while higher R² indicates more explained variance. The paper also reports a narrower CNN test-error range (−6.8 to 10.3). However, its abstract and conclusion describe RMSE 0.528 and R² 0.953 as test results, although the table labels them as training results. I therefore use the explicitly labelled test table above.
CNNs learn visual hierarchies without predefined features but often require more labelled images, specialist hardware, training time and energy. Traditional models can compete on smaller datasets, run cheaply on CPUs and expose engineered inputs; a shallow tree is especially transparent. Yet feature engineering may discard information and transfer poorly when lighting, cameras or materials change. Deployment efficiency should therefore be measured, not assumed.
For a defensible experiment, I would compare models on the same batch- and time-separated test set; report RMSE, R² and errors by defect and product type; and measure latency, memory and energy. Batch separation prevents nearly identical items leaking across random splits. Because Yu et al. use tabular rather than image data, their findings offer a comparison method to reproduce, rathar than proof that CNNs always outperform conventional ML.
2. Explainability and Trust in an Inspection System
The model supports consequential decisions: accepting, reworking, inspecting or scrapping an item, or stopping a line when defects cluster. False positives waste usable products; false negatives may release unsafe products and incur warranty costs. Operators need enough evidence to judge and challenge recommendations.
An unexplained model may react to glare, a camera border or a supplier mark rather than the defect, or degrade after lighting and material changes. Uncontestable rejections blur accountability by encouraging deference to an apparently objective score. Explanations can expose these failures and unequal errors across products, suppliers or sites. The goal is appropriate trust: users should see evidence and uncertainty.
SHAP attributes feature contributions locally and can aggregate them into global patterns (Lundberg and Lee, 2017); in a conventional pipeline, it might show that defect area and texture raised predicted severity. Image SHAP depends on masking and background choices. LIME highlights influential superpixels through a local surrogate, but its stability should be tested across runs and segmentations (Ribeiro, Singh and Guestrin, 2016). For CNNs, Grad-CAM maps influential regions without retraining (Selvaraju et al., 2017). It may show attention overlapping a crack, but a plausible heatmap is neither causal evidence nor proof of correctness. Methods must match their purpose and limitations (Molnar, 2023).
I would treat explainability as a product and governance requirement. Quality leads should define error costs and escalation thresholds, while inspectors validate highlighted regions. Data engineers should maintain provenance and labelling guidance; computer-vision engineers should benchmark a simple model; and UX and safety specialists should test displays and probe failures. MLOps engineers should monitor drift by camera, site and product type and retain auditable versions and decision logs.
My responsibility would be to communicate subgroup errors and limitations plainly, preserve reproducible evidence and never present an explanation as certainty. Release should require user testing, stability checks, a documented human override and feedback for disputed cases. Quantitative evidence, visual explanation and accountable review together are stronger than a black-box score or attractive heatmap alone.
References
Lundberg, S.M. and Lee, S.-I. (2017) ‘A unified approach to interpreting model predictions’, Advances in Neural Information Processing Systems, 30. Available at: https://proceedings.neurips.cc/paper_files/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html (Accessed: 10 June 2026).
Mienye, I.D. and Swart, T.G. (2024) ‘A comprehensive review of deep learning: architectures, recent advances, and applications’, Information, 15(12), article 755. Available at: https://doi.org/10.3390/info15120755 (Accessed: 10 June 2026).
Molnar, C. (2023) Interpretable Machine Learning: A Guide for Making Black Box Models Explainable. 2nd edn. Available at: https://christophm.github.io/interpretable-ml-book/ (Accessed: 10 June 2026).
Ribeiro, M.T., Singh, S. and Guestrin, C. (2016) ‘“Why should I trust you?”: Explaining the predictions of any classifier’, Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1135–1144. Available at: https://doi.org/10.1145/2939672.2939778 (Accessed: 10 June 2026).
Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D. and Batra, D. (2017) ‘Grad-CAM: Visual explanations from deep networks via gradient-based localization’, Proceedings of the IEEE International Conference on Computer Vision, pp. 618–626. Available at: https://openaccess.thecvf.com/content_iccv_2017/html/Selvaraju_Grad-CAM_Visual_Explanations_ICCV_2017_paper.html (Accessed: 10 June 2026).
Yu, X., Tang, L., Long, L. and Sina, M. (2024) ‘Comparison of deep and conventional machine learning models for prediction of one supply chain management distribution cost’, Scientific Reports, 14, article 24195. Available at: https://doi.org/10.1038/s41598-024-75114-9 (Accessed: 10 June 2026).
