| name | bangumi-frames |
| version | 0.5.0 |
| description | Extract and organize frames from a Bilibili video (bangumi episode, UP upload, or a local file) into scenery shots and per-character image groups, using anime-specific person detection + CCIP character-identity embeddings. Two modes — cluster everyone, or pull out one (or several) named characters via reference folders. Use when the user wants to collect, extract, or organize anime frames/screenshots by character or by scenery from a Bilibili video. Read-only download for personal viewing/analysis; uploads nothing. |
| license | MIT |
| homepage | https://github.com/Agents365-ai/bangumi-frames |
| compatibility | Requires ffmpeg and (for downloads) yt-dlp on PATH; Python 3.9+ with dghs-imgutils (anime person detection + CCIP). The CCIP step runs on CPU — do NOT set ONNX_MODE=CoreML (CCIP crashes there); person detection is fine on CoreML. Anime / 2.5D-render art only — not for live-action. Optional --clean (subtitle/watermark removal) needs rapidocr-onnxruntime + simple-lama-inpainting. |
| platforms | ["macos","linux"] |
| metadata | {"openclaw":{"requires":{"anyBins":"[Truncated]"},"emoji":"🎬","os":["darwin","linux"],"install":["[Truncated]","[Truncated]","[Truncated]"]},"hermes":{"tags":["bilibili","anime","bangumi","frames","character","ccip","screenshot","video"],"category":"media","requires_tools":["ffmpeg","yt-dlp"],"related_skills":[]},"author":"Agents365-ai","version":"0.5.0"} |
bangumi-frames — Bilibili Anime Frame & Character Organizer
Overview
Give a Bilibili video (a bangumi ep link, a UP-upload BV link/id, or a local
video file); it downloads → extracts scene-change keyframes → splits scenery vs
character frames → organizes the character crops. One pass, two modes:
- no
--ref (cluster mode) — group every character crop by CCIP identity into
characters/char_NN/.
- with
--ref DIR (one-vs-rest mode) — given ONE character's reference folder,
pull every crop in the video that matches it into matched/, filenames prefixed
with distance (closest first) so a tight threshold yields a pure set.
Models are anime-specific (deepghs anime person detection + CCIP character-identity
embeddings) — they do not work on live-action footage.
When to use / when NOT to use
- Use when the user wants to collect/extract/organize anime frames or screenshots
from a Bilibili video — by character, by scenery, or to pull out one specific person.
- Don't use for live-action video (needs an insightface-class face stack instead),
or for generic video editing/trimming/transcoding.
Bundled resources
| Resource | Read it when |
|---|
references/pipeline.md | Tuning a stage — download (--height/--prefer), extract (--scene/--interval/--dedup/--skip), --clean (OCR+LaMa subtitle/watermark removal), classify (--conf/--min-area); feature caching; the CPU/CoreML rule; --redo |
references/modes.md | Choosing/tuning the two modes — mode 1 cluster (--eps/--min-samples) vs mode 2 one-vs-rest (--ref-eps, the distance-band histogram, the compressed-embedding threshold lore); full output layout |
scripts/bangumi_frames.py | The entry point (all stages + both modes) |
scripts/remove_overlay.py |