| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
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.
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:
Get-FileHash '.\nlf_l_crop_fp16.onnx' -Algorithm SHA256# 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 raw cargo commands, 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-256 33bd300cd5a65681a5d671debd82a63f842c7420443cd9bb7424ca7aef82cca8) at either src-tauri\resources\models\nlf_l_crop_fp16.onnx or 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.
| Back | FazBrowse Home | New Git URL |