<?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: Nick Switzer</title>
    <description>The latest articles on DEV Community by Nick Switzer (@nswitzer).</description>
    <link>https://dev.to/nswitzer</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%2F3949377%2Feaeb9ca7-1894-41e5-99a3-5cd5c73ec60d.jpg</url>
      <title>DEV Community: Nick Switzer</title>
      <link>https://dev.to/nswitzer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nswitzer"/>
    <language>en</language>
    <item>
      <title>Hot Ones: The Biometric Gauntlet — Real-Time Optical rPPG Capsaicin Lie Detector with AI Sean Evans &amp; Presage SmartSpectra C++ SDK</title>
      <dc:creator>Nick Switzer</dc:creator>
      <pubDate>Sat, 21 Nov 2026 02:50:18 +0000</pubDate>
      <link>https://dev.to/nswitzer/hot-ones-the-biometric-gauntlet-real-time-optical-rppg-capsaicin-lie-detector-with-ai-sean-evans-1kd6</link>
      <guid>https://dev.to/nswitzer/hot-ones-the-biometric-gauntlet-real-time-optical-rppg-capsaicin-lie-detector-with-ai-sean-evans-1kd6</guid>
      <description>&lt;p&gt;This is a submission for the Presage SmartSpectra SDK Challenge: &lt;a href="https://dev.to/challenges/presage"&gt;https://dev.to/challenges/presage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎯 Target Category&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use&lt;/strong&gt; — featuring live on-device desktop rPPG, a 15-Celebrity Hot Ones Biometric Disruption Leaderboard, an SNL Negative Control, a 4K Bare-Skin Benchmark, and a companion Majestic Hoops Post-Game Fatigue Showcase.&lt;/p&gt;

&lt;p&gt;🌐 Live Demos &amp;amp; Direct Video Links (Zero-Install)&lt;br&gt;
&lt;strong&gt;Live Cloud Run Interactive Broadcast Studio:&lt;/strong&gt; &lt;a href="https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app" rel="noopener noreferrer"&gt;https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Side-by-Side Before (Raw) &amp;amp; After (Burned-In Biometric HUD) Video Hub:&lt;/strong&gt; &lt;a href="https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app/payton" rel="noopener noreferrer"&gt;https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app/payton&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;75-Second Comedic Tech &amp;amp; Hackathon Promo Video (720p HD MP4):&lt;/strong&gt; &lt;a href="https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app/clips/payton_kit/smartspectra_hackathon_promo.mp4" rel="noopener noreferrer"&gt;https://hot-ones-biometric-gauntlet-473903412658.us-central1.run.app/clips/payton_kit/smartspectra_hackathon_promo.mp4&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Companion 9:16 Vertical Shorts Lab (Majestic Hoops Fatigue + Hot Ones):&lt;/strong&gt; &lt;a href="https://smartspectra-shorts-recruit-473903412658.us-central1.run.app" rel="noopener noreferrer"&gt;https://smartspectra-shorts-recruit-473903412658.us-central1.run.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;🍲 What I Built:&lt;/strong&gt; "Hot Ones: The Biometric Gauntlet" (AI Sean Evans Edition)&lt;/p&gt;

&lt;p&gt;Can you bluff an optical photoplethysmography (rPPG) AI while drinking a bowl of hot red pepper soup spiked with a full fluid ounce—half a bottle—of Tabasco?&lt;/p&gt;

&lt;p&gt;Hot Ones: The Biometric Gauntlet (AI Sean Evans Edition) is a standalone desktop and cloud broadcast studio built with Electron 33, Node.js 24, @smartspectra/node-sdk (v3.4.0), and Google Gemini 3.8 Flash (@google/genai). It turns your webcam into a real-time Capsaicin Lie Detector hosted by an AI Sean Evans who interrogates you across a 10-round Scoville Ladder—and roasts you with your own live heart rate, breathing waveforms, heart-rate variability (HRV), and 478-point facial micro-expressions the moment you try to "no-sell" the heat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧪 The Origin Story:&lt;/strong&gt; Why "1-Oz Tabasco Red Pepper Soup Mode" Solves rPPG Motion Noise&lt;/p&gt;

