AI Fitness Coach¶
Copyright © Quectel Wireless Solutions Co., Ltd. 2026. All rights reserved.
This project uses the Quectel Pi H1 smart single-board computer as an AI edge computing platform. It recognizes 17 human keypoints in real time through a USB camera, and performs real-time counting (or timing), form correction and voice coaching for six exercises — squat, jumping jack, high knees, lunge, lateral raise and horse stance — turning the board into an out-of-the-box AI fitness mirror.
AI pose-estimation inference runs on the Qualcomm QCS6490's onboard Hexagon NPU (HTP v68) with two-stage inference at about 43 ms per frame, and the application works fully offline — video and data never leave the device. The UI is a comic-style interface with one-tap Chinese/English switching, and voice coaching is available in Chinese (Xiaoxiao) and English (Jenny). It is well suited for edge AI demonstrations and smart fitness product prototyping.
Development accessories list¶
Note: the following accessories are recommended; adjust them flexibly according to your demo scenario.
Accessory |
Qty |
Specification |
|---|---|---|
Quectel Pi H1 smart single-board computer |
1 |
Qualcomm QCS6490, onboard Hexagon NPU |
USB camera |
1 |
UVC protocol, 640×480 or above |
Speaker |
1 |
Connected to the onboard audio output jack, or a Bluetooth speaker |
Touch screen / Micro HDMI monitor |
1 |
The onboard touch screen works out of the box; alternatively connect a monitor via a Micro HDMI cable |
USB data cable |
1 |
For adb deployment and debugging from a host PC (optional) |
Type-C power adapter |
1 |
Powers the board |
USB keyboard & mouse (optional) |
1 set |
The touch screen supports direct operation; keyboard and mouse are handy for debugging |
Accessories reference¶
Quick start¶
Environment requirements¶
A Quectel Pi H1 smart single-board computer running the factory Debian 13 desktop (GNOME Wayland) — no extra system configuration is required.
The onboard touch screen, or a Micro HDMI monitor that can show the H1 desktop.
A USB UVC camera and a speaker (onboard audio jack or Bluetooth both work).
No internet, no dependency installation, no compilation — the installer bundles the complete runtime (Python, AI inference engine, UI toolkit), AI models and Chinese/English voice resources (about 1 GB after extraction).
Regular users must be in the
videoandaudiogroups for the camera and sound to work.
Key technical specifications¶
Item |
Specification |
|---|---|
Pose estimation model |
YOLO11n-pose, two-stage inference: QDQ int8-quantized backbone on the NPU + fp32 detection head on the CPU (not quantized, to keep keypoint accuracy) |
Human keypoints |
17, with real-time skeleton overlay |
AI inference |
Onboard Hexagon NPU (HTP v68), two-stage inference at about 43 ms per frame |
Supported exercises |
Squat, jumping jack, high knees, lunge, lateral raise (counting) + horse stance (timing) |
Voice and UI |
One-tap Chinese/English switching; offline voice — Chinese Xiaoxiao / English Jenny |
Operation mode |
Fully offline; video and data never leave the device |
Installer size |
About 222 MB, about 1 GB after extraction (full runtime, models and voice resources included) |
Hardware connection¶
Complete the following connections. The interface diagram is shown below (step numbers correspond to the labels in the figure):
Display: connect a Micro HDMI cable from the board's Micro HDMI port to a monitor (skip this if you use the onboard touch screen);
Network (optional): connect the gigabit Ethernet port to a router — only needed for SSH debugging; the application itself requires no internet;
Peripherals: plug the USB camera, keyboard and mouse into the board's USB-A ports; for wireless peripherals just insert their receivers;
Power: plug the Type-C end of the power cable into the port marked POWER IN, and the other end into the power adapter;
Cooling (recommended): insert the cooling fan's cable into the FAN header — the inference workload is heavy, so a fan is recommended;
Speaker: connect a speaker to the onboard audio output jack, or use a Bluetooth speaker (voice output follows the system audio device).
One-click deployment¶
The whole application is packaged as a self-extracting installer ai-fitness-coach-installer.run (about 222 MB). Send it to the board and run it once; installation takes about 1–2 minutes.
Step 1: send the installer to the board (choose either way)
Option A — USB flash drive (most straightforward):
Copy
ai-fitness-coach-installer.runonto a USB flash drive;Plug the drive into the board and copy the installer to the home directory with the file manager.
Option B — adb push (common for development):
adb push ai-fitness-coach-installer.run /home/q/
Step 2: run one command in the board's terminal
Open a terminal, go to the directory containing the installer and run:
./ai-fitness-coach-installer.run
By default it installs to
~/ai-fitness-coachof the current user; you can pass a directory argument to install elsewhere.Both root and regular users can install it; running it again automatically removes the old version and reinstalls.
Step 3: done — double-click to launch
After installation, open the file manager, go to ai-fitness-coach/code/ and double-clickai-fitness-coach — it is not a script but a compiled launcher, so double-clicking runs it directly without a "run or display" dialog.
Double-clicking again restarts the app (the old instance is stopped first);
Press Esc to quit the app;
Logs are written automatically to
~/.local/state/fitness-coach/app.log.
Application usage¶
Main UI¶
The main UI consists of the following areas:
The title bar and the language toggle (the EN / 中 button at the top right).
Live preview: mirrored image (like a selfie) with a 17-keypoint skeleton overlaid in real time, plus the「− + 1.0x」digital zoom buttons underneath.
The count/timer card: shows the score of the current exercise.
The stage bar: shows the current state (Standby / Standing / Squatting / No person detected, etc.) and form-correction tips.
Control buttons: ▶ Start (turns into an orange Pause during training), Reset, Finish.
The exercise picker: tap it to open the exercise list popup — six exercises, each with a「▶ Demo」reference-video button.
Start training: Standby → Training → Paused¶
On startup the app is in Standby — preview only, no counting. This is an intentional anti-distraction design:
Tap the blue ▶ Start button; the app announces "three, two, one, go" and counting begins;
During training the button turns into an orange Pause; tap it to freeze the score. Walking around or resting in front of the camera while paused is never counted;
Tap ▶ Resume to continue; the score keeps accumulating;
The Reset button clears counts and timers for a fresh round.
Switching exercises¶
Tap the picker on the right to open the in-window list: choose any of the six exercises — squat, jumping jack, high knees, lunge, lateral raise, horse stance (horse stance shows hold seconds; the others show counts). Each row has a「▶ Demo」button that plays a reference video of that exercise in the preview area; it collapses automatically when finished, or tap ✕ to close it early.
The currently selected exercise is marked with a ▶ arrow;
On switching, the app announces the exercise name plus "three, two, one, go";
Switching has a 1.5-second cooldown with mis-touch protection, so a hand sweeping the screen mid-workout won't switch exercises.
Tap anywhere outside the popup to close it; the popup always opens inside the window, right under the picker.
Digital zoom¶
Below the preview are three zoom buttons「− + 1.0x」: + zooms in, − zooms out, 1.0x resets, with the current factor shown on the right. The zoom range is 0.5×–3× in steps of 0.25×; keyboard shortcuts +, - and 0 also work.
Zooming uses center-crop magnification, and AI detection and the skeleton follow the zoomed image — when the person is far away or small in the frame, zooming in makes keypoint detection more stable.
Chinese/English switching¶
Tap the EN button at the top right to switch the entire UI, prompts and voice to English; tap 中 to switch back to Chinese.
Voice announcements¶
Connect a speaker to the onboard audio jack (Bluetooth speakers also work, following the system output device) to hear all voice prompts:
Welcome message and exercise names (e.g. "Squat mode");
The "three, two, one, go" countdown;
A count announcement per completed rep, with an encouragement message every 10 reps;
Real-time form corrections, e.g. "knees out of frame, step back" or "you're bending forward — squat, don't bend over".
Posture and exercise tips¶
Tip |
Advice |
|---|---|
Squat positioning |
2.5–3.5 m from the camera, facing it; keep your knees inside the frame when squatting (you'll be reminded if they leave it) |
Squat depth |
Squat until your thighs are roughly parallel to the floor (knee angle ≈ 115°) for a rep to count; shallower squats show "last squat not deep enough (angle), not counted" |
Jumping jack positioning |
Full body in frame, 2.5–4 m away; "open" means feet wider than 1.35× shoulder width with wrists above the head; returning to feet together counts one rep |
High knees |
Full body in frame; each knee lifted to hip height (thigh level) then lowered counts 1, left and right legs count independently |
Lunge |
Face the camera and step one leg forward; the bent knee must go below ≈ 135° to count, with an upright torso (excessive forward lean doesn't count) |
Lateral raise |
Both arms raised simultaneously past the shoulder line counts 1; lowering both arms starts the next rep; both lateral and front raises are recognized |
Horse stance |
Feet wider than 1.1× shoulder width, knees below ≈ 135° starts the timer; standing up to rest doesn't reset it — hold seconds keep accumulating |
Lighting |
Well-lit environment, avoid backlighting for the most stable detection |
Application demo¶
Demo video¶
A full feature-tour video (about 84 s, 1280×810): with the live USB camera feed in the background, it walks through every feature of the app — the exercise list and reference demos (auto-collapse after playback), start training, live counting, pause/resume, reset, digital zoom, Chinese/English switching and finish — narrated by AI voice with subtitles.
FAQs¶
Black preview or "No person detected" after startup¶
Make sure the USB camera is plugged in (try another USB port).
Check that the lighting is sufficient and there's no backlight.
Make sure the person is in frame at a proper distance (2.5–3.5 m).
Check that the current user is in the
videogroup: rungroupsin a terminal; if missing, runsudo usermod -aG video "$USER"and log in again.
No sound¶
Make sure the speaker is connected to the onboard audio jack (or that Bluetooth is paired).
Check the system volume and output device (Settings → Sound).
Check that the current user is in the
audiogroup; if missing, runsudo usermod -aG audio "$USER"and log in again.
Squats not counted¶
Check in order:
Are you in Standby or Paused state? Tap「▶ Start / Resume」first.
Are you too close? If your knees or hips leave the frame while squatting, the UI shows "knees out of frame, step back" — step back beyond 2.5 m.
Are you squatting deep enough? The stage bar shows "last squat not deep enough (angle), not counted" — squat until your thighs are near parallel with the floor.
Jumping jacks not counted¶
Jumping jacks require the full body in frame. Step back to 2.5–4 m so that both your head and feet are visible; a complete rep needs feet wider than 1.35× shoulder width and both wrists above the head.
Double-clicking the launcher does nothing¶
Make sure you double-clicked
ai-fitness-coach(the extension-less launcher), notrun.sh.Just double-click again — the launcher stops the old instance and restarts the app.
Use Esc or a double-click restart to quit or restart the app; do not force-kill the process with
kill -9— a force kill can break the NPU subsystem and prevent the app from starting again. Rebooting the board restores it.
Viewing the logs¶
tail -f ~/.local/state/fitness-coach/app.log
If the log file under the home directory isn't writable (e.g. root and a regular user installed in turn), the app automatically falls back to /tmp/fitness-coach-.log; startup is never blocked.
Technical support and contributions¶
If you run into problems during use or secondary development, please provide: the system firmware version, camera model, the full on-screen prompts and a fragment of app.log. Feel free to post technical questions on the Quectel official forum; our technical support team will respond promptly.
Issues and pull requests are welcome.