<?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: Viorel Plugar</title>
    <description>The latest articles on DEV Community by Viorel Plugar (@viorel_plugar).</description>
    <link>https://dev.to/viorel_plugar</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%2F4251951%2F8676efb8-b4bb-4c12-b4b2-9996fd07d727.png</url>
      <title>DEV Community: Viorel Plugar</title>
      <link>https://dev.to/viorel_plugar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viorel_plugar"/>
    <language>en</language>
    <item>
      <title>VisionSentinel: From Crash to Help in Secondsneighbours</title>
      <dc:creator>Viorel Plugar</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:47:08 +0000</pubDate>
      <link>https://dev.to/viorel_plugar/visionsentinel-from-crash-to-help-in-secondsneighbours-gn</link>
      <guid>https://dev.to/viorel_plugar/visionsentinel-from-crash-to-help-in-secondsneighbours-gn</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Cities already have thousands of traffic cameras, and nobody watches all of them. When a crash happens at 2 a.m. on a quiet roundabout, the first minutes are lost until someone happens to call 112. Those are the minutes that matter most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VisionSentinel&lt;/strong&gt; turns ordinary traffic cameras into accident sensors, then asks people nearby who know first aid to help until the ambulance arrives. No new hardware and no camera calibration: it works on the video a city already has, including a live public camera from Giroc, next to Timișoara.&lt;/p&gt;

&lt;p&gt;Here is what happens from frame to phone:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.See&lt;/strong&gt;: YOLO26 detects every car, two-wheeler and pedestrian, and our tracker follows each one over time, even when it disappears behind a bus.&lt;br&gt;
&lt;strong&gt;2.Measure&lt;/strong&gt;: From each track we get speed, direction and braking, in box-lengths per second, so distance from the camera doesn't matter. On screen we show an estimate in km/h.&lt;br&gt;
&lt;strong&gt;3.Decide&lt;/strong&gt;: One sign is never enough. A hard brake alone is just traffic. We confirm a crash only with an impact (a hard brake, a swerve, two road users closing in and touching, someone vanishing mid-road) and an aftermath (a car left standing where it hit, a person on the ground). The signs combine like independent evidence, and the score has to reach 0.70.&lt;br&gt;
&lt;strong&gt;4.Check&lt;/strong&gt;: A vision-language model running locally, Qwen3-VL, looks at the clearest frames before, during and after, and answers in a fixed JSON format: is it an accident, what kind, how serious, and is there fire, smoke or a fuel leak. When it isn't sure, Gemini gives a second opinion.&lt;br&gt;
&lt;strong&gt;5.Record&lt;/strong&gt;: Every incident gets a dossier: the clip, the key frames, a web and PDF report in plain words, a CAP 1.2 alert for dispatch systems, and SHA-256 hashes, so any change to the evidence can be detected.&lt;br&gt;
&lt;strong&gt;6.Help&lt;/strong&gt;: Volunteers who signed up by scanning a QR code get a push notification with the distance, directions, first-aid steps and a Call 112 button.&lt;/p&gt;

&lt;p&gt;The part we're proudest of is that nobody is sent into danger. If the AI sees fire, a fuel leak or a tanker, volunteers are told "do not go there". Serious injuries go only to people who declared a first-aid certificate, and after three people are on the way, the rest are told it's enough. Volunteers never receive images or licence plates, and the first-aid steps are written by us, never by the AI.&lt;/p&gt;

&lt;p&gt;How well does it work? On our robustness benchmark (real crash clips with birds, fog, night, shaking and hidden impacts added), it detects 15 of 16 with zero false alarms, about 3.7 seconds after the impact. On 80 real CCTV crashes from the ACCIDENT dataset it catches 19, with 2 false alarms. Most of the misses are very dark clips or crashes far from the camera: we chose few false alarms over catching everything.&lt;/p&gt;

&lt;p&gt;What we learned: an AI is a great second pair of eyes and a bad judge. Ours is never allowed to cancel an alert on its own, and the rules we wrote around it matter as much as the model.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Vultr: from one laptop to everyone's phone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The hackathon's Vultr credits covered CPU plans, so we took a Shared CPU instance in Frankfurt (4 vCPU, 8 GB, Ubuntu 24.04). Our setup.sh checks for a GPU and installs the right stack either way. On a CPU-only box it runs YOLO26 nano in ONNX and uses Gemini as the only AI check, because a vision-language model on a CPU takes minutes per incident.&lt;/p&gt;

