--- title: PCB Image2Schematic emoji: 🔌 colorFrom: green colorTo: blue sdk: gradio sdk_version: 4.44.1 app_file: app.py pinned: false python_version: "3.11" --- # 🔌 PCB Image → Schematic Convert a PCB photo into a KiCAD schematic automatically using AI. ## Pipeline 1. **Component Detection** — YOLOv8 via Roboflow API detects resistors, capacitors, ICs etc. 2. **IC Text Reading** — EasyOCR reads part numbers from chip silkscreen 3. **Netlist Generation** — OpenCV trace following + proximity detection finds connections 4. **KiCAD Output** — Generates `.kicad_sch` file ready to open in KiCAD ## Local Setup ```bash git clone https://github.com/sanjay-r123/pcb-image2schematic cd pcb-image2schematic python -m venv venv venv\Scripts\activate pip install -r requirements.txt python app.py ``` Then open http://localhost:7860 ## Run Individual Stages ```bash python detector.py "your_pcb.jpg" python ocr.py "your_pcb.jpg" "your_pcb_results.json" python netlist.py "your_pcb.jpg" "your_pcb_results_ocr.json" python kicad_writer.py "your_pcb_netlist.json" ``` ## Tech Stack - Roboflow YOLOv8 — component detection - EasyOCR — IC text reading - OpenCV — trace detection - KiCAD format — schematic output - Gradio — web UI