Computer Vision Conveyor System
Imagine a warehouse where thousands of returned electronic devices pile up, each containing an active SIM card silently draining money at a rate of $25/month. This isn't a hypothetical; it was a real-world crisis facing a logistics company, amounting to over $300,000 in potential annual waste. The manual process of extracting and deactivating these SIMs was a bottleneck, slow, error prone, and expensive. This project is the story of how that crisis was transformed into a high-efficiency operation through the strategic application of edge AI and custom hardware.
The Breakthrough: From One to Nine
The initial approach was simple: process one SIM card at a time. However, a pivotal discovery changed everything. The chosen machine learning model, Edge Impulse's MobileNetV2 SSD FPN-Lite, was capable of detecting up to 10 objects in a single frame.
"Why process one card per frame when the model can see ten?"
This insight sparked a complete redesign. The solution was to build a custom 9-card batch dispensing system, controlled by an ESP32. This hardware innovation, combined with the power of the ML model, increased the system's throughput by 900%.
The System: An End to End Pipeline
The system is a multi-layered solution that seamlessly integrates hardware, edge intelligence, and cloud automation. Follow it from the dispenser to the dashboard.
Edge to Cloud Hybrid Intelligence
Raspberry Pi 4 edge computing with intelligent cloud AI fallback
- 01
Hardware Layer
A custom designed dispenser, powered by an ESP32 with stepper and servo motors, precisely arranges 9 SIM cards for capture.
ESP32 dispenser stages 9 cards
- 02
Edge Intelligence
A Raspberry Pi 4 captures a high resolution image and, using the locally deployed Edge Impulse model, performs inference in under 100ms to detect all 9 cards.
Raspberry Pi 4 detects all 9 cards in under 100ms
- 03
Cloud Integration
The cropped images of each card are uploaded to AWS S3, and metadata is published via AWS IoT Core.
Cropped cards to AWS S3, metadata via IoT Core
- 04
Workflow Automation
A serverless AWS Lambda function triggers an n8n workflow for OCR extraction, data validation, and storage in an Airtable database.
Lambda triggers n8n for OCR, validation, and Airtable storage
- 05
Real-Time Analytics
A Power BI dashboard provides live monitoring of the system's performance and financial impact.
Power BI dashboard for live monitoring
Edge Processing
- TensorFlow Lite (50ms response)
- Real-time object detection
- Hardware GPIO control
- Live camera streaming
Cloud AI
- OpenAI GPT-4O Vision
- Claude Sonnet analysis
- 99.5% accuracy fallback
- Complex text extraction
Automation
- Self-hosted n8n workflow engine (Docker)
- Webhook triggers
- Auto Power BI refresh
- Event-driven pipeline
Before and After
The same task, two very different realities. Switch between the manual process and the automated system.
Manual Process (Before)
2-3 minutes per card
Manual handling, visual inspection, data entry
5-8% error rate
Human typos in ICCID transcription
200 cards/day limit
Constrained by operator availability
$25/hour labor cost
Dedicated full-time operator required
Quantified Impact: The Results
The transformation was dramatic. The new AI-powered system delivered massive improvements across the board.
| Metric | Manual Process | Edge AI System | Improvement |
|---|---|---|---|
| Processing Time | 2-3 minutes/card | 3-5 seconds/card | 97% faster |
| Daily Capacity | 200 cards | 10,000+ cards | 5000% increase |
| Error Rate | 5-8% | <0.5% | 90% fewer errors |
| Labor Cost | $25/hour | $0.10/hour (equivalent) | 99.6% reduction |
With a development cost of around $10,000, the system achieved a payback period of just 3 to 4 months, with a projected five year savings of over $140,000.
The Self-Taught Journey
Building this system required mastering 16+ technologies with no formal training. Here is how it progressed from basic Python scripting to production IoT development, in three phases.
Phase 1: Foundation (Months 1-2)
Learning the fundamentals through documentation and experimentation
Challenges Faced
- No understanding of computer vision concepts
- Never worked with embedded systems
- Zero experience with GPIO programming
- Unfamiliar with AI/ML deployment
Solutions Developed
- Built camera test rigs from scratch
- Created GPIO control prototypes
- Studied OpenCV documentation extensively
- Deployed first TensorFlow Lite model
16 Technologies Mastered
Hardware & IoT
AI & Machine Learning
Programming
Cloud Services
Workflow Automation
Under the Hood
Two patterns did the heavy lifting: real-time streaming to the browser, and confidence-based routing between edge and cloud.
Real-time Communication
// Socket.IO WebSocket Eventssocket.on("frame_update", (data) => { // Live feed at 30 FPS setCameraFrame(data.frame);}); socket.on("shutter_sound", () => { // Audio feedback playShutterSound();});Intelligent AI Routing
# Smart confidence-based routingif edge_confidence > 0.95: return edge_result # 50mselif edge_confidence > 0.80: return await cloud_verify() # 2selse: return await cloud_process() # 3sProject Impact and Future Vision
Business Value
- $50,000+ annual savings achieved
- 3-month ROI payback period
- 10,000+ cards/day processing capacity
- 99.8% system uptime reliability
Technical Excellence
- Sub-100ms edge processing speed
- Multi-threaded architecture design
- Auto-reconnection and fault recovery
- Modular, scalable system architecture
Self-Taught Achievement
- 15+ technologies mastered independently
- Production IoT system deployed solo
- Enterprise-grade quality delivered
- Zero formal training or team support
Future Roadmap and Scaling Vision
Immediate next steps to productize the system
Immediate Next Steps
- Stabilize dispenser mechanism for consistent dispensing
- Design a PCB to integrate all electronics
What's Next: From Prototype to Product
The current system is a production-validated success. The next logical step is to evolve the hardware from a prototype to a polished product. The future of this project lies in custom PCB design.
The goal is to design and manufacture a custom Printed Circuit Board that integrates the core electronic components, the Raspberry Pi Compute Module, the ESP32, motor drivers, and power management circuits, onto a single, compact board. This will not only shrink the device's physical footprint but also dramatically increase its reliability and robustness, making it suitable for deployment in harsh industrial environments. This step marks the transition from a one-off solution to a scalable, manufacturable product.