Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Vera, the posture mascot, upright and smiling

PosturiAmo

A webcam coach that notices you slouching before your back does.

Hackathon project Computer vision

The problem

Students and desk workers sit for hours, and posture damage is silent. Forward-head "tech neck" and lumbar slouching build up unnoticed until they start to hurt — by which point the habit is already set.

The missing piece isn't willpower, it's awareness in the moment. You can't correct a posture you don't know you're holding.

PosturiAmo closes that loop: it watches the webcam feed, recognises how you're sitting badly, and says something about it — immediately, and specifically.

Built under hackathon time pressure, with the full loop delivered inside the event window: problem framing, model training, interface, voice coaching.

What it does

Three-state pose classification. A Teachable Machine model reads the live webcam feed and sorts it into:

Class Meaning Response
COLLO Forward neck — head pushed toward the screen "Alza lo schermo all'altezza degli occhi"
SCHIENA Slouched back — spine collapsed in the chair "Schienale e piedi a terra"
VUOTO Nobody at the desk Timer pauses — standing up is never penalised

A mascot you read at a glance. Vera is an animated spine. She doesn't need to be read, only noticed:

Green: good posture     Yellow: drifting     Red: correct your posture

Voice coaching, not notifications. Recorded Italian audio delivers the cue matched to the specific fault. Audio beats a popup because it reaches you without pulling your eyes off your work.

An anti-sedentary timer. Tracks minutes seated and breaks taken. Sit still too long and it calls an active break, drawing at random from a library of 8 exercises:

Stand up and take ten slow steps · Roll your shoulders back ten times · Chin tuck, hold three seconds, ten reps · Arms overhead, five deep breaths · Sit-to-stand five times · Look out of the window for twenty seconds · Rotate your torso side to side five times · Go and get a glass of water

Technical highlights

Confidence gating plus temporal debouncing. The naive approach — act on whatever the model says this frame — produces constant false positives: a single blurred frame flips the class and the app starts nagging. PosturiAmo requires two conditions before any advice fires:

  1. Classification confidence above a 0.7 threshold
  2. The class persists across checks (classe vs classe_prec, guarded by attesa and verificata)

The result is advice that triggers on genuine posture change rather than on webcam noise.

Event-driven architecture. Five broadcast channels decouple the subsystems, so the inference loop never blocks on audio playback or timer logic:

Channel Responsibility
motore Inference loop — reads the model, updates state
orologio Sedentary timer and break accounting
pausa Active-break sequence and exercise selection
consiglio_collo Neck-specific coaching
consiglio_curva Slouch-specific coaching

Runtime-tunable threshold. The confidence cutoff is exposed as a live slider, so the model can be retuned on the spot for a different room, laptop or lighting condition — essential when demoing on unfamiliar hardware.

Absence handling. VUOTO is a first-class state, not an error case. The timer pauses when you leave, so the app never scolds you for having taken the break it asked for.

Running it

  1. Install PictoBlox 9.2 or later
  2. Open PosturiAmo.sb3
  3. Allow webcam access, then click the green flag
  4. Press r to reset the session counters

The Teachable Machine pose model is trained on three classes; retrain from your own desk setup for best accuracy.

Built with

PictoBlox 9.2 · Google Teachable Machine (pose classification) · Scratch 3 VM · webcam capture · recorded Italian voice audio


Built by Veronica Martelli · Pescara, Italy

About

Real-time posture coach: a Teachable Machine pose classifier that catches slouching over the webcam and prescribes active breaks. Hackathon project.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors