Rekkefly
Rekkefly is the new Kinefly. It tracks the wings of a tethered insect (a fly, bee or moth) from a camera or a video file. It streams each wing's angle and L − R, the steering signal, to your closed-loop experiment in real time. It is one small native program for macOS, Windows and Linux, with no ROS, Python, OpenCV or Docker to install.
A real tethered Bogong moth, the example that ships with every download, exactly as filmed at 30 fps. Drawn on top: the body axis, each wing’s sector around its hinge, and the leading edge Rekkefly reports (bold) with the other edge it found (thin). The window, with its debug traces, is shown in The window.
What it does
- Measures wing-stroke amplitude the way Kinefly does: it finds the leading edge of each wing’s motion-blur envelope inside an annular sector around the wing hinge, every frame.
- Ignores legs and antennae. On the real moth, thin lines painted through the wings moved Rekkefly’s L − R on 3 of 900 frames, and the classic detector’s on 489 (evidence).
- Keeps up easily. About 340 µs per 640×480 frame. A 30 fps rig uses 6% of one core and 10 MB of memory (performance).
- Speaks Kinefly. The ZMQ message is the one the Kinefly Docker bridge sends, so existing subscribers keep working (outputs).
- Runs a lab, not just a rig. One TOML file starts every rig with its own camera, ports, label and settings (several rigs).
- Works with agents and scripts. A built-in MCP server
lets an AI agent run rigs, look at the tracking and measure trials, and every
command has
--jsonoutput.
Where to start
| You want to | Read |
|---|---|
| Install it and see it track | Install, then Quick start |
| Set up a new rig well | Placing the markers and Tuning a rig |
| Move an existing Kinefly setup | Coming from Kinefly |
| Connect your experiment | Receiving measurements |
| Run many arenas | Several rigs at once |
| Let an AI agent run it | AI agents (MCP) |
| Know how far to trust it | The detectors and Evidence |
| Look up a setting | Configuration and Command line |
The name
Rekkefly joins ರೆಕ್ಕೆ (rekke, the Kannada word for wing) with fly. It nods to its roots in Kinefly, which made real-time wing tracking practical for tethered-flight rigs, and Kinefly Docker, which kept it running. Rekkefly was written from scratch in Rust; it shares no code with either.
Rekkefly is free software under the MIT License. The source, releases and issue tracker are on GitHub.