[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XDH0ZNC6ZVDRVPRKD0J9WP":3,"skill-same:01M6XDH0ZNC6ZVDRVPRKD0J9WP":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":27,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":13,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6XDH0ZNC6ZVDRVPRKD0J9WP","gemini-count-in-video",null,"Analyze and count objects in videos using Google Gemini API (object counting, pedestrian detection, vehicle tracking, and surveillance video analysis).","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fpedestrian-traffic-counting\u002Fenvironment\u002Fskills\u002Fgemini-count-in-video\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"gemini","gemini count in video","count","Video","analysis","api","detection","analyze","tracking","objects","counting","videos","google gemini api","object","object counting","gemini api","google","2026-11-10 10:12:30",false,"---\nname: gemini-count-in-video\ndescription: Analyze and count objects in videos using Google Gemini API (object counting, pedestrian detection, vehicle tracking, and surveillance video analysis).\n---\n\n# Gemini Video Understanding Skill\n\n## Purpose\nThis skill enables video analysis and object counting using the Google Gemini API, with a focus on **counting pedestrians**, **detecting objects**, **tracking movement**, and **analyzing surveillance footage**. It supports precise prompting for differentiated counting (e.g., pedestrians vs cyclists vs vehicles).\n\n## When to Use\n- Counting pedestrians, vehicles, or other objects in surveillance videos\n- Distinguishing between different types of objects (walkers vs cyclists, cars vs trucks)\n- Analyzing traffic patterns and movement through a scene\n- Processing multiple videos for batch object counting\n- Extracting structured count data from video footage\n\n## Required Libraries\n\nThe following Python libraries are required:\n\n```python\nfrom google import genai\nfrom google.genai import types\nimport os\nimport time\n```\n\n## Input Requirements\n- **File formats**: MP4, MPEG, MOV, AVI, FLV, MPG, WebM, WMV, 3GPP\n- **Size constraints**:\n  - Use inline bytes for small files (rule of thumb: \u003C20MB).\n  - Use the File API upload flow for larger videos (most surveillance footage).\n  - Always wait for processing to complete before analysis.\n- **Video quality**: Higher resolution provides better counting accuracy for distant objects\n- **Duration**: Longer videos may require longer processing times; consider the full video length for accurate counting\n\n## Output Schema\nFor object counting tasks, structure results as JSON:\n\n```json\n{\n  \"success\": true,\n  \"video_file\": \"surveillance_001.mp4\",\n  \"model\": \"gemini-2.0-flash-exp\",\n  \"counts\": {\n    \"pedestrians\": 12,\n    \"cyclists\": 3,\n    \"vehicles\": 5\n  },\n  \"notes\": \"Optional observations about the counting process or edge cases\"\n}\n```\n\n### Field Descriptions\n- `success`: Whether the analysis completed successfully\n- `video_file`: Name of the analyzed video file\n- `model`: Gemini model used for the request\n- `counts`: Object counts by category\n- `notes`: Any clarifications or warnings about the count\n\n## Code Examples\n\n### Basic Pedestrian Counting (File API Upload)\n\n```python\nfrom google import genai\nimport os\nimport time\nimport re\n\nclient = genai.Client(api_key=os.getenv(\"GEMINI_API_KEY\"))\n\n# Upload video (File API for >20MB)\nmyfile = client.files.upload(file=\"surveillance.mp4\")\n\n# Wait for processing\nwhile myfile.state.name == \"PROCESSING\":\n    time.sleep(5)\n    myfile = client.files.get(name=myfile.name)\n\nif myfile.state.name == \"FAILED\":\n    raise ValueError(\"Video processing failed\")\n\n# Prompt for counting pedestrians with clear exclusion criteria\nprompt = \"\"\"Count the total number of pedestrians who are WALKING through the scene in this surveillance video.\n\nIMPORTANT RULES:\n- ONLY count people who are walking on foot\n- DO NOT count people riding bicycles\n- DO NOT count people driving cars or other vehicles\n- Count each unique pedestrian only once, even if they appear in multiple frames\n\nProvide your answer as a single integer number representing the total count of pedestrians.\nAnswer with just the number, nothing else.\nYour answer should be enclosed in \u003Canswer> and \u003C\u002Fanswer> tags, such as \u003Canswer>5\u003C\u002Fanswer>.\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Parse the response\nresponse_text = response.text.strip()\nmatch = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response_text)\nif match:\n    count = int(match.group(1))\n    print(f\"Pedestrian count: {count}\")\nelse:\n    print(\"Could not parse count from response\")\n```\n\n### Batch Processing Multiple Videos\n\n```python\nfrom google import genai\nimport os\nimport time\nimport re\n\ndef upload_and_wait(client, file_path: str, max_wait_s: int = 300):\n    \"\"\"Upload video and wait for processing.\"\"\"\n    myfile = client.files.upload(file=file_path)\n    waited = 0\n    \n    while myfile.state.name == \"PROCESSING\" and waited \u003C max_wait_s:\n        time.sleep(5)\n        waited += 5\n        myfile = client.files.get(name=myfile.name)\n    \n    if myfile.state.name == \"FAILED\":\n        raise ValueError(f\"Video processing failed: {myfile.state.name}\")\n    if myfile.state.name == \"PROCESSING\":\n        raise TimeoutError(f\"Processing timeout after {max_wait_s}s\")\n    \n    return myfile\n\nclient = genai.Client(api_key=os.getenv(\"GEMINI_API_KEY\"))\n\n# Process all videos in directory\nvideo_dir = \"\u002Fapp\u002Fvideo\"\nvideo_extensions = {\".mp4\", \".mkv\", \".avi\", \".mov\"}\nresults = {}\n\nfor filename in os.listdir(video_dir):\n    if any(filename.lower().endswith(ext) for ext in video_extensions):\n        video_path = os.path.join(video_dir, filename)\n        \n        print(f\"Processing {filename}...\")\n        \n        # Upload and analyze\n        myfile = upload_and_wait(client, video_path)\n        \n        response = client.models.generate_content(\n            model=\"gemini-2.0-flash-exp\",\n            contents=[\"Count pedestrians walking through the scene. Answer with just the number.\", myfile],\n        )\n        \n        # Extract count\n        count = int(re.search(r'\\d+', response.text).group())\n        results[filename] = count\n        print(f\"  Count: {count}\")\n\nprint(f\"\\nProcessed {len(results)} videos\")\n# Results dictionary can now be used for further processing or saving\n```\n\n### Differentiating Object Types\n\n```python\n# Count different categories separately\nprompt = \"\"\"Analyze this surveillance video and count:\n1. Pedestrians (people walking on foot)\n2. Cyclists (people riding bicycles)\n3. Vehicles (cars, trucks, motorcycles)\n\nRULES:\n- Count each unique individual\u002Fvehicle only once\n- If someone switches from walking to cycling, count them in their primary mode\n- Provide counts as three separate numbers\n\nFormat your answer as:\nPedestrians: \u003Cnumber>\nCyclists: \u003Cnumber>\nVehicles: \u003Cnumber>\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Parse multiple counts\ntext = response.text\npedestrians = int(re.search(r'Pedestrians:\\s*(\\d+)', text).group(1))\ncyclists = int(re.search(r'Cyclists:\\s*(\\d+)', text).group(1))\nvehicles = int(re.search(r'Vehicles:\\s*(\\d+)', text).group(1))\n```\n\n### Using Answer Tags for Reliable Parsing\n\n```python\n# Request structured output with XML-like tags\nprompt = \"\"\"Count the total number of pedestrians walking through the scene.\n\nYou should reason and think step by step. Provide your answer as a single integer.\nYour answer should be enclosed in \u003Canswer> and \u003C\u002Fanswer> tags, such as \u003Canswer>5\u003C\u002Fanswer>.\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Robust extraction\nmatch = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response.text)\nif match:\n    count = int(match.group(1))\nelse:\n    # Fallback: try to find any number in response\n    numbers = re.findall(r'\\d+', response.text)\n    count = int(numbers[0]) if numbers else 0\n```\n\n\n## Best Practices\n- **Use the File API** for all surveillance videos (typically >20MB) and always wait for processing to complete.\n- **Be specific in prompts**: Clearly define what to count and what to exclude (e.g., \"walking pedestrians only, not cyclists\").\n- **Use structured output formats**: Request answers in specific formats (like `\u003Canswer>N\u003C\u002Fanswer>`) for reliable parsing.\n- **Ask for reasoning**: Include \"think step by step\" to improve counting accuracy.\n- **Handle edge cases**: Specify rules for partial appearances, people entering\u002Fexiting frame, and mode changes.\n- **Use gemini-2.0-flash-exp or gemini-2.5-flash**: These models provide good balance of speed and accuracy for object counting.\n- **Test with sample videos**: Verify prompt effectiveness on representative samples before batch processing.\n\n## Error Handling\n\n```python\nimport time\n\ndef upload_and_wait(client, file_path: str, max_wait_s: int = 300):\n    \"\"\"Upload video and wait for processing with timeout.\"\"\"\n    myfile = client.files.upload(file=file_path)\n    waited = 0\n\n    while myfile.state.name == \"PROCESSING\" and waited \u003C max_wait_s:\n        time.sleep(5)\n        waited += 5\n        myfile = client.files.get(name=myfile.name)\n\n    if myfile.state.name == \"FAILED\":\n        raise ValueError(f\"Video processing failed: {myfile.state.name}\")\n    if myfile.state.name == \"PROCESSING\":\n        raise TimeoutError(f\"Processing timeout after {max_wait_s}s\")\n\n    return myfile\n\ndef count_with_fallback(client, video_path):\n    \"\"\"Count pedestrians with error handling and fallback.\"\"\"\n    try:\n        myfile = upload_and_wait(client, video_path)\n        \n        prompt = \"\"\"Count pedestrians walking through the scene.\n        Answer with just the number in \u003Canswer>\u003C\u002Fanswer> tags.\"\"\"\n        \n        response = client.models.generate_content(\n            model=\"gemini-2.0-flash-exp\",\n            contents=[prompt, myfile],\n        )\n        \n        # Try structured parsing first\n        match = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response.text)\n        if match:\n            return int(match.group(1))\n        \n        # Fallback to any number found\n        numbers = re.findall(r'\\d+', response.text)\n        if numbers:\n            return int(numbers[0])\n        \n        print(f\"Warning: Could not parse count, defaulting to 0\")\n        return 0\n        \n    except Exception as e:\n        print(f\"Error processing video: {e}\")\n        return 0\n```\n\nCommon issues:\n- **Upload processing stuck**: Use timeout logic and fail gracefully after max wait time\n- **Ambiguous responses**: Use structured output tags like `\u003Canswer>\u003C\u002Fanswer>` for reliable parsing\n- **Rate limits**: Add retry logic with exponential backoff for batch processing\n- **Inconsistent counts**: Be very explicit in prompts about counting rules and exclusions\n\n## Limitations\n- Counting accuracy depends on video quality, camera angle, and object size\u002Fdistance\n- Very crowded scenes may have higher counting variance\n- Occlusion (objects blocking each other) can affect accuracy\n- Long videos require longer processing times (typically 5-30 seconds per video)\n- The model may occasionally misclassify similar objects (e.g., motorcyclist as cyclist)\n- For highest accuracy, use clear prompts with explicit inclusion\u002Fexclusion criteria\n\n## Version History\n- **1.0.0** (2026-01-21): Tailored for pedestrian traffic counting with focus on object counting, differentiation, and batch processing\n\n\n## Resources\n\n- [Video API Docs](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fvideo-understanding)\n- [Get API Key](https:\u002F\u002Faistudio.google.com\u002Fapikey)\n- [Pricing](https:\u002F\u002Fai.google.dev\u002Fpricing)\n- [Python SDK Documentation](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fquickstart?lang=python)","# Gemini Video Understanding Skill\n\n## Purpose\nThis skill enables video analysis and object counting using the Google Gemini API, with a focus on **counting pedestrians**, **detecting objects**, **tracking movement**, and **analyzing surveillance footage**. It supports precise prompting for differentiated counting (e.g., pedestrians vs cyclists vs vehicles).\n\n## When to Use\n- Counting pedestrians, vehicles, or other objects in surveillance videos\n- Distinguishing between different types of objects (walkers vs cyclists, cars vs trucks)\n- Analyzing traffic patterns and movement through a scene\n- Processing multiple videos for batch object counting\n- Extracting structured count data from video footage\n\n## Required Libraries\n\nThe following Python libraries are required:\n\n```python\nfrom google import genai\nfrom google.genai import types\nimport os\nimport time\n```\n\n## Input Requirements\n- **File formats**: MP4, MPEG, MOV, AVI, FLV, MPG, WebM, WMV, 3GPP\n- **Size constraints**:\n  - Use inline bytes for small files (rule of thumb: \u003C20MB).\n  - Use the File API upload flow for larger videos (most surveillance footage).\n  - Always wait for processing to complete before analysis.\n- **Video quality**: Higher resolution provides better counting accuracy for distant objects\n- **Duration**: Longer videos may require longer processing times; consider the full video length for accurate counting\n\n## Output Schema\nFor object counting tasks, structure results as JSON:\n\n```json\n{\n  \"success\": true,\n  \"video_file\": \"surveillance_001.mp4\",\n  \"model\": \"gemini-2.0-flash-exp\",\n  \"counts\": {\n    \"pedestrians\": 12,\n    \"cyclists\": 3,\n    \"vehicles\": 5\n  },\n  \"notes\": \"Optional observations about the counting process or edge cases\"\n}\n```\n\n### Field Descriptions\n- `success`: Whether the analysis completed successfully\n- `video_file`: Name of the analyzed video file\n- `model`: Gemini model used for the request\n- `counts`: Object counts by category\n- `notes`: Any clarifications or warnings about the count\n\n## Code Examples\n\n### Basic Pedestrian Counting (File API Upload)\n\n```python\nfrom google import genai\nimport os\nimport time\nimport re\n\nclient = genai.Client(api_key=os.getenv(\"GEMINI_API_KEY\"))\n\n# Upload video (File API for >20MB)\nmyfile = client.files.upload(file=\"surveillance.mp4\")\n\n# Wait for processing\nwhile myfile.state.name == \"PROCESSING\":\n    time.sleep(5)\n    myfile = client.files.get(name=myfile.name)\n\nif myfile.state.name == \"FAILED\":\n    raise ValueError(\"Video processing failed\")\n\n# Prompt for counting pedestrians with clear exclusion criteria\nprompt = \"\"\"Count the total number of pedestrians who are WALKING through the scene in this surveillance video.\n\nIMPORTANT RULES:\n- ONLY count people who are walking on foot\n- DO NOT count people riding bicycles\n- DO NOT count people driving cars or other vehicles\n- Count each unique pedestrian only once, even if they appear in multiple frames\n\nProvide your answer as a single integer number representing the total count of pedestrians.\nAnswer with just the number, nothing else.\nYour answer should be enclosed in \u003Canswer> and \u003C\u002Fanswer> tags, such as \u003Canswer>5\u003C\u002Fanswer>.\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Parse the response\nresponse_text = response.text.strip()\nmatch = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response_text)\nif match:\n    count = int(match.group(1))\n    print(f\"Pedestrian count: {count}\")\nelse:\n    print(\"Could not parse count from response\")\n```\n\n### Batch Processing Multiple Videos\n\n```python\nfrom google import genai\nimport os\nimport time\nimport re\n\ndef upload_and_wait(client, file_path: str, max_wait_s: int = 300):\n    \"\"\"Upload video and wait for processing.\"\"\"\n    myfile = client.files.upload(file=file_path)\n    waited = 0\n    \n    while myfile.state.name == \"PROCESSING\" and waited \u003C max_wait_s:\n        time.sleep(5)\n        waited += 5\n        myfile = client.files.get(name=myfile.name)\n    \n    if myfile.state.name == \"FAILED\":\n        raise ValueError(f\"Video processing failed: {myfile.state.name}\")\n    if myfile.state.name == \"PROCESSING\":\n        raise TimeoutError(f\"Processing timeout after {max_wait_s}s\")\n    \n    return myfile\n\nclient = genai.Client(api_key=os.getenv(\"GEMINI_API_KEY\"))\n\n# Process all videos in directory\nvideo_dir = \"\u002Fapp\u002Fvideo\"\nvideo_extensions = {\".mp4\", \".mkv\", \".avi\", \".mov\"}\nresults = {}\n\nfor filename in os.listdir(video_dir):\n    if any(filename.lower().endswith(ext) for ext in video_extensions):\n        video_path = os.path.join(video_dir, filename)\n        \n        print(f\"Processing {filename}...\")\n        \n        # Upload and analyze\n        myfile = upload_and_wait(client, video_path)\n        \n        response = client.models.generate_content(\n            model=\"gemini-2.0-flash-exp\",\n            contents=[\"Count pedestrians walking through the scene. Answer with just the number.\", myfile],\n        )\n        \n        # Extract count\n        count = int(re.search(r'\\d+', response.text).group())\n        results[filename] = count\n        print(f\"  Count: {count}\")\n\nprint(f\"\\nProcessed {len(results)} videos\")\n# Results dictionary can now be used for further processing or saving\n```\n\n### Differentiating Object Types\n\n```python\n# Count different categories separately\nprompt = \"\"\"Analyze this surveillance video and count:\n1. Pedestrians (people walking on foot)\n2. Cyclists (people riding bicycles)\n3. Vehicles (cars, trucks, motorcycles)\n\nRULES:\n- Count each unique individual\u002Fvehicle only once\n- If someone switches from walking to cycling, count them in their primary mode\n- Provide counts as three separate numbers\n\nFormat your answer as:\nPedestrians: \u003Cnumber>\nCyclists: \u003Cnumber>\nVehicles: \u003Cnumber>\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Parse multiple counts\ntext = response.text\npedestrians = int(re.search(r'Pedestrians:\\s*(\\d+)', text).group(1))\ncyclists = int(re.search(r'Cyclists:\\s*(\\d+)', text).group(1))\nvehicles = int(re.search(r'Vehicles:\\s*(\\d+)', text).group(1))\n```\n\n### Using Answer Tags for Reliable Parsing\n\n```python\n# Request structured output with XML-like tags\nprompt = \"\"\"Count the total number of pedestrians walking through the scene.\n\nYou should reason and think step by step. Provide your answer as a single integer.\nYour answer should be enclosed in \u003Canswer> and \u003C\u002Fanswer> tags, such as \u003Canswer>5\u003C\u002Fanswer>.\n\"\"\"\n\nresponse = client.models.generate_content(\n    model=\"gemini-2.0-flash-exp\",\n    contents=[prompt, myfile],\n)\n\n# Robust extraction\nmatch = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response.text)\nif match:\n    count = int(match.group(1))\nelse:\n    # Fallback: try to find any number in response\n    numbers = re.findall(r'\\d+', response.text)\n    count = int(numbers[0]) if numbers else 0\n```\n\n\n## Best Practices\n- **Use the File API** for all surveillance videos (typically >20MB) and always wait for processing to complete.\n- **Be specific in prompts**: Clearly define what to count and what to exclude (e.g., \"walking pedestrians only, not cyclists\").\n- **Use structured output formats**: Request answers in specific formats (like `\u003Canswer>N\u003C\u002Fanswer>`) for reliable parsing.\n- **Ask for reasoning**: Include \"think step by step\" to improve counting accuracy.\n- **Handle edge cases**: Specify rules for partial appearances, people entering\u002Fexiting frame, and mode changes.\n- **Use gemini-2.0-flash-exp or gemini-2.5-flash**: These models provide good balance of speed and accuracy for object counting.\n- **Test with sample videos**: Verify prompt effectiveness on representative samples before batch processing.\n\n## Error Handling\n\n```python\nimport time\n\ndef upload_and_wait(client, file_path: str, max_wait_s: int = 300):\n    \"\"\"Upload video and wait for processing with timeout.\"\"\"\n    myfile = client.files.upload(file=file_path)\n    waited = 0\n\n    while myfile.state.name == \"PROCESSING\" and waited \u003C max_wait_s:\n        time.sleep(5)\n        waited += 5\n        myfile = client.files.get(name=myfile.name)\n\n    if myfile.state.name == \"FAILED\":\n        raise ValueError(f\"Video processing failed: {myfile.state.name}\")\n    if myfile.state.name == \"PROCESSING\":\n        raise TimeoutError(f\"Processing timeout after {max_wait_s}s\")\n\n    return myfile\n\ndef count_with_fallback(client, video_path):\n    \"\"\"Count pedestrians with error handling and fallback.\"\"\"\n    try:\n        myfile = upload_and_wait(client, video_path)\n        \n        prompt = \"\"\"Count pedestrians walking through the scene.\n        Answer with just the number in \u003Canswer>\u003C\u002Fanswer> tags.\"\"\"\n        \n        response = client.models.generate_content(\n            model=\"gemini-2.0-flash-exp\",\n            contents=[prompt, myfile],\n        )\n        \n        # Try structured parsing first\n        match = re.search(r\"\u003Canswer>(\\d+)\u003C\u002Fanswer>\", response.text)\n        if match:\n            return int(match.group(1))\n        \n        # Fallback to any number found\n        numbers = re.findall(r'\\d+', response.text)\n        if numbers:\n            return int(numbers[0])\n        \n        print(f\"Warning: Could not parse count, defaulting to 0\")\n        return 0\n        \n    except Exception as e:\n        print(f\"Error processing video: {e}\")\n        return 0\n```\n\nCommon issues:\n- **Upload processing stuck**: Use timeout logic and fail gracefully after max wait time\n- **Ambiguous responses**: Use structured output tags like `\u003Canswer>\u003C\u002Fanswer>` for reliable parsing\n- **Rate limits**: Add retry logic with exponential backoff for batch processing\n- **Inconsistent counts**: Be very explicit in prompts about counting rules and exclusions\n\n## Limitations\n- Counting accuracy depends on video quality, camera angle, and object size\u002Fdistance\n- Very crowded scenes may have higher counting variance\n- Occlusion (objects blocking each other) can affect accuracy\n- Long videos require longer processing times (typically 5-30 seconds per video)\n- The model may occasionally misclassify similar objects (e.g., motorcyclist as cyclist)\n- For highest accuracy, use clear prompts with explicit inclusion\u002Fexclusion criteria\n\n## Version History\n- **1.0.0** (2026-01-21): Tailored for pedestrian traffic counting with focus on object counting, differentiation, and batch processing\n\n\n## Resources\n\n- [Video API Docs](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fvideo-understanding)\n- [Get API Key](https:\u002F\u002Faistudio.google.com\u002Fapikey)\n- [Pricing](https:\u002F\u002Fai.google.dev\u002Fpricing)\n- [Python SDK Documentation](https:\u002F\u002Fai.google.dev\u002Fgemini-api\u002Fdocs\u002Fquickstart?lang=python)",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks-no-skills\u002Fpedestrian-traffic-counting\u002Fenvironment\u002Fskills\u002Fgemini-count-in-video","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill gemini-count-in-video",{"tool":63,"command":64},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill gemini-count-in-video",{"tool":66,"command":67},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill gemini-count-in-video","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fpedestrian-traffic-counting\u002Fenvironment\u002Fskills\u002Fgemini-count-in-video\u002FSKILL.md",true,[],[72,84,98,121,142,160],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":80,"publishedAt":45},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[77],{"categoryNo":78,"categoryName":79,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000033","数据分析师",[81,82,83],"data reconciliation","reconciliation","data",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":45},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[91,92,93,94,95,96,31,97],"speech","text","speech to text","transcribe video","whisper","model","transcribe",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":105,"publishedAt":45},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[104],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[31,106,107,108,109,110,111,112,113,114,39,115,116,117,118,119,120],"processor","video processor","batch","create","reels","when","parts","segments","process","you","segment","filter","ffmpeg","use","remove",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":128,"publishedAt":45},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[127],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[129,130,131,132,111,115,133,134,135,136,137,113,138,139,31,32,140,141,119],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","start","setup",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":45},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[116,149,31,34,150,151,152,153,111,154,155,113,115,156,157,119,158,159],"segment combiner","prepare","merge","video processing","for","outputs","combine","processing","consolidate","results","list",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":169,"publishedAt":45},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[166],{"categoryNo":167,"categoryName":168,"taxonomyType":25,"taxonomyTypeDesc":26},"01JBSEEDCAT000000000000034","行政与办公人员",[170,171,172,116,111,153,115,173,156,174,175,176,119,152,177,31,178,179,109],"generator","report generator","report","with","statistics","structured","reports","json","compression","generate"]