How akl04/pcb-inspection-edge-ai works
This is an offline Raspberry Pi PCB inspection and advisory application. The main workflow watches uploaded images, runs YOLO localization, writes inspection records, obtains a knowledge-grounded corrective-action selection from the local ExecuTorch service, adds measurements, and presents reports and history in a dashboard. The README documents the product capabilities and several cross-service links; sampled source confirms watcher output, advisory serving, and measurement logic. Dashboard internals and some monitoring connections were not sampled, so those links rely on documented architecture or are omitted.
Main entry points: watch_input.py Inspection records · executorch_server.py ExecuTorch server · inspection_measurements.py Inspection measurements · llama_bridge.py Integration bridge
Components 17
Vision inspection
- Image watcher
vision/watch_input.py - YOLO inference
vision/watch_input.py - Inspection records
vision/watch_input.py - Defect class mapping
config/yolo_class_mapping.json
Advisory processing
- Integration bridge
integration/llama_bridge.py - ExecuTorch server
advisory/executorch_server.py - PCB knowledge base
config/pcb_knowledge_base.json - Advisory report
integration/llama_bridge.py
Monitoring
- Hardware sampling
hardware_monitoring/hardware_monitor.py - Inspection sampler
hardware_monitoring/inspection_sampler.py - Shared monitor
hardware_monitoring/shared_hardware_monitor.py - Inspection measurements
hardware_monitoring/inspection_measurements.py - Performance metrics
hardware_monitoring/inspection_sampler.py
Application and records
- Inspection dashboard
dashboard/app.py - Inspection history
results
Other components
- PCB image uploader
- Local Llama runtime
Connections 19
- PCB image uploader → Image watcher: uploads image
README.md - Image watcher → YOLO inference: invokes inference
vision/watch_input.py - YOLO inference → Inspection records: writes detections
vision/watch_input.py - YOLO inference → Defect class mapping: uses class labels
- Inspection records → Integration bridge: provides inspection
README.md - Integration bridge → ExecuTorch server: requests selection
README.md - ExecuTorch server → PCB knowledge base: reads guidance
advisory/executorch_server.py - ExecuTorch server → Local Llama runtime: runs model
advisory/executorch_server.py - ExecuTorch server → Integration bridge: returns selection
README.md - Integration bridge → Advisory report: assembles report
README.md - Inspection records → Inspection measurements: provides timing data
- Inspection sampler → Hardware sampling: samples hardware
hardware_monitoring/inspection_sampler.py - Inspection sampler → Performance metrics: calculates rates
hardware_monitoring/inspection_sampler.py - Inspection measurements → Shared monitor: summarizes window
hardware_monitoring/inspection_measurements.py - Inspection measurements → Performance metrics: calculates performance
hardware_monitoring/inspection_measurements.py - Inspection measurements → Advisory report: adds measurements
README.md - Advisory report → Inspection dashboard: displays report
README.md - Inspection records → Inspection dashboard: shows annotated image
README.md - Inspection dashboard → Inspection history: browses history
README.md