movie-annotation

Extract EEG-relevant visual features from movie frames into Parquet and NPZ files.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/dungscout96/hbn-movie-annotation --skill movie-annotation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: movie-annotation
Source: https://github.com/dungscout96/hbn-movie-annotation/tree/main
Command: npx skills add https://github.com/dungscout96/hbn-movie-annotation --skill movie-annotation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencv-python-headless, numpy, pandas, scipy, torch, torchvision, transformers, Pillow, pyarrow, tqdm, timm, scenedetect, transnetv2-pytorch, ffmpeg.

What problem does it solve?

You need frame-level visual features from movies that map onto EEG-relevant low-level, depth, motion, and semantic information so you can model or analyze how brains respond over time.

Core Features & Use Cases

  • Frame-level EEG-relevant feature extraction: Computes low-level luminance/contrast/color/texture, monocular depth, optical-flow motion and scene-cut flags, and face/object counts and categories.
  • Semantic scene modeling with CLIP: Generates CLIP embeddings plus zero-shot scene category and naturalness/open-vs-enclosed scores for each frame.
  • Reproducible batch pipeline for multiple videos: Runs chunked CPU/GPU inference and writes per-movie outputs for downstream EEG modeling.

Quick Start

Use the skill to annotate all mp4 files in the movies directory by running the project’s main entry point.

Frequently Asked Questions about movie-annotation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract frame-level features from movies for EEG encoding models?

To extract frame-level features for EEG encoding models from movies, you need low-level statistics, depth, motion, and semantic representations mapped to each frame. This pipeline processes MP4 files by running CPU extraction and GPU inference for visual models, outputting per-movie Parquet tables and NPZ files.

What visual features can I compute from video frames for naturalistic stimulus analysis?

For naturalistic video analysis, you can compute low-level luminance, contrast, color, texture, monocular depth, optical-flow motion, scene-cut flags, face counts, and object categories. It also generates CLIP embeddings and zero-shot scene category scores for each frame.

Does this video annotation pipeline require a GPU to run CLIP and DPT inference?

Running CLIP and DPT inference for video annotation requires a GPU, as the pipeline uses batched GPU inference for these models. It also runs deterministic CPU feature extraction for low-level image statistics, combining both to process frame chunks.

What's the best way to batch process multiple MP4 videos for frame-synchronized features?

The best way to batch process multiple MP4 videos for frame-synchronized features is using a reproducible chunked pipeline. This approach iterates through movie frame chunks, applies CPU and GPU inference, and saves per-movie outputs for downstream analysis.

Can I use OpenCV and PyTorch models together to extract depth and object detections from movie frames?

Yes, you can use OpenCV and PyTorch together to extract depth and object detections from movie frames. The pipeline combines OpenCV DNN for face detection with Torchvision DPT for depth and DETR for objects, running them in a batched workflow.

What output formats are generated when extracting EEG-relevant visual features from movies?

Extracting EEG-relevant visual features from movies generates a per-movie Parquet table containing scalar feature columns and an accompanying NPZ file with CLIP frame embeddings. These outputs provide structured data for downstream EEG modeling.