In high-precision manufacturing, detecting microscopic defects on transparent surfaces is a significant challenge. This project delivered a comprehensive Computer Vision Inspection System for contact lens production, replacing inconsistent manual labor with an automated, 24/7 high-speed solution.
Transparent materials often hide flaws depending on the light angle. I engineered a pipeline that processes RAW frames across four distinct spectral channels:
Standard Python loops are too slow for real-time industrial cycles. To achieve a 70ms processing window, I utilized Numba to JIT-compile critical geometric functions directly into machine code.
Key optimizations included a Pre-Polar Transformation to "flatten" the circular lens for linear scanning and a vectorized Min-Distance Contour calculator that achieved a 50x speed increase over pure Python implementations.
To maintain zero-downtime performance, the system architecture was built using a Worker-Manager Threading Model:
threading.Event and Mutex locks to eliminate race conditions during high-speed I/O.Industrial environments are unpredictable. I designed a Dynamic Alignment Algorithm (LensLocation) that automatically identifies the lens center and corrects for rotation/offset in real-time, ensuring sub-pixel accuracy even if the product is not perfectly centered.
In a team of 5, I served as the Core Computer Vision Engineer, responsible for algorithm design and backend maintenance.
Development: 2 weeks to prototype; 2 months to production-ready deployment.