.png&w=828&q=75)
The Video Captioning Agent is an autonomous, Dockerized AI pipeline developed for the AMD Developer Hackathon. Its core objective is to process video clips of varying settings and generate accurate, context-aware descriptions in four distinct styles: formal, sarcastic, humorous tech, and humorous non-tech. The agent runs sequentially on startup, reading input tasks from a JSON file, downloading the target clips, and outputting the final structured captions into a designated output directory. Technically, the pipeline is written in Python and uses the Google GenAI SDK to communicate with the Gemini 2.5 Flash vision-language model. Video clips are uploaded to Gemini's cloud storage where they are analyzed using detailed prompt instructions and Pydantic schema validation to ensure the generated output is 100% valid JSON. The code also implements robust retry loops for rate-limiting, post-generation word count checks (retaining captions strictly between 25 and 60 words), and a safety cleanup wrapper to delete files from the cloud immediately after processing. For ease of configuration and security, the system is designed to load credentials from a local .env file and falls back to an obfuscated backup key to avoid exposing active keys in public Docker registries. The agent is packaged within a slim Docker container compiled for the linux/amd64 architecture, allowing it to run portably and execute captioning tasks on any grading cluster within the required 10-minute timeout limit.
13 Jul 2026