
Electronic-Component-Sorter
Introducing the AI-Powered Electronic Component Sorter: The Ultimate in Intelligent Component Management
Stars: 138

The Electronic Component Classifier is a project that uses machine learning and artificial intelligence to automate the identification and classification of electrical and electronic components. It features component classification into seven classes, user-friendly design, and integration with Flask for a user-friendly interface. The project aims to reduce human error in component identification, make the process safer and more reliable, and potentially help visually impaired individuals in identifying electronic components.
README:
Introducing the AI-Powered Electronic Component Classifier: The Ultimate in Intelligent Component Management.
- Table of Contents
- 1. Description ๐
- 2. Features ๐
- 3. Usage ๐
- Important Points ๐
- Video Guide ๐ฅ
- Approach and Implementations ๐งโ๐ป
- Known Issues ๐ญ
- Insights and Applications ๐ก
- Going Beyond ๐
- Links ๐
- Attributions ๐ป
- Authors ๐ค
- License ย ๐ชช
The Electronic Component Classifier is a project that uses machine learning and artificial intelligence to automate the identification and classification of electrical and electronic components. This document serves as a guide for building and operating the classifier.
- Component Classification: Resistors, Capacitors, LEDs, Transistors, Potentiometers, Diodes, and Integrated Circuits are the seven classes into which electronic and electrical components can be simply categorised, using multilayer categorization.
- Further details: With only one click, you may find out more details about Integrated circuits, Transistors, and Capacitors.
- User-Friendly Design: The interface is simple to use and navigate, thanks to its clear headings, buttons, and text boxes.
- Make sure you have python 3.11.4 installed if you are using anaconda refer to the documentation on how you can use virtual environments to create virtual environments with specific version of python Anaconda Managing environments or you can install the version of python from python.
- After downloading the file dont forget to extract the file TRANSISTOR_OCR.rar using WinRAR.
- Change the paths for the models and the labels in the
img_classf.py
(present under the IMG_CLASFF Folder) file similarly change the paths present in thecapacitors.py
(present under the CAPACITOR Folder). - Open up
trans.py
(present under the TRANSISTOR_OCR Folder) and change the paths for therecognition_model_path
and thedetection_model_path
. - Change the path of the output directory in the
main.py
file . - It is advised to refer to the video for changing paths. Video Link
- For testing purposes if a component is physically not available, then obtaining a clear image of it on your phone and then using that would suffice, but it is advised to use actual component.
Follow the on-screen instructions to navigate through the application.
-
Step 1 Make sure the libraries that are present in the
requirements.txt
file are installed then open up a terminal navigate into the directory where this file has been saved run the following command in the terminalpython app.py
after following instructions in Usage -
Step 2 A new window will be created where you can see the webcam press
c
to capture an image and process it or enterq
to quit. - Step 3 An output will be shown indicating what specific component it is.
- Refer to the
requirements.txt
file for additional information regarding the required libraries. - To change the which camera is used in the
main.py
file in linecap = cv2.VideoCapture(1)
replace the 1 with any other number. This number correspondds to which camera will be active and will be used to take the images of the components.
- Problem definition:
- The problem of classification of electronic components from images.
- Data collection and preprocessing:
- Collected a dataset from images of electronic components.
- General classification:
- Used a trained CNN model to initially classify electronic components into 7 categories: resistors, capacitors, LEDs, transistors, potentiometers, diodes and integrated circuits based on visual characteristics.
i. Model selection and development:
- A CNN-based approach was chosen using Keras for general classification of electronic components based on their visual characteristics.
- The dataset was prepared by classifying the images according to the types of electronic components. ii. CNN model training:
- Keras and TensorFlow backend were used to build and evaluate the CNN model.
- "Teachable Machines" online tool was used to train the CNN model.
- Further details about Transistors, Capacitors and ICs:
- Further details about transistors and ICs was obtained by integrating OpenVINO OCR to extract text from images that had their names or any other text on them.
- For further details of Capacitors, CNN-model was developed and trained to recognize 6 types: ceramic capacitor, tantalum capacitor, electrolytic capacitor, mica capacitor, paper capacitor, polyester capacitor.
- Integration with Flask:
- Integrated the trained model into the Flask web application to create a user-friendly interface, that allows users to capture images real-time and receive predictions across different webpages in a comprehensive order.
- Each webpage contains clearly named buttons which just need to be clicked in order to run the models at backend.
- User should be automatically redirected to the page with output.
- Testing and iteration:
- The integrated system has been extensively tested to ensure functionality, performance and robustness.
- One more objective that we dedicatedly worked towards, was to accurately distinguish resist colors from images and determine the value of Resistor. We explored several methods for the same.
- To begin with, we tried Edge detection and color thesholding (OPEN CV). In this, we detect edge of bands and then apply color thresholding to correlate the colors extracted from the image with the standard values โโof the color codes of the resistors. However, this effort encountered challenges due to inherent differences in color and variations due to image resolution and lighting.
- We next attempted to refine our approach by introducing color segmentation (K-MEANS Clustering). We segmented the image into independent colors and then we figure out the colors present. It matched known color bands to their corresponding values. The goal was to isolate the four main bands of a resistor and minimise the background noise. Unfortunately, this method was hampered by alignment problems.
- Due to inaccuracies, we investigated the pre-existing models specialized for color detection. We realized that only a limited range of colors can be reliably detected, resulting in many colors being missed.
- Further, we went on with Mask RCNN and color thresholding. The Mask RCNN code we tried out encountered errors which were not rectified even after several attempts,hence we couldn't formulate the weights. The intention was that, after obtaining the mask using mask rcnn, we can apply color thresholding in regions of interest, i.e. resistor bands.
- In the future, we are committed to improving our knowledge, methods, exploring new approaches, advancing our resourcefullness and continuously iterating our methods in order to achieve Resistor Band colour detection and then use those colours to develop the algorithm to determine the values of resistors accurately.
-
Occasional false classification
- Status: Issue being resolved.
- Cause: - Limitations in camera resolution. - Lighting Conditions.
- Proposed Solution: - Using a macro camera to clearly capture the details of the component. Few cameras that can be used for this purpose Intel Realsense, Imaging Source. A camera may be opted upon considering the minimum focus distance and the size of the component. - Ensuring proper well lit environment with lights designed for the camera will resolve the lighting condition.
-
Overall Accuracy of the model ๐ฏ
- Status: Issue identified
- Cause: In certain electronic components the component will have the manufacturer's logo embossed in the silicon along with the model name and other info. This interfers with the OCR implementation.
- Proposed Solution: Train the OCR model to identify these logos and ignore them during detection.
-
Given below are the images for the confusion matrix of the model.
- Confusion Matrix For General Classifier
- In recent times, where technology runs the world as well as our lives, the application of electronics in various aspects and industries is growing rapidly. Electronic and Electrical components are building blocks in this process. They are used in every application, starting from consumer electronics to industrial machinery to education.
- However, recognising and classifying these parts correctly still remains a hefty task, due to the nature of these components. They are often small, there names are not easily visible or values might not be directly given but have to be calculated as in case of resistors. Especially for beginners and enthusiasts, this might seem like a challenge and may lead to usage of wrong components in wrong application which may prove to be hazardous. The process is still prone to random human error even if experienced personnel is there.
- It was against this practical necessity that we were motivated to come up with an automated process for electronic component identification, using the most useful and powerful tool available today, AI.
- Our project helps reduce the possible human error during the classification, sorting and usage of these highly sensitive components, by making most of this process automated. This also reduces the amount of time wasted in identification manually and makes the process safer and more reliable.
- Another potential benefit of this project involves helping people with visual disabilities locate, identify and use different electronic components, hence making them more accessible to the visually impaired. Traditional methods of identifying components usually rely on human senses such as vision and touch hence they may pose challenges to individuals living with vision impairment. Nevertheless by integrating such an interface like ours, not only will be beneficial in areas of electrical and electronic application such as labs and industries, but it will also be possible to create a system that allows people with blindness or poor sight identify items such as electronic components accurately by using non-visual methods.
-
Implementing individual component value indexing and identification.
- Overcoming the challenges of code implementation for Resistor value detection is one of our next main objectives.
- Individual component classification for capacitors, Transistors and IC's have already been implemented.
-
Adding more component classes
- for future applications, we want to keep increasing the number of classes in which our model will classify the components.
- more types of components for different applications and hence developing different models and training them for these classes is being worked on.
-
IntelOPEN Vino RAG implementation for getting datasheets. -The usage of electronic components often depends a lot on there Datasheets. Also, for components such as Transistor and IC's, a single component may have many differen implementations, variants and derivatives. Hence , by leveraging RAG(Retrival Augmentation Generation) we can implement a feature which, by taking in the model of the component,can return a list of it's variants, by pressing the button the user can be redirected to a website which provides a datasheet of the specific derivative of the component.
-
Auto sorting using IoT.
- Through the utilization of Internet of Things (IoT) technology, we can implement an automated sorting system capable of identifying individual parts and subsequently sorting them into their respective locations, by this we can track the number and types of components available.
-
Expanding to smd based components.
- Along with this, the project can be extended to focus on the Surface Mount Device (SMD) electronics components. In terms of sorting and identification, SMD components pose a considerable challenge due to their microscopic size. Through implementation of extra classifiying ability we will be able to successfully identify the values of these components. Nevertheless, complication arises as SMD components are typically of uniform outlook, making precise identification more difficult.
-
Full Web Transition & Mobile App Development
- The current implementation of the code is completely client based, by migrating the code to a server side directive, integrating database and other web based features will be easier and overall the application will be more elegant.
- Building a Mobile App is also possible as it will solve a major issue with the current model, The camera present in mobile devices are known to have higher quality leveraging this feature we can use the model anywhere we want without having bulky equipments.
- "Icon made by Freepik from www.flaticon.com"
- Image used in webpage
This project is licensed under the MIT License.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for Electronic-Component-Sorter
Similar Open Source Tools

