Hunting for a missing heartbeat: what building Ghost Hunt taught me about measuring absence.
Most camera-vitals demos measure the pulse that is there. In the Presage SmartSpectra SDK Challenge on DEV, I built a game that hunts for the pulse that isn't.
Ghost Hunt · Who Else Was There? is a cute, spooky desktop game. A woman named Marina stops at her front door, feels a hand on her shoulder telling her to stay, and cancels her ride. Twenty minutes later, that car crashes. Her hallway camera was on. At second 8 of the tape, on the dark stairs behind her, there is a second face.
Its pulse reads 0 beats per minute.
(Marina is fictional and her tape is drawn. In the game, "0 BPM" means the detector got no reliable pulse from that face. It's a story clue, never a health result.)
This post is about the hackathon itself: the parts that broke, the rules I had to invent, and why the hardest part of detecting a ghost was not calling a living person one.
What I Built
A desktop game (Electron, English and Portuguese) where three tiny ghost hunters point a new instrument at a haunted tape: the Ghost Detector. Living faces have a heartbeat. The face that doesn't is the case.
- Browse 30 nights of tape on a haunted calendar and let the detector analyze any night.
- Point the detector at one spot: it finds the second face, locks on, and reads 0 BPM.
- Ask the spirit on a board where the glass moves only when you breathe out, and waits while you talk.
- Get read yourself in The Room: your real pulse, breathing and expression, live from your camera. A figure on screen moves only when you blink.
- Upload your own video (after confirming everyone in it agreed) and get a report: is there a spirit in it?
There is no language model in it. The spirit follows one rule: cite or vanish. Every line it says must cite a measured evidence card, and every number in that line must match the card, or the line isn't said.
Demo
▶ Play it in your browser, no install: https://jenniferevangelista-de.github.io/who-else-was-there/ (sample numbers, tagged on every screen). The live camera reading runs in the desktop app, because the SDK is native.
Code (MIT):
Ghost Hunt · Who Else Was There?
Every face in this video has a heartbeat. Except one.
Most camera-vitals apps measure the pulse that is there. Ghost Hunt is a cute, spooky game that hunts for the pulse that is missing. It runs on the Presage SmartSpectra SDK, which reads a person's pulse and breathing from an ordinary camera.
Entry for the DEV Presage SmartSpectra SDK Challenge, category Most Creative or Delightful Use.
Play it in your browser: jenniferevangelista-de.github.io/who-else-was-there (sample numbers; the live camera reading needs the desktop app)
Videos: Demo with the live signal (2:38) · Pitch (2:23)
Contents: The game in one minute · Everything you can do · The challenge's questions, answered · How the SDK is used · How we tested it · Run it yourself · Consent and data
The game in one minute
- A case arrives. Marina was about to go…
Partner Technologies
Presage SmartSpectra (@smartspectra/node-sdk 3.4.0) is the whole instrument. Without a pulse read from a plain camera, there's no way to tell which face is missing one. I use seven of its live signals, and each one has a job:
| Signal | Its job in the game |
|---|---|
Pulse (cardio.pulseRate) | Drives the heart and the detector line. Readings under 50% confidence don't count |
Chest movement (breathing.upperTrace) | Moves the séance glass on your out-breath; finds a held breath |
Talking (face.talking) | Makes the glass wait while you speak |
Blinks (face.blinking) | The only thing that moves the figure in The Room |
| Breathing rate and expression | Become your numbers and evidence cards |
| Validation status | Turns "multiple faces" into a second face, and bad light into unreadable |
SDK telemetry is off (enableTelemetry: false), no frames are saved and no video is recorded.
Hackathon Experience
1. Detecting absence is harder than detecting presence
The naive version of a ghost detector has a funny failure mode: every badly lit face becomes a ghost. A shaky, low-confidence reading looks exactly like a missing pulse.
Two rules prevent that, and both come from reading what the SDK already tells you:
- Confidence is part of the signal. A pulse under 50% confidence doesn't count, either as a heartbeat or as its absence.
- Bad light is not a spirit. The SDK's validation status says when a face can't be read. The game turns that into unreadable, never into a scary verdict.
It's like a smoke detector with a low battery: the chirp means "I can't tell", not "fire". The game had to learn to say "I can't tell".
2. I tested my rules by hiding fake ghosts
The computer vision is Presage's, and I treat it as an instrument. What's mine is the logic deciding what the numbers mean, so that's what I tested: 19,000 synthetic-signal tests where I already know the answer, reproducible with npm run benchmark. No real person is in them, and they test my rules, not Presage's accuracy.
- A living face was called a ghost 0 times in 400.
- Then I pushed the noise up until the rules broke, because that's the useful part. Real jumps are always caught, but from about 9 bpm of jitter the alarm starts going off by itself. That limit is in the README, not hidden.
3. The SDK wanted a real device (and Windows had opinions)
- I tried running a reading on a cloud CI server so the demo could be fully automated. Presage refused to pair it (HTTP 403). Fair enough: it's built for real cameras on real devices. The live readings in the demo come from a real computer.
- On Windows, Smart App Control blocked the SDK's unsigned native libraries. I didn't want anyone opening the app to a blank screen, so it falls back to clearly tagged sample numbers and keeps working.
4. Delight with care
A heartbeat game can easily slide into a health claim, and I didn't want that. The camera turns on only after a consent screen and a button press, other people's videos stay locked until you confirm they agreed, and the scare never becomes a diagnosis. It's a game, and it says so on screen.
What I learned
- Measuring absence needs a confidence rule first. "No signal" and "signal says zero" are different things.
- Test your own logic with planted answers, and publish where it breaks.
- Native SDKs have real-world friction (device pairing, OS code signing). Design a graceful fallback from day one.
- Constraints make better games. Your breath moves the glass, a blink is the jump scare, and the skeptic cat refuses to sign anything the numbers can't prove.
If you've built with camera-based vitals, I'd love to hear in the comments how you handled low-confidence readings.
Built for the Presage SmartSpectra SDK Challenge on DEV. #mlhacks


