AfterBurn Timer:SmartSpectra SDK 專案
AfterBurn Timer🔥 - SmartSpectra SDK Project
Afterburn Timer 是一款原生 macOS 運動輔助應用程式,結合運動規劃與非接觸式攝影機脈搏觀察,記錄組間恢復情況。應用程式使用 SmartSpectra 3.5.0,從 1,324 項運動的本機目錄準備訓練,並以運動前 30 秒有效脈搏讀數的中位數建立基準。恢復判定只依據脈搏,不代表醫學驗證的恢復指標。
This is a submission for the Presage SmartSpectra SDK Challenge
What I Built
I built Afterburn Timer, a native macOS exercise companion that turns an ordinary camera into a way to observe the minutes between exercise sets.
Most workout apps are good at counting what we do: repetitions, sets, duration, and weight. I wanted to explore the part they rarely show: what happens to our pulse after we stop moving?
What if the rest between sets could be something we actually observe, record, and learn from over time—without putting on a smartwatch or attaching a sensor?
Afterburn combines a workout planner with contactless human sensing. You can:
- Browse a local catalogue of 1,324 exercises and prepare a workout.
- Check your camera framing, then establish a personal, session-specific pulse baseline.
- Time sets manually while the camera is off during exercise.
- Sit back in front of the camera after a set and watch live physiological signals arrive from Presage SmartSpectra.
- Record an observed recovery interval, distinguish a near-baseline observation from an interrupted or manually ended one, and revisit sessions in a local recovery journal.
- Inspect signal quality, pulse timelines, and measured sample coverage, then export or delete your history.
The experience is written with SwiftUI, Swift Charts, SwiftData, AVFoundation, and a native Objective-C++ bridge to SmartSpectra 3.5.0.
It is a real macOS app, not an Electron wrapper or a simulated demo.
The Journal keeps each set's movement, pulse information, outcome, and observed interval together.
Demo
Here is a walkthrough of Afterburn with the camera-driven experience and recovery journal in action:
Code
GitHub: biomathcode/after_burn_meter
The repository includes the application source, a portable recovery-analysis core, tests, build scripts, a detailed architecture and data-flow guide, and setup instructions.
To run live measurements, use an Apple Silicon Mac, macOS 14+, Xcode with a macOS 26+ SDK, CMake 3.26+, Python 3.12+, your own Presage API key, and an Apple Development signing identity.
The basic workflow is:
git clone https://github.com/biomathcode/after_burn_meter.git
cd after_burn_meter
cp -n .env.example .env
# Add your own SMARTSPECTRA_API_KEY to .env
python3 scripts/build.py --team YOUR_APPLE_TEAM_ID
python3 scripts/run.py
The SDK is downloaded during setup rather than committed to the repository. API keys are not bundled with the application.
A development-only build can test the interface and camera framing, but real SmartSpectra measurement requires proper Apple Development signing and entitlements.
How It Responds to Human Signals
The central live signal is pulse rate from SmartSpectra's cardio.pulse_rate.
It changes what Afterburn displays and when an observation can be considered an observed return near the session baseline.
1. Before exercise — establish a baseline
After at least 12 seconds of camera warm-up, Afterburn collects 30 continuous seconds of valid pulse and uses the median as the session baseline.
2. During exercise — time the set
The exercise timer is controlled manually. The camera is off during the set, so the app does not pretend to measure a moving person continuously.
3. After exercise — observe recovery
When the set ends, camera measurement resumes. Incoming pulse readings update the timeline.
A near-baseline observation requires:
- 15 continuous valid seconds within ±5 BPM of the session baseline.
- At least 90% SDK confidence.
- Valid, stable measurements within a conservative pulse range.
- No measurement gap exceeding three seconds during qualification.
A longer gap resets the qualification window. Users can end or interrupt a check without the app falsely marking it as successful.
The dotted line marks the baseline. Recorded values stay as measured points; missing readings are not filled in to manufacture a smooth recovery.
More than a pulse monitor
Beyond pulse, the All Vitals view visualizes:
- Breathing rate
- Heart-rate variability: RMSSD and SDNN
- Mean NN interval and Baevsky index
- Relative arterial waveform
- Chest and abdominal movement
The SDK can also provide an EDA proxy.
These signals are displayed for exploration; saved recovery qualification is based on pulse, not on an invented composite health score.
Each signal has its own warm-up, freshness, and validation state. When data is missing, its chart remains empty instead of showing a fabricated zero or interpolated line.
Under the hood
The integration is deliberately native:
SwiftUI → AppModel / SensorController → Objective-C++ bridge → SmartSpectra C++ SDK 3.5.0 → typed metric callbacks → validation and recovery engine → Swift Charts and SwiftData
The bridge subscribes to SDK metrics, validation, video, and lifecycle callbacks.
Afterburn normalizes their timestamps, checks signal quality and freshness, and updates the interface without blocking it.
It also makes the camera handoff explicit so the independent AVFoundation framing preview and SDK measurement do not compete for the same device.
The analysis exposes valid-sample counts and coverage—even when the signal is sparse—so a reader can judge the limits of an observation.
An important distinction: Afterburn does not directly measure excess post-exercise oxygen consumption (EPOC), calories burned after exercise, exercise readiness, or medical recovery.
Its measured feature is an experimental, camera-based pulse observation.
The observed interval includes warm-up, confirmation, and signal gaps; it is not a medically validated measure of the exact moment the heart rate returned to baseline.
Prize Categories
I'm entering both categories.
Most Creative or Delightful Use
I like the idea of turning the invisible part of a workout—the pause after a set—into something visible.
Rather than gamifying more repetitions, Afterburn gives attention to the breathing space between movements.
The live camera signals, phase-aware pulse graph, and growing history make that often-overlooked moment tangible.
Best Thoughtful Real-World Use
Afterburn is for curious exercisers who want to document their post-set pulse patterns without relying on a wearable.
It makes data quality and uncertainty visible, has manual controls when measurement is interrupted, respects macOS accessibility settings, and keeps the core experience local.
It is an observation and journaling tool, not a diagnostic, treatment, or training-prescription tool.
Consent and Data Handling
Because this app processes camera-derived physiological signals, I treated permission and data boundaries as part of the product itself.
Explicit consent
On first run, the app presents a versioned consent notice. Camera access begins only after acceptance and the separate macOS camera permission. Withdrawing consent stops capture and returns to onboarding.
Camera lifecycle
The camera is used for framing, baseline, and seated recovery checks; it is off during exercise. Sleep, withdrawal, and app termination interrupt capture. The app does not request microphone access or save raw camera photos or videos.
Local storage
Workout plans, saved pulse-based recovery observations, and consent status are stored locally with SwiftData/UserDefaults. Additional live physiological charts use bounded in-memory buffers instead of being saved into the recovery journal.
Retention and deletion
Completed records remain on the Mac until the user deletes them. History can be exported manually as JSON. Withdrawing camera consent alone does not erase past records; history deletion is a separate user action.
No app-run cloud analysis
Afterburn has no custom video-upload backend, no configured LLM Insights callback, and no optional AI service receiving user measurements.
SmartSpectra network access
The SDK still makes authenticated network requests for account/device setup, access checks, and model-related operation, and keeps SDK cache/Keychain state.
It is proprietary, so I do not claim its entire network behavior has been independently audited or that the app is fully offline.
Telemetry
The SmartSpectra configuration explicitly disables SDK telemetry and accumulated output. Presage documents what its optional telemetry would otherwise collect.
These controls do not eliminate the SDK's separately required authentication and setup traffic.
Credentials
A developer's Presage API key is provided through a locally ignored .env during development or saved in macOS Keychain. It is not hard-coded in source or packaged with the app.
Signal measurements can be affected by camera framing, lighting, motion, confidence, and SDK operating limits. Afterburn surfaces those limitations rather than claiming to deliver clinical-grade results.
Agent Session
The repository documents the SmartSpectra integration, architectural decisions, constraints, and testing approach.
I also used the official SmartSpectra integration guidance available to Codex. A public agent-session transcript is not included in this post.
Built by Pratik Sharma for the Presage SmartSpectra SDK Challenge.
Thanks to Presage and DEV for making human-sensing software interesting to experiment with.
來源:DEV Community · dev.to


