
LunaLens is a Dockerized, resource-efficient video captioning agent built for the AMD Developer Hackathon ACT II Video Captioning track. It turns short videos into concise English captions across four distinct styles: formal, sarcastic, humorous technology, and humorous non-technology, while keeping compute and API usage under tight control. Instead of streaming an entire video to the model, LunaLens uses OpenCV to sample a small set of evenly distributed frames that represent the whole clip, resizes them, and compresses them as JPEG before encoding. Only those sampled frames ever leave the container, which sharply reduces the amount of image data sent to OpenAI GPT-5.6 Luna through the Responses API, with automatic fallback to the lighter GPT-5.4 Mini if the primary model is unavailable. A single grounded pass first extracts structured visual facts, including subjects, actions, setting, mood, and uncertain details, so that captions describe only what the frames actually show. A bounded number of caption candidates per style are then generated and resolved in one self-check step, which avoids repeated or wasteful model calls. Reasoning effort, image detail, frame count, and output token budgets are all configurable, so caption quality and processing cost can be tuned for each deployment. Structured Outputs with strict JSON schemas guarantee that every requested style is present and correctly formatted, and captions are automatically validated to remain in English, contain one sentence, and stay between 8 and 22 words. The agent is designed for reliable automated evaluation: it reads /input/tasks.json, writes /output/results.json, handles API or video-processing failures gracefully, and always exits successfully with valid output. The project contains no hardcoded sample answers and runs as a lean, reproducible linux/amd64 Docker container.
13 Jul 2026