Body OS

Your devices don't
know how you feel.

FocuX is the missing layer between your body and your devices. It senses your physiological state in real time and tells you when to rest.

Download on App Store Open Source on GitHub
scroll
The Problem

Technology floods you with data.
But never listens to your body.

Your devices can push information to you at 1 Gbps, yet they know absolutely nothing about your physiological state. This asymmetry is costing us dearly.

$322B
Global annual cost of burnout-related turnover and lost productivity.
Gallup, 2024
76%
Workers report burnout symptoms at least sometimes.
APA Workplace Survey, 2023
23min
Average refocus time after a single interruption.
Mark et al., UC Irvine
35M+
Digital nomads worldwide — no office, no ergonomic support, no signals to stop.
Nomad List, 2024
How It Works

Sense. Compute. Suggest.

Wear the wristband sensor. FocuX translates your physiological signals into a Stamina score (0-100) — your body's battery level.

01 Sense

Capture Signals

8-channel sensor continuously reads forearm physiological signals at high sampling rate. Dry electrodes, no gel — wear it like a watch.

02 Compute

Edge Processing

84-dimensional feature extraction + CoreML on-device inference. Everything runs locally on your iPhone. No cloud, no latency, no privacy concerns.

03 Suggest

Gentle Reminders

Based on your personal baseline and rhythm, it suggests breaks at the optimal moment. No interruptions, no forced stops — sense, don't control.

Three Dimensions

Not a crude single number.

Stamina is a fusion of three orthogonal dimensions, each backed by independent biomarkers.

C82%

Consistency

Motor unit recruitment stability. The more stable your activation pattern, the more precise your control.

T45%

Tension

Involuntary sustained muscle contraction. You might be clenching without even knowing it.

F28%

Fatigue

Spectral shift is the gold-standard biomarker for neuromuscular fatigue (MDF, De Luca 1997).

Model & Data

Open science,
real numbers.

Our models, data, and methodology are fully open source. Here are the core metrics and architecture.

Gesture Classifier

RandomForest (n=200 trees)

Trained on Ninapro DB5 public dataset with Leave-One-Group-Out cross-validation.

87.07%
Accuracy (LOGO-CV)

Weighted F1: 86.12% | 5 classes | 84-dim features

Feature Pipeline

7 features per channel × 8 channels + 28 inter-channel correlations = 84 dimensions

Time domain: MAV, RMS, WL, ZC, SSC

Frequency domain: MNF, MDF

Spatial: Pearson correlation C(8,2)

Window: 250ms, Overlap: 50%

On-Device CoreML

Stamina model: MLP 6→16→8→1

Supports MLUpdateTask for on-device personalized fine-tuning. 1-minute calibration (30s rest + 30s grip), accuracy improves 15-20%.

<35ms
CoreML inference on iPhone 14 Pro

Training Data

Public dataset: Ninapro DB5 (.mat) — resampled to 1000Hz, labels mapped to 5 gesture classes.

Self-recorded: 42+ segments (8ch × 1000Hz), 5 gesture classes (shoot, left, right, up, down), 6-10 segments each.

Emotion data: WESAD dataset transfer learning — stress/non-stress binary classification, LogisticRegression, 6-dim features.

Deep Learning Backup

1D-CNN (PyTorch)

Conv1d(8→32, k7) → Conv1d(32→64, k5) → Conv1d(64→128, k3) → FC(128→64→N)

Apple Silicon MPS | 50 epochs | Dropout 0.5

Export Formats

Models export in multiple formats covering the full research-to-deployment pipeline:

.pkl sklearn   .onnx cross-platform   .mlpackage iOS CoreML   .pt PyTorch   .joblib lightweight

On-Device Learning

It learns you.
No two bodies are the same.

Everyone's muscle patterns, fatigue thresholds, and work rhythm are different. FocuX doesn't apply a generic model to everyone — it continuously learns on your device, getting better the more you use it.

Layer 1: Instant Calibration

After each work session, you report how you actually felt (focused / okay / a bit tired / exhausted). The system compares its prediction with your feedback and adjusts the offset using exponential smoothing (α=0.3) in real time.

First feedback takes effect immediately. No waiting, no large datasets needed.

1st
feedback = immediate improvement

Layer 2: CoreML Fine-tuning

Every 3 feedbacks trigger MLUpdateTask to fine-tune the MLP network via SGD (lr=0.01, 10 epochs). New weights are saved as versioned model files.

Model version increments, never lost. Your personalized model grows with you.

v1 → v2 → v3...
model evolves with every 3 feedbacks
How the loop works
1
Work
System predicts Stamina
Feedback
You say "a bit tired"
Compare
predicted vs actual
Update
Calibrate + fine-tune weights
Better
More accurate next time
Why this matters: A Stamina of 60 when you're fresh at 9 AM means something entirely different from a Stamina of 60 when you're drained at 4 PM. A generic model can't tell the difference, but your personalized model can — because it's learned from your feedback what 60 means for you.
Architecture
MLP 6→16→8→1
ReLU + Sigmoid
Training
On-Device SGD
lr=0.01, batch=4, 10 epochs
Privacy
100% Local
Training data never leaves your device
App Features