Electronic-Component-Sorter
The Electronic Component Classifier is a project that uses machine learning and artificial intelligence to automate the identification and classification of electrical and electronic components. It features component classification into seven classes, user-friendly design, and integration with Flask for a user-friendly interface. The project aims to reduce human error in component identification, make the process safer and more reliable, and potentially help visually impaired individuals in identifying electronic components.

ShieldLM
ShieldLM is a bilingual safety detector designed to detect safety issues in LLMs' generations. It aligns with human safety standards, supports customizable detection rules, and provides explanations for decisions. Outperforming strong baselines, ShieldLM is impressive across 4 test sets.

MediaAI
MediaAI is a repository containing lectures and materials for Aalto University's AI for Media, Art & Design course. The course is a hands-on, project-based crash course focusing on deep learning and AI techniques for artists and designers. It covers common AI algorithms & tools, their applications in art, media, and design, and provides hands-on practice in designing, implementing, and using these tools. The course includes lectures, exercises, and a final project based on students' interests. Students can complete the course without programming by creatively utilizing existing tools like ChatGPT and DALL-E. The course emphasizes collaboration, peer-to-peer tutoring, and project-based learning. It covers topics such as text generation, image generation, optimization, and game AI.

js-route-optimization-app
A web application to explore the capabilities of Google Maps Platform Route Optimization (GMPRO). It helps users understand the data model and functions of the API by presenting interactive forms, tables, and maps. The tool is intended for exploratory use only and should not be deployed in production. Users can construct scenarios, tune constraint parameters, and visualize routes before implementing their own solutions for integrating Route Optimization into their business processes. The application incurs charges related to cloud resources and API usage, and users should be cautious about generating high usage volumes, especially for large scenarios.

