ARShadesPDKit — Overview
ARShadesPDKit is an iOS SDK built in Swift, designed to perform pupillary distance (PD) measurement and facial metrics analysis using ARKit and MediaPipe (TFLite).
Its core purpose is to enable eyewear-related applications to measure PD with high precision while guiding users to position themselves correctly in front of the camera, ensuring reliable results.
Key Features
- Pupillary Distance (PD) measurement using ARKit face tracking.
- MediaPipe/TFLite image classifier to detect if a user is wearing glasses.
- Guidance system: prompts users to stay steady, align with camera, and remove glasses if necessary.
- Frame capture workflow: collects 30 valid frames before computing final PD.
- AR-based visualizations:
- Left/right eye nodes (red spheres).
- A connecting cylinder to visualize inter-pupillary distance.
Philosophy
- Accuracy: Combines ARKit’s 3D precision with MediaPipe’s AI classification.
- Guided experience: Real-time prompts (“Come closer”, “Rotate to camera”, “Remove glasses”) help users align correctly.
- Robustness: Ensures results only when conditions are optimal (frontal face, no glasses, steady position).
- Modular SDK: Exposes key ViewModels, services, and repositories so integrators can plug PD measurement into larger eyewear workflows.