Electronic Components Image Classifier
This article is about an Android application that can classify electronic components in real-time with the source code publicly available.
The six main components that the application can detect are as follows:
The application also shows the confidence of the detection, in other words, the probability of the detected components.
Android
The Android is developed in Kotlin. For working with the camera and analyzing the camera frames in real-time, CameraX library is used, which is part of the Jetpack libraries.
In order to use Tensorflow models in the Android environment, it has to be converted to Tensorflow Lite models, which have .tflite extensions.
Python
Python codes contain two parts:
Recommended by LinkedIn
The model which is used for image classification is MobileNet v2. The model has 154 layers, and in the beginning, the model is not trained and only the last layer of the model among the classification layer is trained with 10 epochs. Then, for fine-tuning the model, the last 54 layers of the model are also trained with another 10 epochs.
Evaluation
For evaluation, the dataset is divided into a train set (70%) and a validation set (30%). The following are the results after training the model:
The loss used for evaluation is Cross-entropy.
Dataset
The dataset contains 4038 photos of electronic components in 6 different categories: Capacitor, Diode, Resistor, Transformer, Inductor, and IC. Two resources were used to create the dataset. The Digi-Key website, which is the biggest seller of electronic components in the world, was crawled in order to extract photos of the mentioned categories. Also, a public dataset of electronic components hosted in Kaggle was used.
very nice project.....!