Loading...
Loading...
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.
npx skill4agent add agents365-ai/365-skills bangumi-framesepBV--refcharacters/char_NN/--ref DIRmatched/| Resource | Read it when |
|---|---|
| Tuning a stage — download ( |
| Choosing/tuning the two modes — mode 1 cluster ( |
| The entry point (all stages + both modes) |
| Standalone subtitle/watermark removal on a frame dir or single image |
ffmpegyt-dlppip install dghs-imgutilscookies.txt--cookies$BILIBILI_COOKIES~/bb_up/bb_cookies/www.bilibili.com_cookies.txtONNX_MODE=CoreML--cleanpip install rapidocr-onnxruntime simple-lama-inpainting--engine pyscenedetectpip install scenedetectSKILL=skills/bangumi-frames/scripts/bangumi_frames.py
# Mode 1 — cluster everyone into char_NN groups
python3 $SKILL https://www.bilibili.com/video/BV15qVm68E2h --out ~/frames
python3 $SKILL ep1231575 --out ~/frames # ep / BV id also accepted
python3 $SKILL ~/local.mp4 --out ~/frames # local file, skips download
# Mode 2 — pull out ONE character (ref folder = ~200 crops of that character)
python3 $SKILL BV15qVm68E2h --ref ~/refs/紫灵 --ref-eps 0.04 --out ~/frames
# Optional: strip burned-in subtitles + watermark before analysis
python3 $SKILL ep1231575 --clean --out ~/framesstdout{"ok", "data", "next", "meta"}{"ok": false, "error"}--formatstderr0123--dry-run--schemareferences/pipeline.md<out>/<id>/ # id = BV id / ep id / local filename
├── frames/ frames.json # keyframes + timestamps
├── scenery/ # frames with no detected character
├── crops/ features.npy # character crops + cached CCIP features
├── detect.json # frame -> person boxes / crops
├── characters/ # MODE 1: char_NN_crop/ + char_NN_full/ (paired), _unsorted/, _montage.png
├── matched/ # MODE 2: 0.012_<crop>.jpg (distance-prefixed) + index.json
├── matched_montage.png # MODE 2 sample montage
└── index.json # MODE 1: char group -> {crop, frame, time}characters/_montage.pngmatched_montage.pngindex.jsonreferences/modes.md