LongRoPE
LongRoPE is a method to extend the context window of large language models (LLMs) beyond 2 million tokens. It identifies and exploits non-uniformities in positional embeddings to enable 8x context extension without fine-tuning. The method utilizes a progressive extension strategy with 256k fine-tuning to reach a 2048k context. It adjusts embeddings for shorter contexts to maintain performance within the original window size. LongRoPE has been shown to be effective in maintaining performance across various tasks from 4k to 2048k context lengths.

Trace
Trace is a new AutoDiff-like tool for training AI systems end-to-end with general feedback. It generalizes the back-propagation algorithm by capturing and propagating an AI system's execution trace. Implemented as a PyTorch-like Python library, users can write Python code directly and use Trace primitives to optimize certain parts, similar to training neural networks.

llmops-promptflow-template
LLMOps with Prompt flow is a template and guidance for building LLM-infused apps using Prompt flow. It provides centralized code hosting, lifecycle management, variant and hyperparameter experimentation, A/B deployment, many-to-many dataset/flow relationships, multiple deployment targets, comprehensive reporting, BYOF capabilities, configuration-based development, local prompt experimentation and evaluation, endpoint testing, and optional Human-in-loop validation. The tool is customizable to suit various application needs.

RecAI
RecAI is a project that explores the integration of Large Language Models (LLMs) into recommender systems, addressing the challenges of interactivity, explainability, and controllability. It aims to bridge the gap between general-purpose LLMs and domain-specific recommender systems, providing a holistic perspective on the practical requirements of LLM4Rec. The project investigates various techniques, including Recommender AI agents, selective knowledge injection, fine-tuning language models, evaluation, and LLMs as model explainers, to create more sophisticated, interactive, and user-centric recommender systems.

generative-ai-amazon-bedrock-langchain-agent-example
This repository provides a sample solution for building generative AI agents using Amazon Bedrock, Amazon DynamoDB, Amazon Kendra, Amazon Lex, and LangChain. The solution creates a generative AI financial services agent capable of assisting users with account information, loan applications, and answering natural language questions. It serves as a launchpad for developers to create personalized conversational agents for applications like chatbots and virtual assistants.

