Case — Pulse (Gas Station Compliance with Computer Vision)

Type: AutoU (client: Rede São Roque — gas station chain) Role: Full Stack / AI Developer — computer vision pipeline, backend, deployment and observability Status: In production (edge agent 24/7 at the stations) Stack: Python, YOLO (detection), FastAPI, React, PostgreSQL, LangGraph + Gemini (agentic pipeline), RAG, AWS (S3, Lambda, DynamoDB), Google Cloud (2 VMs), RTSP stream-worker, Prometheus + Grafana, Caddy, Docker Compose, Roboflow + Google Colab (retraining)

Confidentiality note: AutoU client project — validate what can be made public before exposing name/details.

Context and problem

The gas station chain needed to inspect visual compliance of its units (oil stains, litter, exposed cables, PPE) — currently dependent on on-site visits and sporadic photos. Without continuous detection, issues went untreated for days and management had no consolidated view.

Solution

A continuous monitoring system with a full model-improvement cycle:

  • Edge Agent (PC at the station): consumes cameras via RTSP, runs YOLO 24/7, validates detections and uploads events
  • Cloud backend: stores events and photos (S3, 1-year retention; DynamoDB for events/feedback), REST API with resolve, false-positive flows and dashboard
  • Agentic pipeline (LangGraph + Gemini + RAG): analysis of occurrences, generation of insights and remediation steps, integration with an e-mail/WhatsApp flow for notification
  • React dashboard: management approves/resolves occurrences and flags false positives
  • Retraining loop: user feedback becomes a dataset (collection script), retraining in Colab with Roboflow, new model goes back to the edge — the system improves with use

Architecture and technical decisions

  • Hybrid edge + cloud: YOLO inference at the station (minimal bandwidth and latency — uploads an event, not video), consolidation and generative AI in the cloud
  • Pragmatic multi-cloud: AWS for storage/events (S3/Lambda/DynamoDB), GCP for the application (deployed on 2 VMs with separate roles — app and stateful/observability)
  • Dedicated stream-worker for RTSP capture decoupled from the backend
  • Real observability (implemented by me): Prometheus + Grafana on its own stateful VM — cost, usage and infrastructure monitoring — with versioned snapshots and deployment plan
  • Agentic pipeline optimization documented and executed (PLANO_OTIMIZACAO_PIPELINE_AGENTICO.md) — controlled LLM cost and latency
  • Global cache planned/implemented to reduce reprocessing (plano-cache-global.md)
  • Documented single-shot migration, versioned RAG seeds, local→GCP/EC2 sync scripts

Challenges and solutions

  • False positives eroding trust: a false-positive button on the dashboard feeds directly into the retraining dataset — user feedback became an ML asset
  • 24/7 infrastructure with controlled cost: separation of app/stateful into distinct VMs, defined retention (photos 1 year) and the edge doing the heavy inference work
  • Real-world operation (gas stations): reproducible setup via PowerShell/bash scripts to install new stations (push-stations.ps1)

Results and impact

  • Continuous 24/7 detection in production replacing sporadic on-site inspection [number of stations/cameras TO CONFIRM]
  • Continuous model-improvement cycle with real operational data
  • Management with a consolidated dashboard of occurrences, remediation and false positives
Wesley Correia

Full Stack Developer passionate about solving people's problems, crafting innovative solutions, and building amazing digital experiences.

Quick Links

Social

© 2026 Wesley de Carvalho Augusto Correia.All rights reserved.