vicky-more@prod

~/map/tratomoperational

TRATOM

Edge A/V Recording & AI Video Analytics Platform

A distributed edge recording system for classrooms, plus a serverless AI layer that turns every recording into an automated quality, compliance, and cost report — built on multimodal LLMs rather than custom-trained computer-vision models.

Scale150+

concurrent classrooms

Throughput300–500 GB

of A/V data per day

NetworkWi-Fi-only classrooms
RoleDesigned and built from scratch

01Problem

Classrooms needed reliable audio and video recording on Wi-Fi-only networks, where power cuts and dropped connections are normal. A lost recording cannot be re-shot.

Once recorded, every session also needed review: is the camera framed correctly, who is in the room, are staff in uniform, and how good was the lesson? Checking hundreds of gigabytes of footage a day by hand does not scale.

02Architecture

pipeline: edge → cloud → AI → application
TRATOM pipelineRaspberry Pi edge devices upload recordings to Amazon S3. An S3-triggered compression Lambda invokes a containerized analysis Lambda, which claims each job in DynamoDB. The analysis Lambda runs two GPT-4.1 Vision passes and a Whisper audio pipeline with rubric scoring, writes a JSON report, and sends an HMAC-signed callback to a FastAPI and MySQL backend where humans can review and override results.Edge devicesRaspberry Pi · cam · mic150+ classroomsAmazon S3raw recordings300–500 GB/dayCompress λS3-triggered · FFmpeg24fps · 480p · H.264Analysis λcontainer · Python 3.12OpenCV frame samplingDynamoDBidempotent job claimGPT-4.1 Vision × 2 passes1 · camera-health audit2 · headcount + uniform complianceAudio · Whisper (Groq)LLM scoring on a code-computedweighted rubric · safety flagsJSON report → S3per-call LLM cost trackedHMAC-signed callbackFastAPI · MySQL · retries · versioned configHuman reviewcan override AI resultsTRATOM pipeline, vertical layout: edge devices, Amazon S3, compression Lambda, analysis Lambda with DynamoDB, GPT-4.1 Vision and Whisper stages, JSON report, HMAC callback to FastAPI and MySQL, human review.Edge devicesRaspberry Pi · cam · mic150+ classroomsAmazon S3raw recordings300–500 GB/dayCompress λS3-triggered · FFmpeg24fps · 480p · H.264Analysis λcontainer · Python 3.12OpenCV frame samplingDynamoDBjob claimGPT-4.1 Visioncamera-health auditheadcount +uniform checksWhisper audioLLM scoring on acode-computed rubric+ safety flagsJSON report → S3per-call LLM cost trackedHMAC-signed callbackFastAPI · MySQL · retriesversioned pipeline configHuman reviewcan override AI results
  1. Capture at the edge

    Raspberry Pi devices with a camera and wireless mic record each classroom and upload to Amazon S3 through retryable, fault-tolerant upload pipelines.

  2. Compress, then hand off

    An S3-triggered AWS Lambda compresses each recording with FFmpeg (24fps, 480p, H.264, CRF 30), skips files already marked compressed to avoid loops, and explicitly invokes the analysis Lambda.

  3. Claim the job once

    The containerized analysis Lambda (Python 3.12, 2–4 GB RAM, 900s timeout) claims each job in DynamoDB, so a recording is never analyzed twice even if invoked more than once.

  4. Look and listen

    OpenCV samples two frame sets per video for two GPT-4.1 Vision passes. In parallel, the audio track is chunked, transcribed with Groq-hosted Whisper, and scored by an LLM against a weighted rubric.

  5. Report and hand back

    Results are written to S3 as one JSON report, then sent to the FastAPI backend through an HMAC-SHA256-signed callback and stored in MySQL, with retries, human-review overrides, and versioned pipeline configuration.

03The edge layer

  • Python services for synchronized webcam and wireless-mic capture, with FFmpeg merge, transcode, and compression.
  • Real-time control plane over bi-directional WebSockets: start/stop, OTA updates via AWS ECR + Docker, and network recovery.
  • Heartbeat signaling, idempotent processing, and state reconciliation for near-zero data loss across all edge devices.
  • Recording start/stop and live preview from an Android app and web dashboard, with auto-resume after power failure, auto-sync, and video fallback.

04Key decisions

vision

Multimodal LLMs instead of trained CV models

Visual checks run as GPT-4.1 Vision passes over sampled frames: one audits camera health (misaimed, cropped, blank, or distorted framing), the other counts trainers, associates, parents, and children and checks uniforms.

Trade-offNo detector to train, label data for, or maintain — new checks and custom labels are a configuration change, not a new model.

reliability

Idempotent job claiming

A DynamoDB claim guards every analysis job, and the compression step checks a compressed flag before running, so retries and duplicate invocations never double-process a recording.

Trade-offOne extra write per job buys safe retries everywhere in an event-driven pipeline.

scoring

The rubric is computed in code, not by the model

The LLM rates each dimension of a transcribed lesson; the final quality score is a weighted formula in code, so the model never self-scores.

Engagement25%
Positive reinforcement20%
Warmth20%
Clarity15%
Vocabulary10%
Grammar10%
trust

Signed handoff with a human in the loop

The pipeline hands results to the application through an HMAC-SHA256-signed callback. Reviewers can override AI results, and pipeline configuration is versioned.

Trade-offAI output is treated as a first pass, not a final verdict.

05Outcomes

classrooms150+

concurrent classrooms recorded over Wi-Fi-only networks

per day300–500 GB

of audio and video processed per day

data loss≈0

near-zero data loss across all edge devices

Every recording now arrives with an automated quality, compliance, and cost report, with per-call LLM cost tracked across every vision, transcription, and scoring call.

06Stack

PythonReactJSWebSocketsFFmpegOpenCVOpenAI GPT-4.1 (Vision)Groq WhisperAWS Lambda (Container Images)Amazon S3DynamoDBAWS ECRDockerFastAPIMySQLAndroid

Next: Cortex.

The read-only AI support assistant with tool calling, model routing and privacy guardrails.