bpf-developer-tutorial
This is a development tutorial for eBPF based on CO-RE (Compile Once, Run Everywhere). It provides practical eBPF development practices from beginner to advanced, including basic concepts, code examples, and real-world applications. The tutorial focuses on eBPF examples in observability, networking, security, and more. It aims to help eBPF application developers quickly grasp eBPF development methods and techniques through examples in languages such as C, Go, and Rust. The tutorial is structured with independent eBPF tool examples in each directory, covering topics like kprobes, fentry, opensnoop, uprobe, sigsnoop, execsnoop, exitsnoop, runqlat, hardirqs, and more. The project is based on libbpf and frameworks like libbpf, Cilium, libbpf-rs, and eunomia-bpf for development.

DevOpsGPT
DevOpsGPT is an AI-driven software development automation solution that combines Large Language Models (LLM) with DevOps tools to convert natural language requirements into working software. It improves development efficiency by eliminating the need for tedious requirement documentation, shortens development cycles, reduces communication costs, and ensures high-quality deliverables. The Enterprise Edition offers features like existing project analysis, professional model selection, and support for more DevOps platforms. The tool automates requirement development, generates interface documentation, provides pseudocode based on existing projects, facilitates code refinement, enables continuous integration, and supports software version release. Users can run DevOpsGPT with source code or Docker, and the tool comes with limitations in precise documentation generation and understanding existing project code. The product roadmap includes accurate requirement decomposition, rapid import of development requirements, and integration of more software engineering and professional tools for efficient software development tasks under AI planning and execution.

chronon
Chronon is a platform that simplifies and improves ML workflows by providing a central place to define features, ensuring point-in-time correctness for backfills, simplifying orchestration for batch and streaming pipelines, offering easy endpoints for feature fetching, and guaranteeing and measuring consistency. It offers benefits over other approaches by enabling the use of a broad set of data for training, handling large aggregations and other computationally intensive transformations, and abstracting away the infrastructure complexity of data plumbing.

HybridAGI
HybridAGI is the first Programmable LLM-based Autonomous Agent that lets you program its behavior using a **graph-based prompt programming** approach. This state-of-the-art feature allows the AGI to efficiently use any tool while controlling the long-term behavior of the agent. Become the _first Prompt Programmers in history_ ; be a part of the AI revolution one node at a time! **Disclaimer: We are currently in the process of upgrading the codebase to integrate DSPy**

js-route-optimization-app
A web application to explore the capabilities of Google Maps Platform Route Optimization (GMPRO) for solving vehicle routing problems. Users can interact with the GMPRO data model through forms, tables, and maps to construct scenarios, tune constraints, and visualize routes. The application is intended for exploration purposes only and should not be deployed in production. Users are responsible for billing related to cloud resources and API usage. It is important to understand the pricing models for Maps Platform and Route Optimization before using the application.

ChainForge
ChainForge is a visual programming environment for battle-testing prompts to LLMs. It is geared towards early-stage, quick-and-dirty exploration of prompts, chat responses, and response quality that goes beyond ad-hoc chatting with individual LLMs. With ChainForge, you can: * Query multiple LLMs at once to test prompt ideas and variations quickly and effectively. * Compare response quality across prompt permutations, across models, and across model settings to choose the best prompt and model for your use case. * Setup evaluation metrics (scoring function) and immediately visualize results across prompts, prompt parameters, models, and model settings. * Hold multiple conversations at once across template parameters and chat models. Template not just prompts, but follow-up chat messages, and inspect and evaluate outputs at each turn of a chat conversation. ChainForge comes with a number of example evaluation flows to give you a sense of what's possible, including 188 example flows generated from benchmarks in OpenAI evals. This is an open beta of Chainforge. We support model providers OpenAI, HuggingFace, Anthropic, Google PaLM2, Azure OpenAI endpoints, and Dalai-hosted models Alpaca and Llama. You can change the exact model and individual model settings. Visualization nodes support numeric and boolean evaluation metrics. ChainForge is built on ReactFlow and Flask.

Chinese-Tiny-LLM
Chinese-Tiny-LLM is a repository containing procedures for cleaning Chinese web corpora and pre-training code. It introduces CT-LLM, a 2B parameter language model focused on the Chinese language. The model primarily uses Chinese data from a 1,200 billion token corpus, showing excellent performance in Chinese language tasks. The repository includes tools for filtering, deduplication, and pre-training, aiming to encourage further research and innovation in language model development.
For similar tasks

