Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

gemini-count-in-video

Skill by benchflow-ai

Analyzes and counts objects in videos using the Google Gemini API. It is aimed at developers and analysts doing pedestrian, vehicle and surveillance video counting.

  • Score 87
  • 1.9k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install gemini-count-in-video

Built from the published package, never by AI.

git clone --depth 1 https://github.com/benchflow-ai/skillsbench /tmp/skillsbench && mkdir -p ~/.claude/skills && cp -r /tmp/skillsbench/tasks-extra/pedestrian-traffic-counting/environment/skills/gemini-count-in-video ~/.claude/skills/gemini-count-in-video

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install gemini-count-in-video in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Gemini Video Understanding Skill counts and detects objects in video using the Google Gemini API. It focuses on counting pedestrians, distinguishing object types such as walkers, cyclists and vehicles, tracking movement, and analyzing surveillance footage. The skill includes Python code examples for single-video and batch processing.

The workflow uploads larger videos through the Gemini File API and waits for processing to finish before analysis. Prompts define explicit inclusion and exclusion rules, and responses are parsed from answer tags or labelled lines into structured JSON with success, video file, model, counts and notes fields. The source is written for developers and analysts working on traffic or surveillance counting.

Written from the project's SKILL.md and checked against it.

What it can do

  • Pedestrian countingCounts people walking on foot in surveillance video, excluding cyclists and drivers.
  • Differentiated object countsCounts pedestrians, cyclists and vehicles separately in one analysis.
  • Batch video processingProcesses all supported videos in a directory and collects counts per file.
  • File API uploadUploads larger videos and waits for Gemini processing to complete before analysis.
  • Structured count outputReturns results as JSON with success, video file, model, counts and notes fields.

What you need

  • Google Gemini API key set as GEMINI_API_KEY
  • Python with the google-genai library

Try asking

  • Count the walking pedestrians in surveillance.mp4, excluding cyclists.
  • Count pedestrians, cyclists and vehicles separately in this traffic video.
  • Process every video in my folder and return a pedestrian count for each.

Good to know

  • Counting accuracy depends on video quality, camera angle and object distance.
  • Occlusion and very crowded scenes can affect counts.
  • The model may misclassify similar objects, such as motorcyclists as cyclists.
  • Long videos take longer to process, typically 5 to 30 seconds per video.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: tasks-extra/pedestrian-traffic-counting/environment/skills/gemini-count-in-video/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md11 KB

Alternatives to gemini-count-in-video

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

gemini-count-in-video: common questions

What video formats does it accept?

The source lists MP4, MPEG, MOV, AVI, FLV, MPG, WebM, WMV and 3GPP files. Smaller files can be sent as inline bytes, while larger surveillance footage should use the File API.

Which Gemini models does the skill recommend?

The source recommends gemini-2.0-flash-exp or gemini-2.5-flash for a good balance of speed and accuracy. Its code examples use gemini-2.0-flash-exp.

How does it get a reliable count from the model?

The skill asks the model to return the count inside answer tags and parses it with a regular expression. A fallback takes the first number found if the tags are missing.

How do I install gemini-count-in-video?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is gemini-count-in-video free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is gemini-count-in-video safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to gemini-count-in-video?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

gemini-count-in-video Install

Add to stack

Loading.