Calm awareness,
not another notification.

Following the Calm Technology principle — information lives at the edge of attention until it truly matters.

Stamina Ring

Real-time stamina ring, 0-100 intuitive display of your body's endurance.

Live Activity

Persistent on Lock Screen + Dynamic Island with system-driven timer.

MVC Calibration

Two-phase calibration: 10s resting baseline + 5s maximum grip. Full muscle range recorded.

Session History

Complete record of stamina curves and dimension changes for every work session. Daily overview + pending feedback tracking.

AI Coach

On-device LLM-powered daily coaching summary — trend insights + actionable body advice.

BLE Resilience

Auto-pause on disconnect, 5-min timeout, wear-off detection, battery monitoring.

Immersive Focus

Full-screen focus mode — breathing animation, long-press to end (anti-mistouch), session summary + particle effects.

Home Widgets

4 home screen widgets — session count, stamina value, weekly trend, dashboard. Everything at a glance.

Zero Cloud

All computation runs locally on iPhone. No servers, no accounts, 100% private.

Dev Log

Building in public.

From the first line of code to the App Store — the full iteration journey. Every version is documented in GitHub Issues.

V13 — Current (v1.1)
Dashboard insight charts + Home Widgets + App Group + v1.1 release
Swift Charts insight grid (drag-linked hero number animation), 4 WidgetKit home screen widgets (small/medium/large), App Group cross-process data sharing, PrivacyInfo.xcprivacy manifest, v1.1 App Store upload.
swift chartswidgetkitapp groupapp store v1.1
Issue #9 →
V12
Apple Design Gallery alignment + On-device AI Coach + Smart Fallback
Unified Design Token system (FluxTokens/FluxComponents), Foundation Models on-device AI coaching summary, Smart Fallback engine (auto-degrades to rule engine when LLM unavailable), App Store 5.1.1 review fix.
design systemfoundation modelssmart fallback
Issue #8 →
V11
Crash fixes + Connection guide sheet + Native Tab focus button
P0 crash fixes (@Query init, force unwrap, Timer leaks), minimal ConnectionGuideSheet (auto BLE scan + native symbolEffect), Tab(role:.search) native circular focus button, disconnected placeholder view, tabBarMinimizeBehavior scroll collapse.
stabilityconnection uxnative tab
Issue #7 →
V10
Full P1-P2 optimization + AI Coach
Daily AI coaching summary (FoundationModels on-device LLM + dailyCoach role), BLE auto-pause on disconnect + 5-min timeout, wear-off detection, hardware battery display, MVC two-phase calibration, Live Activity one-tap rest, UNUserNotificationCenterDelegate.
ai coachble resiliencelive activity
Issue #6 →
V9
V2.0 Immersive focus experience
Full-screen ActiveSessionView (breathing animation + long-press to end), SessionSummarySheet (AI summary + stamina curve + GPU particle animation), NLPSummaryEngine (FoundationModels on-device LLM), full PRD alignment.
immersivefoundation modelsprd
Issue #5 →
V8
Apple Photos-style immersive redesign
SessionDetailView immersive redesign, PerformanceMonitor, StaminaRingView GPU rendering optimization, DimensionsRow componentization.
designperformancegpu
Issue #4 →
V7
App Store release preparation
Live Activity fix (staleDate + system timer), distribution pipeline (Makefile CLI), ASC API metadata automation, App Icon generation, brand unification to FocuX.
distributionlive activitybranding
Issue #3 →
V5-V6
System-level architecture overhaul
SwiftData three-layer data model, recording/segmentation system, StaminaEngine v3 three-dimension model, on-device personalization (CoreML MLUpdateTask), SummaryEngine natural language summaries. 12 new files, 2,363 lines of code.
swiftdatacoremlstamina engine
Issue #2 →
V1 — V4
From ML pipeline to native iOS
V1: Full ML pipeline (84-dim features + RandomForest + ONNX). V2: StaminaEngine three-dimension model + SSE real-time streaming. V3: Reverse-engineered BLE protocol, removed USB relay. V4: SwiftUI native iOS app + CoreBluetooth direct connection.
ml pipelineble reverseios native
Issue #1 →
10,000+ lines of code
40+ files across iOS, WidgetKit, Python backend, Web frontend, and ML scripts
View on GitHub →
About

Built by Jiajun Wu.

FocuX is my graduation project at the College of Future Technology, Shenzhen Technology University — and an independent product that's growing.

I believe technology should sense the human state, not just wait for human input. The current version starts with forearm physiological signals — future iterations will expand to more sensing modalities, so your devices truly understand you.

The vision: an operating system layer between your body and your devices. Not VR goggles, not brain chips — just quiet, continuous awareness that makes your tools work with your body, not against it.