&lt;p&gt;This project started with a real culinary experiment: dumping a full fluid ounce (2 tablespoons / 30 mL / half a standard bottle) of Tabasco into a bowl of steaming red pepper soup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading the official Presage SmartSpectra Model Cards revealed a key physiological insight:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Solid Wing Problem (15 Seconds of Jaw-Motion Artifact): SmartSpectra's Pulse Rate (12s window) and HRV (60s NN window) model cards explicitly warn that chewing corrupts optical skin reflection on the cheeks and temples. Eating a traditional chicken wing requires ~15 seconds of heavy chewing before the swallow, delaying clean rPPG lock.&lt;br&gt;
The 1-Oz Tabasco Red Pepper Soup Breakthrough (Zero-Chew 3s Fast Lock):&lt;br&gt;
Zero Mastication = Instant Optical Lock: Sipping spicy red pepper soup requires zero chewing. Within 3–4 seconds of the swallow, the masseter and temporalis muscles are completely stationary—letting SmartSpectra lock onto cardio.pulseRate, cardio.arterialPressureTrace, and breathing.upperTrace immediately.&lt;br&gt;
Thermal + Capsaicin TRPV1 Synergy: Capsaicin lowers the activation threshold of TRPV1 ion channels below body temperature (37°C), while steaming broth (60°C+) activates those exact same receptors—triggering an immediate sympathetic surge (+18 to +26 BPM heart rate spike, rapid vagal HRV drop, and shallow upper-chest panting).&lt;br&gt;
Acetic Acid Vapor Reflex: Hot broth volatilizes Tabasco's vinegar into the sinuses on approach, triggering involuntary DISGUST and SURPRISE spikes in SmartSpectra's 478-point face.expression classifier before the spoon even leaves your lips.&lt;/p&gt;

&lt;p&gt;The studio includes three selectable modes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🍲 1-Oz Tabasco Soup Bowl (Origin / Fast-Lock Mode):&lt;/strong&gt; 10 escalating pours of Tabasco into hot red pepper soup with a 4-second Pour &amp;amp; Sip window straight into the stationary Biometric Staredown.&lt;br&gt;
&lt;strong&gt;🍗 Classic 10-Wing Gauntlet:&lt;/strong&gt; Traditional 10-wing lineup (The Classic 1,800 SHU → Da Bomb 135,600 SHU → The Last Dab Xperience 2,693,000 SHU) with a 15-second Dab &amp;amp; Bite chew gate where rPPG scoring pauses while 478-point facial flinches are tracked.&lt;br&gt;
&lt;strong&gt;📼 Judge File / Sim Mode (sdk.useCustomInput() + 1-Click Capsaicin Simulator)&lt;/strong&gt;: Built so hackathon judges don't have to drink half a bottle of Tabasco to test every waveform, Protobuf metric, and bluff roast.&lt;br&gt;
⚙️ Physics-Aware 4-Phase State Machine&lt;/p&gt;

&lt;p&gt;Built around SmartSpectra's documented signal windows (12s Pulse, 30s Breathing, 60s HRV, &amp;gt;35s EDA Proxy):&lt;/p&gt;

&lt;p&gt;Phase 0 — Consent Gate &amp;amp; 30s Baseline Calibration: Locks the challenger's personal resting Pulse (BPM), Breathing Rate (BRPM), HRV (rmssd, sdnn, baevsky), and neutral poker face locally on-device.&lt;/p&gt;

&lt;p&gt;Phase 1 — Pour &amp;amp; Sip (4s) or Dab &amp;amp; Bite (15s): Gates rPPG scoring during sipping/chewing so motion artifacts never pollute session peaks, while keeping 478-point Face Analysis (face.expression, face.blinking, face.talking) running at full speed.&lt;/p&gt;

