Automatic Resistor Value Detection Using Computer Vision and Machine Learning
Keywords:
CNN, YOLO, computer vision, resistor color code, machine learningAbstract
This study presents a computer vision-based system for automatic resistor value detection using machine learning. A lightweight convolutional neural network (CNN) was trained using approximately 1,200 labeled images of 4-band and 5-band resistors to classify resistor values based on color-band patterns. The system includes a real-time webcam interface that guides the user in positioning the resistor within a defined region of interest before prediction. Experimental results showed a training accuracy of 92.3% and a validation accuracy of 90.1% under controlled conditions. However, real-time performance decreased to approximately 72% under poor lighting and misalignment conditions. These results indicate that whole-image CNN classification is feasible for resistor value detection but remains sensitive to illumination changes and object positioning. To address these limitations, a YOLO–CNN hybrid architecture is proposed as an enhancement, where YOLO-based detection localizes individual resistor bands before CNN-based color classification. This proposed approach is expected to improve robustness, interpretability, and error diagnosis by analyzing individual color bands rather than the whole resistor image. The system has practical applications in electronics education, component verification, servicing, and retail environments. Future work should focus on implementing the YOLO–CNN architecture, expanding the dataset, improving lighting control, and deploying the model on mobile or embedded platforms.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Engineering and Technology for Sustainability and Resilience

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.