CircuitImageAi
A deep learning web application built with PyTorch + FastAPI that can train, evaluate, and predict electronic circuits (Amplifier, RC Highpass, RC Lowpass, Other) directly from a user-friendly dashboard.
Install / Use
/learn @thr2301/CircuitImageAiREADME
🔌 Circuit AI – Circuit Classification Web App
A deep learning web application built with PyTorch + FastAPI that can train, evaluate, and predict electronic circuits (Amplifier, RC Highpass, RC Lowpass, Resonator, Other) directly from a user-friendly dashboard , calculates the values of the passive elements and creates a netlist.
🚀 Features
- Dashboard-style UI with plain HTML/CSS/JS
- User Authentication (Login & Register)
- Upload Images for circuit prediction
- Live Training with real-time loss & accuracy per epoch
- Organized dataset structure for easy training/testing
- Passive elements values calculation
- Netlist creation
📂 Project Structure
CircuitImageAi/
│── app.py # FastAPI backend
│── static/
│ ├── images.jpg # Background image
│ ├── login.html # Login & Register UI
│ ├── style.css # Styling
│ └── script.js # Frontend logic
│── templates/
│ ├── login.html # Login UI
│ ├── dashboard.html # Dashboard UI
│ └── register.html # Register UI
│── dataset/
│ ├── train/
│ ├── amplifier/
│ ├── rc_lp/
│ ├── rc_hp/
│ ├── resonator/
│ └── other/
│── models/ # Here are saved some previous trainings
│── images/ # Some images for testing
│── requirements.txt # Dependencies
└── README.md # Documentation
⚙️ Installation
- Clone the repo
git clone https://github.com/your-username/CircuitImageAi.git
cd CircuitImageAi
- Install dependencies
pip install -r requirements.txt
▶️ Running the App
Start the FastAPI server:
uvicorn app:app --reload
Open your browser:
👉 http://127.0.0.1:8000/static/login.html
📊 Dataset
Organize your dataset as follows:
dataset/
├── train/
├── amplifier/ # training images
├── rc_lp/
├── rc_hp/
├── resonator/
└── other/
⚠️ Place at least 20–30 images per class in train/ and 2-5 images per class in test/ for decent results.
Insisde the helpers folder there are to subfolders with some datasets , one big and one small.
Configure the Database
The credentilas are stored in a json file that is called users.json .
🧑💻 Usage
-
Register/Login
- Register a new account or login with existing credentials.
- <img width="1920" height="1041" alt="Image" src="https://github.com/user-attachments/assets/e0d334a6-8d8a-4b2d-a67e-7bde5030dab5" />
- Or login with existing credentials.
- <img width="1920" height="1043" alt="Image" src="https://github.com/user-attachments/assets/b235ebe1-f45a-40f9-8283-c0f6900661e0" />
-
Training
- Start training or continue a previous one from the dashboard.
- <img width="1920" height="913" alt="Image" src="https://github.com/user-attachments/assets/df13d68a-2253-47af-950b-78438c638c82" />
- Monitor loss & accuracy per epoch in real time.
- Or you can load a previous training.
-
Prediction
-
Upload an image of a circuit.
-
Get the predicted class + confidence percentage instantly.
-
In case of filter :
-
Enter the cutoff frequency.
-
Click Compute & plot
-
Fill the Library and cell name
-
Click Download Netlist
- <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/dc77afee-6a49-4f2a-aa05-4172d82a2ba6" />
-
In case of resonator
-
Choose vowel
-
Click Load & plot
-
Fill the Library & Cell name
-
Click DownLoad Netlist
- <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/a79bd09d-fb58-41dc-8579-96dc753604c9" />
-
-
Settings
- Here the User can change his email, phone number or add a new password
- <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/35afeb26-29dc-49fe-8580-0af216eb5550" />
📌 Requirements
Add these to requirements.txt:
fastapi
uvicorn
torch
torchvision
pillow
python-multipart
passlib[bcrypt]
cryptography
✅ To-Do
- [ ] Add more circuits
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
isf-agent
a repo for an agent that helps researchers apply for isf funding