Electronic-Component-Sorter
The Electronic Component Classifier is a project that uses machine learning and artificial intelligence to automate the identification and classification of electrical and electronic components. It features component classification into seven classes, user-friendly design, and integration with Flask for a user-friendly interface. The project aims to reduce human error in component identification, make the process safer and more reliable, and potentially help visually impaired individuals in identifying electronic components.
For similar jobs

Qwen-TensorRT-LLM
Qwen-TensorRT-LLM is a project developed for the NVIDIA TensorRT Hackathon 2023, focusing on accelerating inference for the Qwen-7B-Chat model using TRT-LLM. The project offers various functionalities such as FP16/BF16 support, INT8 and INT4 quantization options, Tensor Parallel for multi-GPU parallelism, web demo setup with gradio, Triton API deployment for maximum throughput/concurrency, fastapi integration for openai requests, CLI interaction, and langchain support. It supports models like qwen2, qwen, and qwen-vl for both base and chat models. The project also provides tutorials on Bilibili and blogs for adapting Qwen models in NVIDIA TensorRT-LLM, along with hardware requirements and quick start guides for different model types and quantization methods.

dl_model_infer
This project is a c++ version of the AI reasoning library that supports the reasoning of tensorrt models. It provides accelerated deployment cases of deep learning CV popular models and supports dynamic-batch image processing, inference, decode, and NMS. The project has been updated with various models and provides tutorials for model exports. It also includes a producer-consumer inference model for specific tasks. The project directory includes implementations for model inference applications, backend reasoning classes, post-processing, pre-processing, and target detection and tracking. Speed tests have been conducted on various models, and onnx downloads are available for different models.

joliGEN
JoliGEN is an integrated framework for training custom generative AI image-to-image models. It implements GAN, Diffusion, and Consistency models for various image translation tasks, including domain and style adaptation with conservation of semantics. The tool is designed for real-world applications such as Controlled Image Generation, Augmented Reality, Dataset Smart Augmentation, and Synthetic to Real transforms. JoliGEN allows for fast and stable training with a REST API server for simplified deployment. It offers a wide range of options and parameters with detailed documentation available for models, dataset formats, and data augmentation.

ai-edge-torch
AI Edge Torch is a Python library that supports converting PyTorch models into a .tflite format for on-device applications on Android, iOS, and IoT devices. It offers broad CPU coverage with initial GPU and NPU support, closely integrating with PyTorch and providing good coverage of Core ATen operators. The library includes a PyTorch converter for model conversion and a Generative API for authoring mobile-optimized PyTorch Transformer models, enabling easy deployment of Large Language Models (LLMs) on mobile devices.

awesome-RK3588
RK3588 is a flagship 8K SoC chip by Rockchip, integrating Cortex-A76 and Cortex-A55 cores with NEON coprocessor for 8K video codec. This repository curates resources for developing with RK3588, including official resources, RKNN models, projects, development boards, documentation, tools, and sample code.

cl-waffe2
cl-waffe2 is an experimental deep learning framework in Common Lisp, providing fast, systematic, and customizable matrix operations, reverse mode tape-based Automatic Differentiation, and neural network model building and training features accelerated by a JIT Compiler. It offers abstraction layers, extensibility, inlining, graph-level optimization, visualization, debugging, systematic nodes, and symbolic differentiation. Users can easily write extensions and optimize their networks without overheads. The framework is designed to eliminate barriers between users and developers, allowing for easy customization and extension.

TensorRT-Model-Optimizer
The NVIDIA TensorRT Model Optimizer is a library designed to quantize and compress deep learning models for optimized inference on GPUs. It offers state-of-the-art model optimization techniques including quantization and sparsity to reduce inference costs for generative AI models. Users can easily stack different optimization techniques to produce quantized checkpoints from torch or ONNX models. The quantized checkpoints are ready for deployment in inference frameworks like TensorRT-LLM or TensorRT, with planned integrations for NVIDIA NeMo and Megatron-LM. The tool also supports 8-bit quantization with Stable Diffusion for enterprise users on NVIDIA NIM. Model Optimizer is available for free on NVIDIA PyPI, and this repository serves as a platform for sharing examples, GPU-optimized recipes, and collecting community feedback.

depthai
This repository contains a demo application for DepthAI, a tool that can load different networks, create pipelines, record video, and more. It provides documentation for installation and usage, including running programs through Docker. Users can explore DepthAI features via command line arguments or a clickable QT interface. Supported models include various AI models for tasks like face detection, human pose estimation, and object detection. The tool collects anonymous usage statistics by default, which can be disabled. Users can report issues to the development team for support and troubleshooting.