&lt;p&gt;Phase 2 — Stationary Biometric Staredown (25–30s): Prompts ValidationCode 0 (kOk) framing while AI Sean Evans (Gemini 3.8 Flash + Gemini 3.8 Flash-Lite TTS) asks a tailored interview question and live charts stream cardio.pulseRate, arterialPressureTrace, cardio.hrv, dual breathing.upperTrace vs. lowerTrace, and eda.trace.&lt;/p&gt;

&lt;p&gt;Phase 3 — Live Answer &amp;amp; The "No-Sell Lie Detector": Combines spoken transcript with baseline-vs-live biometric deltas. If you claim "Honestly Sean, this barely has a kick" while your pulse jumped +19 BPM and an 84% DISGUST micro-expression leaked, a "🚨 NO-SELL BLUFF DETECTED" siren drops and AI Sean Evans + Conan's unlicensed physician 🩺 Dr. Arroyo (1998 Guadalajara Med) roast your bluff using your exact HUD numbers.&lt;br&gt;
🔥 The 15-Celebrity Hot Ones Biometric Disruption Leaderboard (+ SNL Negative Control)&lt;/p&gt;

&lt;p&gt;We ranked 15 iconic Hot Ones episodes from most biometrically disrupted to ice-cold poker face—and paired them against a Scientific Negative Control (Maya Rudolph playing Beyoncé on SNL eating an un-spiced 0 SHU NBC prop wing) to prove why multimodal optical rPPG beats vision-only emotion AI:&lt;/p&gt;

&lt;p&gt;👑 Conan O'Brien (5-Act Arc): +34 BPM (68 → 102 BPM) · HRV -27 ms (48 → 21 ms) · Breath +12.2 br/m (14 → 26.2) · 96% Disgust/Strain — Tracked from Wing #1 calmness (68 BPM) through Dr. Arroyo's neck exam (83 BPM) to his Da Bomb bottle chug (96 BPM, 81.1% C++ Disgust) and 102 BPM redline screaming "I'M PERFECTLY FINE!"&lt;/p&gt;

&lt;p&gt;🔥 Gordon Ramsay: +29 BPM (72 → 101 BPM) · HRV -19 ms · Breath +13.5 br/m · 95% Disgust/Angry — 262 C++ expression packets (61.7% kOk) as he yells "My heart's beating like a drum!" on Da Bomb.&lt;/p&gt;

&lt;p&gt;🔥 Key &amp;amp; Peele (Dual 2-Person Lock): +28 BPM (71 → 99 BPM) · HRV -18 ms · Real C++ breathing.rate lock at 38.7 br/min (+24.2 br/m!) — Simultaneous 2-guest tracking with Sean Evans host-cut filtering.&lt;/p&gt;

&lt;p&gt;🔥 Cardi B: +27 BPM (70 → 97 BPM) · HRV -19 ms · Breath +12.4 br/m · 93% Surprise/Fear — 48.0% C++ ValidationCode 0 lock + 184 C++ expression packets.&lt;/p&gt;

&lt;p&gt;Lewis Capaldi: +26 BPM (73 → 99 BPM) · HRV -18 ms · Breath +11.8 br/m · 91% Fear/Grimace — Full sympathetic fight-or-flight surge.&lt;br&gt;
Jennifer Lawrence: +25 BPM (70 → 95 BPM) · HRV -17 ms · Breath +11.0 br/m · 92% Fear/Crying — Lacrimal eye-watering &amp;amp; jaw panic tracked by 478-pt WASM.&lt;/p&gt;

&lt;p&gt;Pedro Pascal: +24 BPM (70 → 94 BPM) · HRV -16 ms · Breath +10.6 br/m · 89% Strain — Cranial sweat vasodilatory surge.&lt;/p&gt;

&lt;p&gt;Shaquille O'Neal: +24 BPM (70 → 94 BPM) · HRV -16 ms · Breath +9.8 br/m · 88% Eye-Wide Surprise ("I apologize, Kansas!").&lt;/p&gt;

