AI & computer vision
Real-time hit detection on shooting targets from a phone camera, with computer vision running on the device.
Problem
Shooters wanted every hit detected and scored automatically from a phone pointed at the target, without walking downrange or counting holes by hand. The target moves, the light changes and old holes stay on the paper, so comparing two frames is not enough.
Solution
A Flutter app for Android with a native C++ and OpenCV pipeline, called through Dart FFI. Every frame is stabilised with ORB features and a homography, then frame differencing and contour analysis find candidate hits. TensorFlow Lite models locate the target and the holes, and a small classifier checks each candidate. A hit is confirmed over several frames, and only while the target is at rest.
When a session ends, a detection pass over the sharpest frames recounts the holes, and RANSAC geometry matching separates new holes from ones that were already there. The app also supports reactive splatter targets, drills, session history, PDF reports and spoken announcements. A Python harness replays recorded videos through the same C++ code and scores the detector, and a Spring Boot server collects sessions for review.
Stack
- Flutter
- C++
- OpenCV
- TensorFlow Lite
- YOLO
- Dart FFI
- Python
- Spring Boot
Result
Detection and scoring run on the phone in real time, with an end-of-session recount that tells new holes from old ones. The project was handed over to the client together with the test harness and the recorded test videos.