<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DominionOchai</title>
    <description>The latest articles on DEV Community by DominionOchai (@dominion_).</description>
    <link>https://dev.to/dominion_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4245102%2Fff8604b6-23e5-44e8-bd9a-ffbf00315951.png</url>
      <title>DEV Community: DominionOchai</title>
      <link>https://dev.to/dominion_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dominion_"/>
    <language>en</language>
    <item>
      <title>FlyPPG</title>
      <dc:creator>DominionOchai</dc:creator>
      <pubDate>Mon, 23 Nov 2026 02:55:09 +0000</pubDate>
      <link>https://dev.to/dominion_/flyppg-1b0a</link>
      <guid>https://dev.to/dominion_/flyppg-1b0a</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;FlyPPG&lt;/strong&gt; is a stress-test harness and a fly-inspired mitigation layer for remote photoplethysmography.&lt;/p&gt;

&lt;p&gt;I started by trying to beat SmartSpectra at its own game: clean-signal heart-rate accuracy. I lost — on front-facing, well-lit footage with a chest in frame, SmartSpectra is excellent and my head-to-head attempts couldn't get close. So instead of pretending otherwise, I pivoted to what Presage &lt;em&gt;documents&lt;/em&gt; as their known limits: uneven lighting, rhythmic flicker, and framing requirements (footage without a chest visible is rejected outright).&lt;/p&gt;

