Multi-person pose detection and tracking for wall dancers in low-light outdoor settings.
chmod +x install.sh run.sh
./install.sh # installs dependencies via uv
./run.sh # launches GUI + camera processingRequirements: Python 3.10+, uv installed (pip install uv if missing), a webcam or capture card, and optional CUDA GPU for best performance. Model weights live in models/ (some are included in the repo; others may be downloaded by Ultralytics depending on configuration).
WallDance is free software licensed under the GNU General Public License v3.0 (GPLv3). See LICENSE.
WallDance uses Ultralytics YOLO for pose estimation and relies on pretrained YOLO model files (e.g. *.pt, *.onnx) and optionally TensorRT engines (*.engine).
- Some model files may be present in this repository (for convenience), and the Ultralytics stack may also download model weights automatically if a requested model file is missing.
- Model weights/engines and the Ultralytics package are third-party components and are not covered by WallDance's GPLv3 license.
- Your use of YOLO software and/or model weights may be subject to separate licenses, terms, and conditions (including restrictions that may vary by model and by commercial vs non-commercial use).
Please review and comply with the applicable terms for:
- Ultralytics YOLO (code/package): https://github.com/ultralytics/ultralytics
- Ultralytics documentation / licensing pages: https://docs.ultralytics.com/
This note is informational and not legal advice.
Production Hardware: IDS U3-34E0XCP-M-GL camera (4MP Starvis 2 mono), Tamron 8mm lens, MidOpt BP850 IR filter, ASUS ROG Strix SCAR 16 (RTX 5080). See HARDWARE_GUIDE.md for details.
- Top bar: pick project, pick saved config version, save current settings, GPU/VRAM readout.
- Video panel: live preview with INPUT / PREVIEW / ENHANCE / MODEL tables, plus FPS/dancer counts and timing breakdowns.
- Control panel: detection caps, visualization toggles, tracker tuning, OSC target, quit button.
Keyboard shortcuts: Q quit, E enhance, S skeleton, K keypoints, B bbox, T trails, I IDs, R reset tracker, +/- adjust preview scale.
- Configs are stored under
configs/<project>/<project>_YYYYMMDD_HHMMSS.json. - The GUI top bar lets you create/select projects, pick a saved version, and save the current settings; the latest project is remembered in
configs/last_project.txt. - Settings cover camera source, preview scale, enhancement, YOLO model/imgsz/conf, tracker params, OSC target, and visualization flags.
- Camera capture (via OpenCV, see
camera_manager.py). - Optional enhancement (CLAHE + gamma) in
enhancer.py. - Pose detection with Ultralytics YOLO in
pipeline.FrameProcessor. - Duplicate filtering + Kalman/Hungarian tracking in
tracker.py. - Rendering/overlay in
visualization.pyand OSC output inosc_output.py. - DearPyGui front-end in
gui.py+ layout helpers ingui_builder.py.
main.py— thin entrypoint delegating toapp.main.app.py— orchestrator wiring camera, pipeline, GUI, OSC, and configs.pipeline.py— frame processing (enhance → YOLO → dedupe → track → OSC).camera_manager.py— camera discovery/open/close with state.config_store.py— save/load configs per project and remember last project.gui.py— GUI logic/callbacks;gui_builder.py/gui_icons.pyhold layout/theme.enhancer.py,tracker.py,osc_output.py,visualization.py,config.py— processing utilities and defaults.
Support files: install.sh (uv sync), run.sh (launch), configs/ (saved presets), models/ (YOLO weights).
- Enable TensorRT via the TRT checkbox for ~2× inference speedup (first build takes 2-5 minutes).
- Switch to
yolo11n-poseoryolo11s-posefor speed;yolo11mis a balanced default. - Enable FP16 when running on CUDA for ~20-30% speedup (applies to PyTorch mode).
- Increase Frame Skip (1–2) if the scene is stable; tracker interpolates between detections.
- Lower preview scale if the UI lags; it only affects display, not detection.
TensorRT provides significant inference speedup (~2×) by optimizing the model for your specific GPU.
- In the MODEL section, check the TRT checkbox
- If no engine exists for the current model + imgsz, you'll be prompted to build one
- Building takes 2-5 minutes (GPU stats update during build)
- Once built, the engine is saved and reused automatically
- Engines are named
{model}_{imgsz}.engine(e.g.,yolo11m-pose_960.engine) - Different imgsz settings require different engines
- Engines are GPU-specific and must be rebuilt on different hardware
- Engine preference is saved with your config
- If TensorRT is unavailable, the checkbox will be disabled
- If an engine fails to load, the app falls back to PyTorch
- On startup, if saved config had TRT but engine is missing, PyTorch is used
All coordinates are normalized (0–1) to the input frame.
| Address | Arguments | Description |
|---|---|---|
/walldance/count |
[n] |
Number of tracked dancers |
/walldance/dancer/<id>/centroid |
[x, y] |
Dancer center |
/walldance/dancer/<id>/bbox |
[x, y, w, h] |
Bounding box |
/walldance/dancer/<id>/velocity |
[vx, vy] |
Velocity |
/walldance/dancer/<id>/keypoints |
[x0,y0,c0, ...] |
17 keypoints (51 floats) |
/walldance/clear |
[1] |
Tracker reset event |
- No detections: verify camera with
ffplay /dev/video0, lower confidence, or upscale more. - Flicker/ID swaps: raise tracker distance/age, lower confidence slightly, ensure lighting is stable.
- Slow FPS: use faster model, enable TensorRT, enable FP16, increase frame skip, or reduce preview scale.
- TRT build fails: ensure CUDA drivers are up to date, check GPU memory, try smaller model first.
- TRT checkbox disabled: TensorRT not installed; install with
pip install tensorrt. - OSC not received: check IP/port, ensure firewall allows UDP, verify the
Enable OSCtoggle.