Skip to content

Stry233/alice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alice

Banner

Autofocus Lens Interface for Cinema Equipment

License Platform Qt

Alice turns any camera into an autofocus cinema rig. It pairs a depth sensor with a wireless focus motor to deliver tap-to-focus, continuous autofocus, and real-time face/eye tracking — no camera firmware integration required. Works with any manual or adapted lens.

Demo

Demo

Full video

Architecture

Alice is a three-component system:

Family

Component Description
Android App Mobile control surface. Runs face detection (ONNX YOLO + ML Kit), depth processing, and motor control over USB. Can operate standalone or pair with Alice Studio.
Alice Studio Qt 6 desktop application for Linux and Windows. Full-featured monitoring station with live camera preview, depth overlay, autofocus pipeline, calibration tools, and system telemetry.
Dongle Firmware Zephyr RTOS on nRF52840. Bridges USB CDC-ACM serial to IEEE 802.15.4 wireless to control the Tilta motor.

You can use either Android or Studio client based on your need. When both apps are running, they pair over LAN via WebSocket. The desktop streams the camera feed and depth overlay to the phone, and both sides can control the motor and autofocus modes in real time.

Features

Autofocus Modes

Mode Shortcut on Studio Description
Manual (MF) M Direct motor slider control. Full 0-4095 position range with 5 preset buttons.
Single (AF-S) S Tap to measure depth and focus once. Locks until next tap.
Continuous (AF-C) C Tracks depth at the selected point. Re-focuses automatically as the subject moves.
Face Tracking (AF-F) F YOLO-face detection with per-subject Kalman tracking, eye-priority focus, and hysteresis-based primary selection. Tap a face to pin it.

Alice Studio (Desktop)

  • OPS mode — live camera feed (zoomable), depth preview with measurement reticle, motor position slider, face/eye tracking overlay, real-time histogram, system telemetry
  • CFG mode — lens calibration with interactive graph, resolution and quality settings, LAN sync management, transmission quality sliders
  • Hardware identity — status badges show real device names (from USB/RealSense descriptors), uptime, and per-device restart/disconnect/reconnect controls
  • GPU acceleration — face detection runs on TensorRT, CUDA, or DirectML depending on the platform; CPU fallback runs at 60+ fps on desktop
  • Cross-platform sync — QR-code pairing with the Android app over WebSocket; streams camera, depth, and face data bidirectionally with per-stream quality control

Android App

  • Standalone operation with all four AF modes
  • ONNX YOLO face detection with ML Kit eye landmark refinement
  • Live depth overlay with draggable measurement point
  • Motor discovery and address scanning
  • Calibration recording and JSON export
  • Sync with Alice Studio for remote monitoring

Hardware Requirements

Component Requirement Notes
Phone / Tablet Android 8.0+ (API 26) USB 3.0 recommended for full RGB+depth streaming.
Desktop Linux or Windows Qt 6.5+, C++17 compiler. See BUILD.md.
Depth Camera Intel RealSense D415 / D435 / D455 / D405 Any D4xx series. Used models work fine.
Focus Motor Tilta Nucleus Nano II Hand controller needed only for initial pairing.
Wireless Bridge nRF52840 USB Dongle Flashed with Alice firmware.
Accessories (optional) USB hub To connect peripherals to the phone or desktop.
Capture Card (optional) Any UVC-class HDMI capture card For monitoring the camera's HDMI output on Alice.

Quick Start

  1. Flash the dongle — download firmware.hex from Releases and flash via nRF Connect Programmer
  2. Pair the motor — use the Tilta hand controller to pair on channel 12, then turn the controller off
  3. Install the app — install Alice client on Relaease page, or build from source.
  4. Connect hardware — plug the dongle, RealSense, and (optionally) a capture card into a USB hub or your PC's I/O interface.
  5. Calibrate your lens — record 3-5 depth/motor points across your focus range, then export
  6. Shoot — select AF-S, AF-C, or AF-F and let Alice handle focus

Documentation

Guide Description
Getting Started Hardware setup, firmware flashing, first connection
Android Guide Android app features and daily usage
Alice Studio Guide Desktop app features, keyboard shortcuts, layout modes
Sync Setup Pairing Android and Desktop over LAN
Calibration In-depth calibration workflow and best practices
Troubleshooting Common issues and solutions
Building from Source Compile instructions for Android, Desktop, and Firmware

USB 2.0 Notes

USB 3.0 is recommended. On USB 2.0 (480 Mbps), Alice disables the RGB stream and runs depth-only mode. Autofocus still works, but frame rates may be lower.

Limitations

  • Depth accuracy varies with sensor model, lighting, and scene content. Reflective surfaces and extreme lighting degrade readings.
  • Per-lens calibration required. Each lens needs its own depth-to-motor mapping. Non-parfocal lenses need separate profiles per focal length.
  • Supplementary tool. For critical cinema work, a skilled AC is still your best option. Alice is designed for solo shooters and low-stakes scenarios.

Acknowledgements

Prior Work

The Tilta motor communication protocol was derived from strawlab/tilta-n2-control, with modifications for Alice's requirements. Some firmware flashing instructions are adapted from their documentation.

If you find code that should be attributed but isn't noted in the source, please open an issue.

AI Assistance

Parts of the codebase were developed with assistance from Claude (Anthropic). All AI-generated code was reviewed and verified by the maintainer. Individual commits note the model used in the Co-Authored-By trailer.

The assets in the video demo and documents are based on real photography, processed with Nano Banana Pro to optimize lighting and backgrounds.

License

MIT