&lt;p&gt;FlyPPG does two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A reproducible benchmark harness&lt;/strong&gt; that builds flicker-injected clips (arbitrary strength, arbitrary flicker BPM) from a public dataset, runs them through the SmartSpectra SDK multiple times, and scores every arm against a pseudo-reference with a verdict line — all in CI, no local setup. (&lt;a href="https://github.com/dominionochai/FlyPPG/blob/ci-diagnostics/flicker/run-44966548540/SCORES.md" rel="noopener noreferrer"&gt;full scoreboard&lt;/a&gt;, &lt;a href="https://github.com/dominionochai/FlyPPG/actions/runs/44966548540" rel="noopener noreferrer"&gt;raw run&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A fly visual-system denoising layer ("fly lamina")&lt;/strong&gt; — inspired by how flies reject uniform flicker at the lamina/medulla level of their early visual system — that suppresses globally-correlated illumination flicker before rPPG extraction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The headline results, from the same frontal recording:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;SmartSpectra&lt;/th&gt;
&lt;th&gt;With FlyPPG pre-filter&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;12% TV-style flicker&lt;/td&gt;
&lt;td&gt;7.04 bpm MAE, 55% usable windows, conf 0.39&lt;/td&gt;
&lt;td&gt;2.70 bpm MAE, 82% windows, conf 0.94&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;88 bpm rhythmic flicker&lt;/td&gt;
&lt;td&gt;reports 88.0 ± 0.9 bpm at 99.4% confidence (that's the lamp's frequency, not the heart — true HR is 77.1)&lt;/td&gt;
&lt;td&gt;sags to 83.9 bpm at 64% confidence — degraded, never entrained&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No chest in frame&lt;/td&gt;
&lt;td&gt;REJECTED, no output&lt;/td&gt;
&lt;td&gt;keeps tracking at ~77 bpm&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I also labeled the harness honestly: at mild 6% flicker the fly layer is actually slightly &lt;em&gt;worse&lt;/em&gt; than raw (7.88 → 8.64 MAE), and the reference is SmartSpectra's own clean-footage reading plus known dataset caveats. Both are in the SCORES.md with the logs — you can audit every number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dominionochai.github.io/FlyPPG/viewer.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Live demo viewer&lt;/strong&gt;&lt;/a&gt; — click through the three scenarios (&lt;code&gt;12% flicker&lt;/code&gt; → &lt;code&gt;no chest&lt;/code&gt; → &lt;code&gt;88 bpm trap&lt;/code&gt;) and the fly-brain tab. In the &lt;code&gt;88 bpm trap&lt;/code&gt;, look for the red &lt;code&gt;READING THE LAMP – Entrained by 88 bpm flicker&lt;/code&gt; badge on SmartSpectra's pane, with &lt;code&gt;true 77.1: +10.9 bpm&lt;/code&gt; (red) vs &lt;code&gt;+6.9 bpm&lt;/code&gt; (amber) under the heart-rate readouts.&lt;/p&gt;

&lt;p&gt;Demo video: [&lt;a href="https://youtu.be/csEDsW-L1hM" rel="noopener noreferrer"&gt;https://youtu.be/csEDsW-L1hM&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Every clip shown is reproducible: &lt;code&gt;fl12.mp4&lt;/code&gt; (12% flicker), &lt;code&gt;ent088.mp4&lt;/code&gt; (flicker at exactly 88 bpm), and their denoised &lt;code&gt;_dn&lt;/code&gt; twins are committed to the repo, and the injection code that made them is ~200 lines of numpy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/dominionochai/FlyPPG" rel="noopener noreferrer"&gt;github.com/dominionochai/FlyPPG&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt; &lt;span class="n"&gt;clone&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dominionochai&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nc"&gt;FlyPPG&lt;/span&gt;
&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="nc"&gt;FlyPPG&lt;/span&gt;
&lt;span class="c1"&gt;# interactive demo — no install needed&lt;/span&gt;
&lt;span class="n"&gt;open&lt;/span&gt; &lt;span class="n"&gt;viewer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;   &lt;span class="c1"&gt;# or just double-click it&lt;/span&gt;

&lt;span class="c1"&gt;# run the flicker experiment tooling (Python 3.11+)&lt;/span&gt;
&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="n"&gt;scipy&lt;/span&gt; &lt;span class="n"&gt;opencv&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;headless&lt;/span&gt; &lt;span class="n"&gt;imageio&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;ffmpeg&lt;/span&gt;
&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;experiments&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;flicker_experiment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="n"&gt;inject&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;dst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;strength&lt;/span&gt; &lt;span class="mf"&gt;0.12&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;freq&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bpm&lt;/span&gt; &lt;span class="mi"&gt;88&lt;/span&gt;
&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;experiments&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;flicker_experiment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="n"&gt;denotch&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;dst&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;# run SmartSpectra on a clip (Node 22)&lt;/span&gt;
&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;experiments&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;npm&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt;
&lt;span class="n"&gt;npx&lt;/span&gt; &lt;span class="n"&gt;smartspectra_file_run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mjs&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;clip&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;outdir&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;cardio&lt;/span&gt;   &lt;span class="c1"&gt;# requires SMARTSPECTRA_API_KEY env var&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One-click cloud version: the &lt;code&gt;SmartSpectra flicker experiment&lt;/code&gt; GitHub Actions workflow (&lt;code&gt;.github/workflows/smartspectra-flicker.ycmc&lt;/code&gt; — see note in repo: &lt;code&gt;smartspectra-flicker.yml&lt;/code&gt;) builds every clip from scratch, runs the SDK twice per arm, and publishes SCORES.md.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;The app consumes live Presage signals from the &lt;strong&gt;SmartSpectra Node SDK&lt;/strong&gt; (&lt;code&gt;--metrics=cardio&lt;/code&gt;): the &lt;code&gt;pulseRate&lt;/code&gt; series with per-window &lt;code&gt;confidence&lt;/code&gt; values, the same signals you get streaming. For every clip I parse those per-timestamp readings, compute error against the reference, and surface three human-legible signals: &lt;strong&gt;heart rate&lt;/strong&gt;, &lt;strong&gt;signal quality (confidence 0–1)&lt;/strong&gt;, and &lt;strong&gt;motion&lt;/strong&gt; — the same trio shown live in the demo viewer's gutters and quality lane, with a scrub cursor you can drag across time.&lt;/p&gt;

&lt;p&gt;The integration itself is thin and intentional: each MP4 clip goes through &lt;code&gt;smartspectra_file_run.mjs&lt;/code&gt; → raw SDK output (&lt;code&gt;pulseRate.value/stable/confidence/timestamp&lt;/code&gt;) → JSON. All the judgment (MAE, window coverage, entrainment detection) sits &lt;em&gt;outside&lt;/em&gt; the SDK so it can't be gamed, and all the fly-lamina work happens on the video &lt;em&gt;before&lt;/em&gt; the SDK sees it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Best Thoughtful Real-World Use.&lt;/strong&gt; rPPG pulse sensing has one hard systematic weakness: it only works in good lighting — and real life isn't good lighting. Telehealth calls happen at night under warm desk lamps and ceiling fans; elderly home monitoring happens in rooms with a window on one side; smart-mirrors and kiosks live with overhead fixtures cycling at 100–120 Hz. &lt;strong&gt;FlyPPG addresses the need where it actually fails: uneven and rhythmic illumination&lt;/strong&gt;, so integrators of SmartSpectra can keep usable pulse readings in rooms they don't control.&lt;/p&gt;

&lt;p&gt;Who it's for: developers and product teams building on pulse-rate sensing — telehealth platforms, wellness dashboards, adjacent-technology pilots — who today quietly gate their feature behind "needs decent lighting" and lose users (and readings) to it.&lt;/p&gt;

&lt;p&gt;How we designed for them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Drop-in, upstream-of-SDK posture&lt;/strong&gt; — the fly-lamina denoising layer is a pre-filter on the video, so it composes with the existing SmartSpectra integration (no SDK changes, no different data contract).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A published benchmark, not a claim&lt;/strong&gt; — every result comes from a reproducible CI harness (&lt;a href="https://github.com/dominionochai/FlyPPG/blob/ci-diagnostics/flicker/run-44966548540/SCORES.md" rel="noopener noreferrer"&gt;SCORES.md&lt;/a&gt;) that anyone can re-run with their own clips and API key, including the arms where our layer &lt;em&gt;loses&lt;/em&gt; (mild 6% flicker). If you're deciding whether to ship this, you need to know both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-install evaluation path&lt;/strong&gt; — the &lt;a href="https://dominionochai.github.io/FlyPPG/viewer.html" rel="noopener noreferrer"&gt;demo viewer&lt;/a&gt; is a single HTML file; the &lt;a href="https://github.com/dominionochai/FlyPPG" rel="noopener noreferrer"&gt;repository&lt;/a&gt; is public with per-step setup commands and all clips committed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No live camera use.&lt;/strong&gt; The demo viewer plays pre-rendered clips from the public &lt;a href="https://huggingface.co/datasets/justchugh/MPSC-RR" rel="noopener noreferrer"&gt;MPSC-RR dataset&lt;/a&gt; (CC-BY-4.0, research-permitted). No user faces, video, audio, or biometrics are collected, stored, transmitted, or retained by this project. There is no account, no server, no analytics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SmartSpectra SDK usage&lt;/strong&gt; runs exclusively inside GitHub Actions CI on committed dataset clips. Raw SDK responses (pulseRate series) are stored as public CI artifacts for auditability; they contain only synthetic-numbered windows from the public dataset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API key handling:&lt;/strong&gt; the SmartSpectra key lives in a GitHub Actions encrypted secret and is never echoed; the publishing step scrubs it from all logs before committing anything public.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No AI service processes personal data.&lt;/strong&gt; The LLM coding agent worked on code, benchmark numbers, and public dataset clips only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No medical claims.&lt;/strong&gt; This is a research demo / benchmark. Nothing here diagnoses, treats, or informs any medical decision, and the entrainment trap result exists precisely to show how wrong a confident pulse reading can be in bad lighting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

&lt;p&gt;I used Vibe Code (Mistral) to drive the code and benchmark.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
    </item>
  </channel>
</rss>