&lt;p&gt;Billie Eilish: +23 BPM (69 → 92 BPM) · HRV -15 ms · Breath +10.2 br/m · 86% Surprise/Angry.&lt;/p&gt;

&lt;p&gt;Idris Elba: +22 BPM (67 → 89 BPM) · HRV -15 ms · Breath +9.5 br/m · 84% Cough/Glare — 47.7% C++ kOk lock (229/480 frames) + 155 C++ expression packets.&lt;/p&gt;

&lt;p&gt;Paul Rudd (Smile Bluff): +21 BPM (66 → 87 BPM) · HRV -14 ms · 86% Happy Smile Bluff — Masks a +21 BPM capsaicin surge behind a wholesome Duchenne smile (28.3% C++ kOk, 88 packets).&lt;/p&gt;

&lt;p&gt;Sydney Sweeney: +20 BPM (68 → 88 BPM) · HRV -13 ms · 82% Smile Bluff — Polite smile until "the cumulative effect" triggers a +20 BPM jump.&lt;/p&gt;

&lt;p&gt;DJ Khaled (Quit on Wing #3): +19 BPM (74 → 93 BPM) · Real C++ breathing.rate lock at 38.3 br/min (+23.3 br/m!) — Tapped out on Wing #3 (11,600 SHU).&lt;/p&gt;

&lt;p&gt;Aubrey Plaza: +16 BPM (68 → 84 BPM) · HRV -11 ms · 64% Deadpan Leak — Icy stare still leaks +16 BPM.&lt;/p&gt;

&lt;p&gt;🧊 Lorde (Coolest / Most Composed): +8 BPM (64 → 72 BPM) · HRV -4 ms · Breath +2.4 br/m · 14% Strain — Undisputed Queen of Capsaicin Composure: 66.9% C++ ValidationCode 0 (321/480 frames) &amp;amp; 180 expression packets confirm she barely flinches!&lt;/p&gt;

&lt;p&gt;🎭 Negative Control — Maya Rudolph (SNL 0 SHU Prop Wing): +4 BPM (70 → 74 BPM) · HRV -3 ms (49 → 46 ms) · Breath +0.8 br/m · 93% Acted Facial Panic! — Eats an un-spiced NBC prop wing. Fools vision-only emotion AI (93% panic face), while optical rPPG (+4 BPM, 46 ms HRV) proves zero real capsaicin!&lt;br&gt;
🔬 Hardware Benchmark: 4K Bare-Skin Vasodilation vs. Compressed YouTube Studio Makeup&lt;/p&gt;

&lt;p&gt;To prove how @smartspectra/node-sdk v3.4.0 performs without 360p YouTube compression, 2-second camera cuts, and heavy TV studio foundation (~58% green-channel attenuation), we ran a controlled 4K Bare-Skin Thermal Vasodilation Benchmark (3840×2160 HEVC, 31.18s, 935 frames, padded into a 640×640 square ROI with 28px top headroom):&lt;/p&gt;

&lt;p&gt;ValidationCode 0 (kOk) Lock Rate: 87.2% (815 / 935 frames) — Code 12 (kExcessiveMotion) fired only during the exact 3.6s window where a hand wiped sweat across the forehead.&lt;/p&gt;

&lt;p&gt;Native C++ Protobuf Packet Yield: 1,020 real-time C++ metric packets across all 10 physiological channels, including 15 locked stable: true cardio.pulseRate readings up to 82.8% C++ confidence (tracking recovery from 95.6 BPM down to 79.7 BPM) and 11 breathing.rate readings (10.5 → 17.7 BRPM).&lt;/p&gt;

&lt;p&gt;💡 Developer Field Notes for @smartspectra/node-sdk Builders&lt;br&gt;
Use Square ROI (640×640) or Chest-Padded 9:16 Portrait (360×640) for Custom Input (sdk.useCustomInput()): Padding with top headroom keeps the forehead out of Code 11 (kFaceTooHigh) and the chest out of Code 7 (kChestNotVisible), lifting kOk lock rate from ~15% to 87%–100%.&lt;br&gt;
Import presage from @smartspectra/node-sdk/messages: decodeMetrics comes from @smartspectra/node-sdk, while the protobuf namespace (presage.smartspectra.Metrics.toObject(decoded)) lives in @smartspectra/node-sdk/messages.&lt;/p&gt;

&lt;p&gt;Call preconfigure(cacheDir) Before Starting: Required by cardio.arterialPressureTrace, eda.trace, and micromotion calculators via require('@smartspectra/node-sdk/js/ffi.js').preconfigure(cacheDir).&lt;br&gt;
Call await sdk.stopAsync() at EOF: Flushes all accumulated vitals packets cleanly from the C++ worker thread when streaming pre-recorded files.&lt;/p&gt;

</description>
      <category>presagechallenge</category>
      <category>devchallenge</category>
      <category>ai</category>
    </item>
    <item>
      <title>Vessel Ops</title>
      <dc:creator>Nick Switzer</dc:creator>
      <pubDate>Sun, 24 May 2026 21:03:04 +0000</pubDate>
      <link>https://dev.to/nswitzer/vessel-ops-3i2a</link>
      <guid>https://dev.to/nswitzer/vessel-ops-3i2a</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"When a crew member is injured 200 miles offshore, there is no internet, no doctor, and no second opinion. This application is the second opinion."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We built &lt;strong&gt;Vessel Ops AI&lt;/strong&gt;, an offline-first desktop application that serves as a lifeline for the &lt;strong&gt;Medical Person in Charge (MPIC)&lt;/strong&gt; and &lt;strong&gt;Chief Engineer&lt;/strong&gt; on vessels operating hundreds of miles from shore.&lt;/p&gt;

&lt;p&gt;When a crew member is injured mid-ocean, the MPIC usually has to flip through a 400-page medical manual under immense pressure. When a critical component fails, the Chief Engineer troubleshoots alone without an OEM support hotline or even a simple Google search. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vessel Ops AI puts Gemma 4 on the laptop in the wheelhouse&lt;/strong&gt;. It's grounded in the WHO International Medical Guide for Ships, cites specific pages for every piece of advice, and requires zero connectivity at sea.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🏥 &lt;strong&gt;RAG-grounded medical triage&lt;/strong&gt; — every response cites &lt;code&gt;[WHO IMGS, p. XX]&lt;/code&gt; from an embedded 938-chunk knowledge base&lt;/li&gt;
&lt;li&gt;⚙️ &lt;strong&gt;Engineering fault diagnosis&lt;/strong&gt; — component tracking, maintenance logs, and AI-assisted troubleshooting&lt;/li&gt;
&lt;li&gt;📸 &lt;strong&gt;Multimodal analysis&lt;/strong&gt; — upload a photo of an injury or a failing part and Gemma classifies it on-device&lt;/li&gt;
&lt;li&gt;🎓 &lt;strong&gt;MPIC Study Mode&lt;/strong&gt; — an interactive medical examiner that scores crew responses 1–10 against established protocols&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Captain Sparky Trivia&lt;/strong&gt; — morale-boosting maritime trivia to keep crew engaged during long watches&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Offline sync queue&lt;/strong&gt; — every write accumulates locally and pushes to Firebase Firestore when the vessel reaches port&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;🌐 Live hosted demo (no install required):&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://vessel-ops.web.app" rel="noopener noreferrer"&gt;https://vessel-ops.web.app&lt;/a&gt;&lt;br&gt;
&lt;em&gt;(Cloud preview mode — Gemma 4 26B MoE via Google AI Studio. A yellow banner indicates cloud mode.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(The 3-minute pitch is embedded at the top of this post! Looking for a deeper dive? Check out the &lt;a href="https://www.youtube.com/watch?v=1UXPEHe7HwI" rel="noopener noreferrer"&gt;Extended Technical Demo&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💻 Download the desktop app:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/switzloco/sail_pal/releases/latest" rel="noopener noreferrer"&gt;GitHub Releases&lt;/a&gt; — Windows installer (75 MB, no admin required) or portable &lt;code&gt;.zip&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/switzloco" rel="noopener noreferrer"&gt;
        switzloco
      &lt;/a&gt; / &lt;a href="https://github.com/switzloco/sail_pal" rel="noopener noreferrer"&gt;
        sail_pal
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A Gemma small language model tool to help sailors with medical, maintenance and other needs when they don't have reliable internet access in the middle of the ocean
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Vessel Ops AI&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;"When a crew member is injured 200 miles offshore, there is no internet, no doctor
and no second opinion. This application is the second opinion."&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;An offline-first AI assistant for the &lt;strong&gt;Medical Person in Charge (MPIC)&lt;/strong&gt; and &lt;strong&gt;Chief Engineer&lt;/strong&gt;
on vessels operating in deep-water environments. Runs entirely on a laptop — no cloud, no connectivity
required at sea. Powered by &lt;strong&gt;Gemma 4 via Ollama&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Hackathon Context&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Built for the &lt;strong&gt;Gemma 4 Good Hackathon&lt;/strong&gt; (Kaggle × Google DeepMind, due May 18, 2026).&lt;/p&gt;
&lt;p&gt;Prize targets:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ollama Prize&lt;/strong&gt; ($10k) — best project using Gemma 4 via Ollama&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global Resilience Prize&lt;/strong&gt; ($10k) — offline disaster/emergency response&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health &amp;amp; Sciences Prize&lt;/strong&gt; ($10k) — medical decision support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cactus Prize&lt;/strong&gt; ($10k) — local-first app with intelligent model routing&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Deployment&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;Laptop (MacBook, Windows, Linux)
  └── Ollama  →  gemma4:e2b (general / engine / maintenance / trivia)
              +  nswitzer/gemma4-maritime-medical-GGUF (Unsloth fine-tune
                 used automatically for medical routes)&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/switzloco/sail_pal" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How We Used Gemma 4
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Which Model — and Why
&lt;/h3&gt;

&lt;p&gt;Vessel Ops AI doesn't just "use Gemma" — Gemma is the core intelligence, and &lt;strong&gt;the model selection is driven entirely by the deployment constraint: a sailor's laptop with no internet.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Gemma 4 family gave us three options:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Architecture&lt;/th&gt;
&lt;th&gt;Total Params&lt;/th&gt;
&lt;th&gt;Active Params&lt;/th&gt;
&lt;th&gt;Our Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;E2B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dense&lt;/td&gt;
&lt;td&gt;~2B&lt;/td&gt;
&lt;td&gt;2B&lt;/td&gt;
&lt;td&gt;✅ &lt;strong&gt;Default edge model&lt;/strong&gt; — fits 8–16 GB RAM laptops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;E4B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dense&lt;/td&gt;
&lt;td&gt;~4B&lt;/td&gt;
&lt;td&gt;4B&lt;/td&gt;
&lt;td&gt;✅ &lt;strong&gt;Scale-up model&lt;/strong&gt; — stronger reasoning on 32 GB+ hardware&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;26B MoE&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mixture-of-Experts&lt;/td&gt;
&lt;td&gt;~26B&lt;/td&gt;
&lt;td&gt;~4B&lt;/td&gt;
&lt;td&gt;✅ &lt;strong&gt;Cloud preview&lt;/strong&gt; — used for the hosted demo via AI Studio&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;31B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dense&lt;/td&gt;
&lt;td&gt;~31B&lt;/td&gt;
&lt;td&gt;31B&lt;/td&gt;
&lt;td&gt;❌ Too heavy for shipboard hardware&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Why we chose the E2B/E4B small models for edge deployment:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maritime laptops are typically mid-range machines such as a 2–3 year old ThinkPad with 8–16 GB RAM and no discrete GPU. The 26B MoE requires ~16–24 GB VRAM even at Q4 quantization; the 31B dense needs 24 GB+. Neither fits the hardware reality at sea. The E2B and E4B models were purpose-built for exactly this constraint — ultra-mobile, edge deployment on devices like mid-range laptops.&lt;/p&gt;

&lt;p&gt;Our system implements &lt;strong&gt;intelligent model routing&lt;/strong&gt; based on clinical severity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# backend/ai/ollama_client.py
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_pick_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;severity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;severity&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;critical&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;serious&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model_scale&lt;/span&gt;    &lt;span class="c1"&gt;# gemma4:e4b — deeper reasoning
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model_primary&lt;/span&gt;      &lt;span class="c1"&gt;# gemma4:e2b — fast, fits any laptop
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Minor queries (crew vitals logging, routine maintenance) hit the fast E2B model. Critical medical events and serious engineering faults escalate to E4B for deeper reasoning — if the hardware supports it. This intelligent routing perfectly fits a local-first architecture pattern where the routing decision is quite literally life-or-death.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why the 26B MoE for the cloud demo:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The hosted preview at &lt;code&gt;vessel-ops.web.app&lt;/code&gt; uses &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; via Google AI Studio. The MoE architecture is ideal here — it delivers the intelligence of a much larger model while only computing ~4B parameters per token, keeping latency low for the demo. Crucially, we &lt;strong&gt;disabled Google Search grounding&lt;/strong&gt; so the cloud preview doesn't look artificially smarter than what a crew member would experience offline with the E2B/E4B models.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Gemma Does Real Work
&lt;/h3&gt;

&lt;p&gt;Gemma isn't a chat wrapper in this project. It's doing &lt;strong&gt;three distinct kinds of real work:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. RAG-grounded medical triage&lt;/strong&gt;&lt;br&gt;
Every query — regardless of which screen the user is on — automatically retrieves the top BM25-ranked passages from a 938-chunk SQLite FTS5 index of the WHO International Medical Guide for Ships (3rd Edition). These passages are injected into the system prompt with explicit citation markers, and Gemma is instructed to cite &lt;code&gt;[Source, p. XX]&lt;/code&gt; on every claim. Chris loves this page / source feature so he can dig deeper on his own. &lt;/p&gt;

&lt;p&gt;This dramatically reduces hallucination on dosages and protocols — exactly the kind of mistake that could kill/maim someone at sea.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Multimodal injury &amp;amp; component analysis&lt;/strong&gt;&lt;br&gt;
When a crew member uploads a photo of a wound or a failing engine part, Gemma's vision capability classifies the observation. The classification feeds back into the RAG step as additional query context, so the retrieved protocols are relevant to what the camera actually sees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Domain-specific personas&lt;/strong&gt;&lt;br&gt;
Different code paths apply different system prompts — medical chat, engine chat, MPIC study mode, trivia — all running on the same Gemma model. The MPIC study mode is particularly compelling: it acts as an interactive medical examiner that presents emergency scenarios and scores the crew member's response 1–10 against WHO protocols.&lt;/p&gt;




&lt;h3&gt;
  
  
  The FTS5 Decision (Killing the Embedding Model)
&lt;/h3&gt;

&lt;p&gt;This deserves its own section because it was the single most impactful engineering decision in the project.&lt;/p&gt;

&lt;p&gt;We started with ChromaDB + sentence-transformers for RAG. The embedding model alone added &lt;strong&gt;~1 GB&lt;/strong&gt; to the installer. For a vessel deployment where every megabyte matters and the installer ships on a USB stick, this was a dealbreaker.&lt;/p&gt;

&lt;p&gt;We replaced the entire RAG layer with &lt;strong&gt;SQLite FTS5&lt;/strong&gt; — which is built into stock Python — using BM25 ranking and a porter stemmer. The 938 WHO IMGS chunks ship as a 1.3 MB JSON that bootstraps into the FTS5 virtual table on first launch. Bundle size dropped &lt;strong&gt;~99%&lt;/strong&gt; with no measurable loss in retrieval quality on this corpus.&lt;/p&gt;

&lt;p&gt;Is BM25 perfect? No. Lexical search struggles with synonyms — if a sailor types "cut," BM25 might miss the WHO manual's section on "lacerations." Dense retrieval (embeddings) normally bridges this semantic gap, but we refused to pay the 1 GB size penalty. &lt;/p&gt;

&lt;p&gt;Instead, we implemented &lt;strong&gt;LLM-Based Query Expansion&lt;/strong&gt;. When a sailor submits a medical query, we do a rapid, invisible pass through the fast &lt;code&gt;gemma4:e2b&lt;/code&gt; model: &lt;em&gt;"Rewrite this medical symptom into formal clinical terminology for a manual search."&lt;/em&gt; Gemma translates "cut" to "laceration, hemorrhage," and we pass the expanded query to the FTS5 index. We get the intelligence of semantic search with the footprint of lexical search.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Laptop at Sea (no internet)
  ├── Ollama  →  gemma4:e2b (default) / gemma4:e4b (32GB+ RAM)
  ├── FastAPI backend  →  SQLite WAL + FTS5 RAG index
  ├── Next.js 14 static export  →  Tauri 2 desktop wrapper
  └── Any device on ship LAN  →  http://&amp;lt;laptop-ip&amp;gt;:3000

Cloud Preview (for judges / demos)
  ├── Google AI Studio  →  gemma-4-26b-a4b-it (MoE)
  ├── Cloud Run  →  FastAPI backend (stateless, auto-seeds demo data)
  └── Firebase Hosting  →  https://vessel-ops.web.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Challenges we Overcame
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Running frontier AI on "potato" hardware:&lt;/strong&gt; Many vessels run 3+ year old laptops. Gemma 4 E2B was chosen specifically for its capability-to-size ratio — responses generate fast enough to be useful in an emergency on hardware that wouldn't fit a 12B+ model in RAM alongside the application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment for non-technical crews:&lt;/strong&gt; Installing Python, Node, and Ollama is beyond a typical crew member. We wrap everything — Python interpreter, dependencies, FTS5 index, WHO PDF — into a single NSIS installer that runs without admin rights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PyInstaller orphan processes:&lt;/strong&gt; The PyInstaller &lt;code&gt;--onefile&lt;/code&gt; bootloader on Windows doesn't propagate termination to its child process. We reap orphan &lt;code&gt;vessel-ops-backend.exe&lt;/code&gt; processes on every launch with a 500ms settle — without this, the second launch silently fails because port 8000 is still bound.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team
&lt;/h3&gt;

&lt;p&gt;This project started with &lt;strong&gt;&lt;a href="https://www.linkedin.com/in/christopher-o-1a55b813/" rel="noopener noreferrer"&gt;Capt. Chris Oprzadek&lt;/a&gt;&lt;/strong&gt; — eight years as a Navy Nuclear Submarine Officer out of Hawaii and Guam, two Atlantic crossings, and now heading out with Seamester to teach offshore sailing. The brief came directly from him: &lt;em&gt;"we need a second opinion that works when there's no satellite."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Our medical advisor &lt;strong&gt;&lt;a href="https://www.linkedin.com/in/michael-switzer-61aaa1259/" rel="noopener noreferrer"&gt;Dr. Michael Switzer&lt;/a&gt;&lt;/strong&gt; — a physician who refits and maintains his own boat out of Port Townsend, WA — documents the practitioner-meets-boat-owner reality in his YouTube channel, where every onboard repair is also a reminder that out here you fix it yourself.&lt;/p&gt;

&lt;p&gt;Built by &lt;strong&gt;&lt;a href="https://www.linkedin.com/in/nswitzer/" rel="noopener noreferrer"&gt;Nick Switzer&lt;/a&gt;&lt;/strong&gt;. Between those three perspectives — deep-water passages, self-reliant boat life, and software — Vessel Ops AI's design brief wrote itself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Vessel Ops AI is open source under GPL-3.0. The WHO IMGS content is used under fair-use for safety-critical, non-commercial maritime applications.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
