An iOS engineer automated rifle target scoring by porting a 2012 OpenCV paper, fine-tuning YOLOv8, and shipping a CoreML app to replace manual brass plug gauges.
Key Takeaways
Bullet holes are negative space, making Apple’s Vision framework unreliable out of the box; it tagged ring digits and card annotations as false positives.
The Rudzinski/Luckner 2012 paper (Warsaw University of Technology) achieves 99% detection on ISSF targets but tops out near 80% on NSRA cards with ragged .22 bullet edges.
Final pipeline merges two approaches: OpenCV handles structural geometry (bulls, ellipses, perspective transform) while YOLOv8 localizes holes; class predictions are discarded and score comes from geometric ring radii.
Bullet radius required empirical calibration: theoretical 10.87% of bull diameter underperformed; 30% (14.13% of bull diameter) matched manually scored cards.
The packaged CoreML model is 22.4 MB after Xcode import; the app is offline-first and accumulates heat maps to reveal posture, breathing, and trigger-pull trends across sessions.