Slouch Tracker watches your webcam and warns you when you start slouching. Everything runs on your own computer: no cloud services, no accounts, no telemetry. The only time it ever touches the network is a one-time ~245 MB download of its pose model on first launch (see About the installer); after that it works fully offline.
Privacy mode with the live skeleton avatar. Detection keeps running while the camera feed stays obscured:
| Good posture | Bad posture |
|---|---|
You need: Windows 10 or 11 (x64), a webcam, and a DirectX 12-capable GPU (if yours isn't, the app tells you clearly at startup).
Camera placement: put the camera to the side of you, at eye level or slightly above. A side view makes slouching obvious to the pose model; overhead angles weaken it.
Download and install the latest release from the GitHub Releases page.
Windows SmartScreen will show a blue "Windows protected your PC" warning, because the build is unsigned. This is expected: click More info, then Run anyway.
On first launch the app downloads its pose model (~245 MB) once, then never needs the network again. Installing on a machine without internet? See Fully offline installation.
The app is a single window: your camera view with a status badge, plus a slide-in panel with Settings, Collect, and Training tabs.
Teach it your posture. Sit well and press G a few times; slouch and press B; step away and press A. A couple dozen frames of each is plenty to start. Then open the Training tab and press Train — your personal model deploys immediately, and from then on the app beeps when you hold a bad posture.
| Key | Action |
|---|---|
G |
Capture a good posture frame |
B |
Capture a bad posture frame |
A |
Capture an away frame |
C |
Clear sampled frames |
U |
Undo last dataset change |
The same captures work while the app is in the background via the global hotkeys Ctrl+Win+G / Ctrl+Win+B / Ctrl+Win+A, with a confirmation beep. The app keeps tracking from the system tray when you close the window, and it tells you when your model would benefit from retraining as your dataset grows.
- Your own personal detector: trained on your body, your chair, and your camera angle, not someone else's dataset.
- Privacy mode: the camera image is obscured both on screen and in anything saved to disk, while detection keeps running.
- Runs quietly in the tray, can start with Windows, and typically uses 1 to 2% CPU.
- Global capture hotkeys that work while the app is unfocused.
- Alerts only after posture stays bad for a delay you control.
- Your dataset is portable: export and import it as a
.slouchpackfile.
- Everything runs locally: detection, feature extraction, and training happen on your own machine, with no telemetry. The only network use, ever, is the one-time pose-model download on first launch, and even that is avoidable by pre-placing the model (see Fully offline installation).
- Your data stays on disk: frames, keypoints, feature vectors, thumbnails, settings, and trained models live in a local SQLite database under your user app-data directory.
RTMDet-nano finds the person on the CPU; NLF-L then estimates 17 keypoints plus 3D depth on the GPU through the DirectML execution provider, both running on native ONNX Runtime (the Rust ort crate). A classifier you train in-app on your own labeled frames makes the final call: good, bad, or away. Detection runs at ~1 fps in every window mode; the preview renders at ~30 fps while the window is focused.
The training side is registry-driven: six classifier types (mlp, knn, svm, kmeans_prototype, gaussian_nb, kmeans_logistic) with auto-generated parameter controls, 12 selectable feature types (RTMDet features, NLF-L 3D-depth features, geometric and keypoint features), normalization (z_score/layer/none), dimensionality reduction (pca/random_projection/none), and optional k-fold cross-validation with reported metrics.
Slouch Tracker is a Tauri 2 app: a Rust backend workspace (the app crate plus slouch-domain, slouch-ml, slouch-vision, slouch-store) with a deliberately thin Svelte 5 UI. The camera is owned natively (nokhwa, MJPEG) and previewed in the webview through a custom slouchcam:// URI scheme; the frontend talks to Rust through generated Specta bindings, with three raw-byte MessagePack commands reserved for bulk image data. See specs.md for the full architecture.
- The installer is small. It bundles the person-detection model (RTMDet-nano, ~4 MB) and the native ONNX Runtime, but not the pose model. The first time you launch Slouch Tracker, it downloads the pose model (
nlf_l_crop_fp16.onnx, ~245 MB) once from the project's GitHub Releases, verifies it against a pinned SHA-256, and caches it in your app-data directory. This one-time download is the only network access the app ever makes. - WebView2 runtime, at install time, on some systems: any system that already has the Microsoft WebView2 runtime (all of Windows 11 and virtually all of Windows 10) installs offline. On the rare stripped-down system without it, such as Windows 10 LTSC/IoT or a deliberately debloated install, the setup program downloads the small WebView2 runtime from Microsoft once. This is a Windows component fetched by the installer, separate from the pose-model download the app does on first launch.
- Per-user install: installs for the current user, so no administrator prompt is required.
- Your data survives uninstall. By default the uninstaller leaves your dataset, trained models, and settings on disk. Deleting them is opt-in: tick the delete application data checkbox in the uninstaller only if you want a full wipe.
- Each release includes a
SHA256SUMS.txtwith the installer's hash if you want to verify your download.
If a machine will never have internet access, place the pose model manually before first launch. The app detects it and never attempts the download:
- On any connected machine, download the pose model from
https://github.com/SSS135/slouch_tracker/releases/download/models-v1/nlf_l_crop_fp16.onnx. - Verify its SHA-256; the printed hash must equal
33bd300cd5a65681a5d671debd82a63f842c7420443cd9bb7424ca7aef82cca8:Get-FileHash '.\nlf_l_crop_fp16.onnx' -Algorithm SHA256
- Copy the file into your app-data models folder (create the
modelsfolder if it does not exist):%APPDATA%\com.slouchtracker.main\models\nlf_l_crop_fp16.onnx.%APPDATA%expands toC:\Users\<YourName>\AppData\Roaming, so the full path isC:\Users\<YourName>\AppData\Roaming\com.slouchtracker.main\models\nlf_l_crop_fp16.onnx. - Install and launch Slouch Tracker. It checks this path before any network request:
- If the file is present and the hash matches, the app starts normally and makes no network requests at all.
- If the file is present but corrupt (hash mismatch), the app reports that the pose model is invalid and offers to re-download it; replace it with a correct copy to stay fully offline.
- Windows 10/11 (x64)
- Git LFS, required. The RTMDet detection model (
rtmdet-nano.onnx, ~4 MB) and the app icons are stored via Git LFS; cloning without Git LFS installed produces pointer files instead of the real assets, and the build will be broken. The larger NLF-L pose model (~245 MB) is not in the repository. Dev builds obtain it the same way end users do (first-run download), or you can place it manually; see the note under Steps. - Rust 1.88+ (with the
x86_64-pc-windows-msvctoolchain) - Node.js 20+
- Visual Studio 2022 with the Desktop development with C++ workload (any edition; Community works)
- WebView2 runtime (preinstalled on Windows 11; on Windows 10 install the Evergreen runtime from Microsoft)
# 1. Install Git LFS once per machine
git lfs install
# 2. Clone (LFS assets are fetched automatically)
git clone https://github.com/SSS135/slouch_tracker.git
cd slouch_tracker
# 3. Install frontend dependencies
npm install
# 4a. Run in development
npm run tauri:dev
# 4b. Or build the Windows NSIS installer
npm run tauri:build:winCargo must run inside a Visual Studio 2022 x64 developer environment (vcvars64).
npm run tauri:*handles this when launched from a developer shell; for rawcargocommands, first run:call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat".
Pose model for dev builds: development and release builds do not bundle the NLF-L pose model. On first launch the app downloads it automatically, or you can pre-place
nlf_l_crop_fp16.onnx(SHA-25633bd300cd5a65681a5d671debd82a63f842c7420443cd9bb7424ca7aef82cca8) at eithersrc-tauri\resources\models\nlf_l_crop_fp16.onnxor the app-data path%APPDATA%\com.slouchtracker.main\models\nlf_l_crop_fp16.onnx. See Fully offline installation.
# Frontend tests (Vitest)
npm run test:svelte
npm run test:svelte -- <pattern> # single file / pattern
# Type checking and linting
npm run check:svelte
npm run check:svelte:plumbing
npm run lint:svelte
# Rust tests (must run inside a VS 2022 x64 dev environment / vcvars64)
node scripts/run-gate.mjs # wraps fmt / clippy / test with vcvars64
# or directly:
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && cargo test --manifest-path src-tauri/Cargo.toml --workspace
# End-to-end
npm run test:e2e:web # Playwright against the mock-Tauri browser harness
npm run tauri:build:dev:win && npm run test:e2e:native # WebdriverIO against the devbuild binaryAfter changing any Rust command signature, DTO, or event, regenerate and verify the TypeScript bindings:
npm run bindings:generate
npm run bindings:checkSlouch Tracker is released under the MIT License.
Binary licensing note: the MIT license covers the source code. The installer bundles only MIT, Apache-2.0, and CC0-1.0 components, including the Apache-2.0 RTMDet detector and a CC0-1.0 3D avatar model by Quaternius (see THIRD-PARTY-NOTICES.md). The NLF-L pose model is downloaded on first launch from the project's Releases, hosted with the permission of its author, István Sárándi. Because the pose-model weights are non-commercial, the Slouch Tracker application is for non-commercial scientific research, non-commercial education, or non-commercial artistic use cases only.
Third-party components and their licenses are listed in THIRD-PARTY-NOTICES.md.
- OpenMMLab: RTMDet person-detection model.
- NLF (Neural Localizer Fields): NLF-L 3D human-pose model (weights are for non-commercial research use only).
- Quaternius: the Universal Animation Library mannequin used for the 3D avatar (CC0-1.0; credited voluntarily).
- Microsoft ONNX Runtime: native inference runtime.
- Tauri: the desktop application framework.