

Sunstone Mining Automation | TensorFlow Lite on Raspberry Pi
The Human Cause: “At 5 AM, miners start their shift sorting glowing rocks from regular stones. By 3 PM, their eyes are strained, their backs ache, and they’re missing gems that could feed their families. I built a machine that never gets tired.”
The Challenge: A mining company needed to automate sunstone detection—gemstones that glow under laser light. Manual sorting was exhausting workers and missing valuable stones. The constraint? Everything had to run on a $35 Raspberry Pi in dusty, remote conditions.
The Solution:
- Smart Architecture: 3-layer CNN optimized for embedded devices using TensorFlow Lite
- Data Jujitsu: Solved 10:1 class imbalance with custom weighting (334 sunstone vs 3,074 regular rock images)
- Real-Time Performance: 2-second response time with 96% recall rate
- Hardware Integration: Se2nd Summeramless coordination with conveyor belts, lasers, and pneumatic pistons
The Impact:
- Business: Automated a critical bottleneck in gemstone production
- Human: Workers go home less exhausted, spend quality time with families
- Technical: Proved edge AI works in harsh industrial environments
Tech Stack: Python, TensorFlow, TensorFlow Lite, Raspberry Pi, Computer Vision
See the code
Click the GitHub logo to check out the code for this project; I've made it open-source!