&lt;p&gt;For the demo we wanted the full pipeline, so the heavy work runs on our laptop's RTX 4060 and the Vultr server became the public front door. Caddy gives it automatic HTTPS, and an SSH reverse tunnel plugs the laptop.&lt;br&gt;
That's how the judges' phones reached the demo on any network. A home upload can't push 25 full frames a second to every viewer, so remote browsers get a lighter stream (800 px, 10 frames a second, about 40 KB a frame instead of 177 KB) while the projector gets the full one.&lt;br&gt;
&lt;strong&gt;Gemini API: a second opinion, only when needed&lt;/strong&gt;&lt;br&gt;
The local model, Qwen3-VL 4B, checks every confirmed crash: it's fast, free and the images never leave the machine. When it says "unsure" or "no", or says "yes" without pointing at visible evidence, we send the same frames and the same question to Gemini 3.5 Flash-Lite. Both models must answer in the same JSON schema, so one function judges both answers&lt;br&gt;
Gemini also double-checks any danger the local model reports, because that answer decides whether volunteers may go at all. On 30 real crash reports, the local model alone confirmed 22; with Gemini asked only when it was unsure, 24, with 0 of 4 false alarms confirmed. If a model is over quota or busy, the next one in the list is asked, and answers for test clips are cached so rehearsals don't burn the free tier.&lt;/p&gt;

&lt;p&gt;One lesson worth sharing: structured output is generated in schema order. When the yes/no danger fields came before the description, the models answered them before "looking" properly, and a fallen bicycle became an "overturned vehicle". Moving the description first, plus tighter definitions ("impact dust is not smoke, a fallen bike is not an overturned vehicle"), fixed it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tiger Data: the memory of the road&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every camera writes its traffic to Tiger Data (TimescaleDB): road users and visibility in one hypertable, and every signal (hard brake, abrupt stop, contact) in another. Continuous aggregates turn them into hourly figures the dashboard reads instantly&lt;br&gt;
Also in the stack: Ollama for the local model, ntfy for push notifications, DuckDNS for the domain and OpenStreetMap for the maps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;We built VisionSentinel at UniHack Timișoara as a team of 4:&lt;/p&gt;

&lt;p&gt;We didn't start from zero. We arrived with the detection core we had been building in the weeks before: the tracker, the crash rules, the local AI check and the dashboard. The weekend was about turning it into something a city could actually use: the Vultr deployment, the Gemini second opinion, the Tiger Data history, the volunteer alerts, the safety rules, the web report, speeds in km/h and the live camera page.&lt;/p&gt;

&lt;p&gt;The best idea of the weekend came from the jury, not from us. When we showed the volunteer alerts, the jury told us: a burning car must not draw volunteers in, don't put more people in danger. We had no answer for that yet. That night we added danger checks to the AI's answer and the safety levels: nobody near a fire or a fuel leak, serious injuries only for certified first-aiders, a "stop" message if a later look shows new danger, and a sign-up where volunteers declare their training and accept the risks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What broke at 3am&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cloud had no GPU.&lt;/strong&gt; Our plan was the whole pipeline on a Vultr GPU, but the credits covered CPU plans only. So the laptop does the analysis and Vultr serves the site through an SSH tunnel. The first tunnel window opened, printed nothing and never connected: Windows' ssh was quietly waiting for keyboard input. ssh -n fixed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The site was blocked on mobile data.&lt;/strong&gt; Our free sslip.io address worked on Wi-Fi, but Romanian mobile networks showed a block page for it, so phones on mobile data couldn't open the QR link. We set up a DuckDNS name in the middle of the night, and Caddy now answers to both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The live camera froze at 1 a.m.&lt;/strong&gt; The Giroc camera page suddenly gave our data-centre server only a private network address, and our code kept dialling it while the dashboard showed the last frame as if it were live. Now private addresses are never used, the dashboard says when the camera stops sending, and the live page runs from the laptop, whose home connection still gets the public stream.&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
