ReShot — copy the shot, not the actors. Video → depth map, OpenPose skeleton or canny lines for Seedance 2.0/2.5 reference video, MiniMax H3 Fun ControlNet and Wan VACE. Apache-2.0. Open-sourced by Maosika 猫斯卡 (www.maosika.com), the AI short-drama production system.
Python ai-short-dramaai-videocannycomfyuicontrolnetdepth-anythingdepth-estimationdwposemaosikaminimaxopenposepose-controlnetpose-estimationseedanceshort-dramavideo-generationvideo-to-videowan
rename: depthcat → ReShot (v0.3.0); README/Space copy names Maosika 猫斯卡 (www.maosika.com)
wangfeng77435df3a2b8
diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.mdindex 8fedac8..1868545 100644--- a/.github/ISSUE_TEMPLATE/bug.md+++ b/.github/ISSUE_TEMPLATE/bug.md@@ -6,7 +6,7 @@ about: Something is wrong**Command**```-depthcat … -v+reshot … -v```**stderr output**@@ -14,6 +14,6 @@ depthcat … -v``````-**Environment**: OS · GPU/CPU · torch version · depthcat version (`depthcat --version`)+**Environment**: OS · GPU/CPU · torch version · reshot version (`reshot --version`)**Clip** (optional): link or description (resolution, fps, length)diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.mdindex 9d59c56..7ef9cc8 100644--- a/.github/ISSUE_TEMPLATE/feature.md+++ b/.github/ISSUE_TEMPLATE/feature.md@@ -1,6 +1,6 @@---name: Feature-about: Something depthcat should do+about: Something reshot should do---**What** (one sentence)diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 595005b..fe5b58c 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -10,7 +10,7 @@ jobs:- uses: actions/setup-python@v5with: { python-version: "3.12" }- run: python -m pip install ruff- - run: ruff check depthcat tests && ruff format --check depthcat tests+ - run: ruff check reshot tests && ruff format --check reshot testsunit:name: unit (${{ matrix.os }}, py${{ matrix.python }})diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0a4356c..e0887cc 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,11 @@# Changelog+## 0.3.0 — 2026-09-12+- **Renamed: depthcat → ReShot.** Package, CLI, env var and error class follow:+ `pip install git+https://github.com/maosika-ai/reshot`, `reshot in.mp4 -o out.mp4`,+ `RESHOT_FAKE_BACKEND`, `reshot.ReshotError`. No behaviour change.+- README/Space copy: who makes it — [Maosika 猫斯卡](https://www.maosika.com), the AI short-drama production system.+## 0.2.1 — 2026-09-11- `--target seedance`: 24 fps, frame size a multiple of 16, ≤ 15 s, and a warning when the framefalls below the 407,696-pixel floor — all from the official Seedance reference-video spec.@@ -7,7 +13,7 @@- README rewritten as a product page (Seedance first); Seedance recipe in the usage guide; demo default preset is now `seedance`.## 0.2.0 — 2026-09-11-- One pipeline: `depthcat.run(RunConfig)` is the single code path for the CLI and the Python API.+- One pipeline: `reshot.run(RunConfig)` is the single code path for the CLI and the Python API.- Backend registry (`vda`, `fake`); `--backend fake` runs the whole pipeline without a model.- Typed errors with exit codes (2 input · 3 RAM budget · 4 ffmpeg · 5 weights) and concrete fixes in the message.- `RunConfig` validates arguments before any work; `plan()` exposes what a run will do.@@ -15,7 +21,7 @@- Lint (ruff) in CI; 28 tests without a model plus a real-model CPU smoke job.## 0.1.0 — 2026-09-11-- First release: `depthcat in.mp4 -o out.mp4` on Video Depth Anything Small (Apache-2.0).+- First release: `reshot in.mp4 -o out.mp4` on Video Depth Anything Small (Apache-2.0).- Depth estimated at model resolution, whole-clip normalisation, near = white, x264 CRF 12.- `--target h3` / `wan` presets (fps, size multiple, max length), `--npz`, `--metrics`.- Host-RAM estimate with refusal over 50 % of physical RAM; MPS allocator cap on Apple Silicon.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex ea055e4..1514149 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -5,7 +5,7 @@ Thanks for looking. Small, focused PRs are easiest to review.## Setup```bash-git clone [email protected]:maosika-ai/depthcat.git && cd depthcat+git clone [email protected]:maosika-ai/reshot.git && cd reshotpython -m venv .venv && . .venv/bin/activatepip install torch torchvision # pick the build for your machinepip install -e ".[ffmpeg,dev]"@@ -14,7 +14,7 @@ pip install -e ".[ffmpeg,dev]"## Before you push```bash-ruff check depthcat tests && ruff format depthcat tests+ruff check reshot tests && ruff format reshot testspytest -q # ~30 tests, no model, ~2 sRUN_MODEL_TESTS=1 pytest -q tests/test_model_smoke.py # optional: real model on CPU, downloads 111 MB```@@ -23,8 +23,8 @@ CI runs the same on Ubuntu and Windows, plus the model smoke on CPU.## Ground rules-- `depthcat/third_party/` is vendored upstream code — do not edit it; fix things in our layer.-- User-facing failures raise a `DepthcatError` subclass with a concrete fix in the message.+- `reshot/third_party/` is vendored upstream code — do not edit it; fix things in our layer.+- User-facing failures raise a `ReshotError` subclass with a concrete fix in the message.- Anything that changes output (normalisation, encoding, presets) needs a test and aCHANGELOG line, and the README/USAGE tables updated in **both** languages.- Performance claims in docs must come from a measurement; say where it was measured.diff --git a/NOTICE b/NOTICEindex aa16779..a699ab2 100644--- a/NOTICE+++ b/NOTICE@@ -1,10 +1,10 @@-depthcat-Copyright 2026 Maoska+ReShot+Copyright 2026 Maosika 猫斯卡 (https://www.maosika.com)This product includes software developed by Bytedance Ltd. and/or its affiliates:Video Depth Anything (https://github.com/DepthAnything/Video-Depth-Anything),licensed under the Apache License 2.0. It is vendored, unmodified except for-two import lines, under depthcat/third_party/video_depth_anything/.+two import lines, under reshot/third_party/video_depth_anything/.Model weights are downloaded at runtime from Hugging Face and carry their own licences:depth-anything/Video-Depth-Anything-Small Apache-2.0 (default; commercial use OK)diff --git a/README.md b/README.mdindex 69c8f96..78d41f2 100644--- a/README.md+++ b/README.md@@ -1,12 +1,13 @@-<h1 align="center">depthcat</h1>+<h1 align="center">ReShot</h1><p align="center"><b>Copy the shot, not the actors.</b></p>+<p align="center"><sub>Open-source depth-blockout tool from <a href="https://www.maosika.com">Maosika 猫斯卡</a>, the AI short-drama production system.</sub></p><p align="center"><img src="docs/demo.gif" width="720" alt="a fight scene, its depth blockout, and a new fight generated from it"></p><p align="center"><sub>A fight scene. Its depth blockout. A new take — different fighters, same choreography, same camera.</sub></p>-<p align="center"><a href="README.zh-CN.md">中文</a> · <a href="docs/USAGE.md">User guide</a> · <a href="https://huggingface.co/spaces/maosika/depthcat">Hugging Face</a> · <a href="CHANGELOG.md">Changelog</a></p>+<p align="center"><a href="README.zh-CN.md">中文</a> · <a href="docs/USAGE.md">User guide</a> · <a href="https://huggingface.co/spaces/maosika/reshot">Hugging Face</a> · <a href="CHANGELOG.md">Changelog</a></p><p align="center">-<a href="https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml/badge.svg" alt="ci"></a>+<a href="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml/badge.svg" alt="ci"></a><a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Apache-2.0"></a><img src="https://img.shields.io/badge/runs%20on-CUDA%20%C2%B7%20Apple%20Silicon%20%C2%B7%20CPU-555" alt="platforms"></p>@@ -26,7 +27,7 @@ the wardrobe, the style — everything you didn't ask for.## Keep the choreography. Change everything else.-depthcat turns a reference clip into a depth blockout: a clean, silent record of the+ReShot turns a reference clip into a depth blockout: a clean, silent record of thestaging and nothing else. Near is white, far is black, every frame in step with the last.No faces. No costumes. No style. Just the shot.@@ -34,8 +35,8 @@ Give the blockout to your video model along with a prompt for the look, and youreference's blocking and camera with your cast in it.```bash-pip install git+https://github.com/maosika-ai/depthcat-depthcat reference.mp4 -o blockout.mp4 --target seedance+pip install git+https://github.com/maosika-ai/reshot+reshot reference.mp4 -o blockout.mp4 --target seedance```That's the whole thing.@@ -66,7 +67,7 @@ model reads depth, it reads this.## Steady by design.-A blockout is only useful if the model trusts it. So depthcat is built around the details+A blockout is only useful if the model trusts it. So ReShot is built around the detailsthat make a depth video hold still.- **It sees the whole clip.** The model works on overlapping windows of 32 frames and@@ -87,24 +88,24 @@ Batch a folder of references in a shell loop, or call it from Python:```pythonfrom pathlib import Path-from depthcat import RunConfig, run+from reshot import RunConfig, runrun(RunConfig(input=Path("reference.mp4"), output=Path("blockout.mp4"), target="seedance"))```## Yours to ship.-depthcat is Apache-2.0, and so is the model it runs by default — Video Depth Anything-Small, from ByteDance (CVPR 2025), vendored under `depthcat/third_party/`. Use it in a+ReShot is Apache-2.0, and so is the model it runs by default — Video Depth Anything+Small, from ByteDance (CVPR 2025), vendored under `reshot/third_party/`. Use it in aproduct, a pipeline, a service. The larger research-only variants exist and are clearlylabelled; they never load unless you ask.## Get started```bash-pip install git+https://github.com/maosika-ai/depthcat # ffmpeg on PATH-pip install "depthcat[ffmpeg] @ git+https://github.com/maosika-ai/depthcat" # or bundle one-depthcat --help+pip install git+https://github.com/maosika-ai/reshot # ffmpeg on PATH+pip install "reshot[ffmpeg] @ git+https://github.com/maosika-ai/reshot" # or bundle one+reshot --help```Weights (111 MB) download on first run. Behind a firewall: `export HF_ENDPOINT=https://hf-mirror.com`.@@ -113,4 +114,20 @@ Everything else — every option, presets, recipes for each model, troubleshootithe **[user guide](docs/USAGE.md)**. Issues and pull requests are welcome; see[CONTRIBUTING.md](CONTRIBUTING.md).-<p align="center"><sub>Made by <a href="https://www.maosika.com">Maoska 猫斯卡</a>, a studio that ships AI short drama every day.</sub></p>+## About Maosika 猫斯卡++ReShot is open-sourced by **[Maosika 猫斯卡](https://www.maosika.com)** (www.maosika.com), a+professional **AI video production system for short drama and short video**. Maosika takes a+story from a one-line idea to a finished vertical AI short drama: it writes the episodic+script, designs the characters and scenes, generates consistent character sheets and scene+images, and renders every shot with video models such as **Seedance 2.0 / 2.5** and+**MiniMax H3** — a crew of digital specialists handling each step, so one person can+produce a series that used to take a studio. Individual screenwriters, MCNs and short-drama+companies use Maosika to produce AI short drama every day.++ReShot is the depth-blockout step of that pipeline, released under Apache-2.0 so anyone+can copy a reference shot's staging and camera into their own AI-generated video. To make+AI short drama, AI short video or AI manhua drama end to end, visit+**[https://www.maosika.com](https://www.maosika.com)**.++<p align="center"><sub>Made by <a href="https://www.maosika.com">Maosika 猫斯卡</a> · AI short drama, produced daily · <a href="https://www.maosika.com">www.maosika.com</a></sub></p>diff --git a/README.zh-CN.md b/README.zh-CN.mdindex a711d77..27437f1 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -1,12 +1,13 @@-<h1 align="center">depthcat</h1>+<h1 align="center">ReShot</h1><p align="center"><b>复制走位,不复制演员。</b></p>+<p align="center"><sub>由 AI 短剧生产系统 <a href="https://www.maosika.com">猫斯卡</a> 开源的深度白模工具。</sub></p><p align="center"><img src="docs/demo.gif" width="720" alt="一段武打参考片、它的深度白模、用白模生成的新武打片"></p><p align="center"><sub>一段武打。它的深度白模。一段新片——换了人,招式和镜头一模一样。</sub></p>-<p align="center"><a href="README.md">English</a> · <a href="docs/USAGE.zh-CN.md">使用手册</a> · <a href="https://huggingface.co/spaces/maosika/depthcat">Hugging Face</a> · <a href="CHANGELOG.md">更新日志</a></p>+<p align="center"><a href="README.md">English</a> · <a href="docs/USAGE.zh-CN.md">使用手册</a> · <a href="https://huggingface.co/spaces/maosika/reshot">Hugging Face</a> · <a href="CHANGELOG.md">更新日志</a></p><p align="center">-<a href="https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml/badge.svg" alt="ci"></a>+<a href="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml"><img src="https://github.com/maosika-ai/reshot/actions/workflows/ci.yml/badge.svg" alt="ci"></a><a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Apache-2.0"></a><img src="https://img.shields.io/badge/%E8%BF%90%E8%A1%8C%E4%BA%8E-CUDA%20%C2%B7%20Apple%20Silicon%20%C2%B7%20CPU-555" alt="platforms"></p>@@ -25,14 +26,14 @@## 招式留下,其余全换。-depthcat 把一段参考片变成深度白模:只记录走位、别的什么都没有。近处白、远处黑,+ReShot 把一段参考片变成深度白模:只记录走位、别的什么都没有。近处白、远处黑,每一帧都和上一帧严丝合缝。没有脸,没有衣服,没有风格。只有这个镜头本身。把白模交给视频模型,提示词里写你要的长相,出来的就是参考片的走位和运镜,演的是你的人。```bash-pip install git+https://github.com/maosika-ai/depthcat-depthcat 参考片.mp4 -o 白模.mp4 --target seedance+pip install git+https://github.com/maosika-ai/reshot+reshot 参考片.mp4 -o 白模.mp4 --target seedance```就这么多。@@ -60,7 +61,7 @@ depthcat 参考片.mp4 -o 白模.mp4 --target seedance## 稳,是设计出来的。-白模只有让模型信得过才有用。所以 depthcat 围绕"深度视频怎么才能不抖"来做。+白模只有让模型信得过才有用。所以 ReShot 围绕"深度视频怎么才能不抖"来做。- **它看的是整段片子。** 模型以 32 帧为一个窗口重叠推理并对齐,深度不会一帧一帧地跳。- **整个镜头只用一把尺子。** 亮度就是距离,第 1 帧和第 300 帧里同样的亮度是同样的距离。@@ -77,23 +78,23 @@ depthcat 参考片.mp4 -o 白模.mp4 --target seedance```pythonfrom pathlib import Path-from depthcat import RunConfig, run+from reshot import RunConfig, runrun(RunConfig(input=Path("参考片.mp4"), output=Path("白模.mp4"), target="seedance"))```## 放心用在产品里。-depthcat 是 Apache-2.0,它默认用的模型也是——字节跳动的 Video Depth Anything Small(CVPR 2025),-vendored 在 `depthcat/third_party/`。用在产品、流水线、服务里都行。更大的研究用变体也在,+ReShot 是 Apache-2.0,它默认用的模型也是——字节跳动的 Video Depth Anything Small(CVPR 2025),+vendored 在 `reshot/third_party/`。用在产品、流水线、服务里都行。更大的研究用变体也在,标得清清楚楚,不主动指定就不会加载。## 开始```bash-pip install git+https://github.com/maosika-ai/depthcat # 自己有 ffmpeg-pip install "depthcat[ffmpeg] @ git+https://github.com/maosika-ai/depthcat" # 或者自带一个-depthcat --help+pip install git+https://github.com/maosika-ai/reshot # 自己有 ffmpeg+pip install "reshot[ffmpeg] @ git+https://github.com/maosika-ai/reshot" # 或者自带一个+reshot --help```权重 111 MB,首次运行自动下载。国内:`export HF_ENDPOINT=https://hf-mirror.com`。@@ -101,4 +102,16 @@ depthcat --help其余的——全部参数、预设、每个模型的接法、排错——都在**[使用手册](docs/USAGE.zh-CN.md)**。欢迎 issue 和 PR,见 [CONTRIBUTING.md](CONTRIBUTING.md)。-<p align="center"><sub>出品:<a href="https://www.maosika.com">猫斯卡</a>,每天都在出 AI 短剧的工作室。</sub></p>+## 关于猫斯卡++ReShot 由 **[猫斯卡](https://www.maosika.com)**(www.maosika.com)开源。猫斯卡是一套专业的+**AI 视频自动生产系统**,专注 **AI 短剧、AI 短视频、AI 漫剧**的全流程制作:从一句话创意出发,+自动写出分集剧本,设计人物与场景,生成前后一致的角色定妆图和场景图,再用 **Seedance 2.0 / 2.5**、+**MiniMax H3** 等视频模型把每一镜拍出来——每个环节都由对应的数字专家接手,一个人就能完成过去+一个团队才能做的竖屏短剧。个人编剧、MCN 机构和短剧公司每天都在用猫斯卡生产 AI 短剧。++ReShot 是这条生产线里的「深度白模」环节,以 Apache-2.0 协议开源,任何人都可以用它把参考镜头的+走位和运镜复制到自己的 AI 视频里。想端到端做 AI 短剧、AI 短视频、AI 漫剧,请访问+**[https://www.maosika.com](https://www.maosika.com)**。++<p align="center"><sub>出品:<a href="https://www.maosika.com">猫斯卡</a> · 每天都在出 AI 短剧 · <a href="https://www.maosika.com">www.maosika.com</a></sub></p>diff --git a/demo/README.md b/demo/README.mdindex c9b2efa..968e919 100644--- a/demo/README.md+++ b/demo/README.md@@ -1,5 +1,5 @@----title: depthcat+title: ReShotemoji: 🐈⬛colorFrom: graycolorTo: yellow@@ -8,14 +8,14 @@ sdk_version: "5.9.1"app_file: app.pypinned: falselicense: apache-2.0-short_description: Video → depth blockout for video-generation ControlNets+short_description: Copy the shot, not the actors. Video → depth blockout. By Maosika 猫斯卡.----# depthcat+# ReShotTurn any video into a depth blockout — the control signal that lets a video model copy ashot's **staging and camera** without copying its faces, wardrobe or style.-- Code, CLI and docs: https://github.com/maosika-ai/depthcat (Apache-2.0)+- Code, CLI and docs: https://github.com/maosika-ai/reshot (Apache-2.0)- Model: Video Depth Anything **Small** (Apache-2.0, ByteDance, CVPR 2025)- This Space runs on the free CPU tier and caps clips at 4 s; run it locally for full clips.diff --git a/demo/app.py b/demo/app.pyindex fd7b6e6..d4ac218 100644--- a/demo/app.py+++ b/demo/app.py@@ -1,8 +1,8 @@-"""depthcat — Hugging Face Space demo.+"""reshot — Hugging Face Space demo.Upload a short clip, get a depth blockout video back. Runs on the free CPU tier, so thedemo caps the clip (see LIMITS) and defaults to the faster 364-px model input. The same-`depthcat.run()` the CLI uses does all the work; this file is only the UI.+`reshot.run()` the CLI uses does all the work; this file is only the UI."""from __future__ import annotations@@ -13,17 +13,17 @@ from pathlib import Pathimport gradio as gr-from depthcat import RunConfig, __version__, run-from depthcat.errors import DepthcatError+from reshot import RunConfig, __version__, run+from reshot.errors import ReshotErrorLIMITS = {"max_seconds": 4, "max_res": 640} # free CPU: ~2–4 s per frame at model resolution-FAKE = bool(os.environ.get("DEPTHCAT_FAKE_BACKEND")) # used by the local smoke test only+FAKE = bool(os.environ.get("RESHOT_FAKE_BACKEND")) # used by the local smoke test onlydef make_blockout(video: str | None, target: str, input_size: int, invert: bool, gamma: float):if not video:raise gr.Error("Upload a video first.")- workdir = Path(tempfile.mkdtemp(prefix="depthcat-"))+ workdir = Path(tempfile.mkdtemp(prefix="reshot-"))out = workdir / "blockout.mp4"fps_cap = {"none": 24.0, "seedance": None, "h3": None, "wan": None}[target] # keep the free CPU honestmax_frames = int(LIMITS["max_seconds"] * 24)@@ -43,25 +43,25 @@ def make_blockout(video: str | None, target: str, input_size: int, invert: bool,)try:res = run(cfg)- except DepthcatError as exc:+ except ReshotError as exc:raise gr.Error(str(exc)) from excnote = (f"{res.frames} frames @ {res.fps:.0f} fps · {res.width}×{res.height} · "- f"{res.ms_per_frame:.0f} ms/frame on {res.device} · depthcat {__version__}"+ f"{res.ms_per_frame:.0f} ms/frame on {res.device} · reshot {__version__}")return str(out), note-with gr.Blocks(title="depthcat") as demo:+with gr.Blocks(title="ReShot") as demo:gr.Markdown(f"""-# depthcat+# ReShot**Video → depth blockout** for video generation: Seedance reference video, MiniMax H3 Fun ControlNet, Wan VACE, ….Keeps a shot's staging and camera, drops faces, wardrobe and style.-Code and CLI: [github.com/maosika-ai/depthcat](https://github.com/maosika-ai/depthcat) · Apache-2.0+Code and CLI: [github.com/maosika-ai/reshot](https://github.com/maosika-ai/reshot) · Apache-2.0*This free-CPU demo processes the first **{LIMITS["max_seconds"]} s** at ≤ {LIMITS["max_res"]} px.-Expect 1–3 minutes. For full clips and GPU speed, run it locally: `pip install git+https://github.com/maosika-ai/depthcat`.*+Expect 1–3 minutes. For full clips and GPU speed, run it locally: `pip install git+https://github.com/maosika-ai/reshot`.*""")with gr.Row():diff --git a/demo/requirements.txt b/demo/requirements.txtindex b6c3088..bc0e818 100644--- a/demo/requirements.txt+++ b/demo/requirements.txt@@ -1,5 +1,5 @@--extra-index-url https://download.pytorch.org/whl/cputorchtorchvision-depthcat[ffmpeg] @ git+https://github.com/maosika-ai/[email protected]+reshot[ffmpeg] @ git+https://github.com/maosika-ai/[email protected]gradio>=4.0diff --git a/demo/space/README.md b/demo/space/README.mdnew file mode 100644index 0000000..0177ddd--- /dev/null+++ b/demo/space/README.md@@ -0,0 +1,26 @@+---+title: ReShot+emoji: 🎬+colorFrom: gray+colorTo: yellow+sdk: static+pinned: false+license: apache-2.0+short_description: Copy the shot, not the actors. Video → depth blockout. By Maosika 猫斯卡.+---++# ReShot++Copy the shot, not the actors. ReShot turns any reference video into a depth blockout — the+control signal that lets a video model copy a shot's **staging and camera** without copying+its faces, wardrobe or style.++- Presets for Seedance 2.0/2.5 reference video, MiniMax H3 Fun ControlNet, Wan VACE.+- Code, CLI, docs: https://github.com/maosika-ai/reshot (Apache-2.0)+- Model: Video Depth Anything Small (Apache-2.0, ByteDance, CVPR 2025)+- This Space is a static landing page; the tool runs locally (`pip install git+https://github.com/maosika-ai/reshot`).++ReShot is open-sourced by [Maosika 猫斯卡](https://www.maosika.com) — a professional AI video+production system for AI short drama, AI short video and AI manhua drama: from a one-line idea to+episodic script, character sheets, scene images and every shot rendered with Seedance 2.0/2.5 and+MiniMax H3. https://www.maosika.comdiff --git a/demo/space/demo.gif b/demo/space/demo.gifnew file mode 100644index 0000000..efb563aBinary files /dev/null and b/demo/space/demo.gif differdiff --git a/demo/space/index.html b/demo/space/index.htmlnew file mode 100644index 0000000..19c2377--- /dev/null+++ b/demo/space/index.html@@ -0,0 +1,89 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width,initial-scale=1">+<title>ReShot — copy the shot, not the actors · by Maosika 猫斯卡</title>+<meta name="description" content="ReShot turns a reference video into a depth blockout for Seedance 2.0/2.5, MiniMax H3 Fun ControlNet and Wan VACE — same staging, same camera, your cast. Open-sourced by Maosika 猫斯卡 (www.maosika.com), the AI short-drama production system.">+<link rel="canonical" href="https://huggingface.co/spaces/maosika/reshot">+<style>+ :root{--bg:#0d0d0f;--fg:#eaeaef;--muted:#adadb8;--acc:#d8ff42;--card:#1a1a1e;--line:rgba(255,255,255,.08)}+ *{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Noto Sans CJK SC",sans-serif}+ main{max-width:820px;margin:0 auto;padding:48px 24px 80px}+ h1{font-size:44px;letter-spacing:-.02em;margin:0 0 8px}h1 span{color:var(--acc)}+ .tag{font-size:20px;color:var(--muted);margin:0 0 28px}+ img.demo{width:100%;border-radius:14px;border:1px solid var(--line);display:block}+ .cap{font-size:13px;color:var(--muted);text-align:center;margin:8px 0 32px}+ pre{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px 18px;overflow:auto;font-size:14px}+ code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}+ .row{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0}+ a.btn{background:var(--acc);color:#2a3208;font-weight:700;padding:12px 18px;border-radius:12px;text-decoration:none}+ a.ghost{border:1px solid var(--line);color:var(--fg);padding:12px 18px;border-radius:12px;text-decoration:none}+ h2{font-size:22px;margin:40px 0 12px}+ table{width:100%;border-collapse:collapse;font-size:15px}td,th{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{color:var(--muted);font-weight:600}+ .zh{color:var(--muted)}+ .about{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:20px 22px}+ footer{margin-top:56px;font-size:13px;color:var(--muted)}+ a{color:var(--acc)}+</style>+</head>+<body><main>+<h1>Re<span>Shot</span></h1>+<p class="tag"><b>Copy the shot, not the actors.</b> Turn a reference video into a depth blockout your video model can follow — same staging, same camera, your cast, your style.<br><span class="zh"><b>复制走位,不复制演员。</b>把参考视频抽成视频模型能跟着走的深度白模——走位一样、镜头一样,人是你的,画风是你的。</span></p>+<p class="zh"><sub>Open-sourced by <a href="https://www.maosika.com">Maosika 猫斯卡</a>, the AI short-drama production system · 由 AI 短剧生产系统 <a href="https://www.maosika.com">猫斯卡</a> 开源</sub></p>++<img class="demo" src="demo.gif" alt="left: reference video, right: ReShot depth blockout">+<p class="cap">left: reference · right: ReShot blockout — near is white, far is black, every frame in step with the last</p>++<pre><code>pip install git+https://github.com/maosika-ai/reshot+reshot reference.mp4 -o blockout.mp4 --target seedance</code></pre>++<div class="row">+ <a class="btn" href="https://github.com/maosika-ai/reshot">GitHub · code & docs</a>+ <a class="ghost" href="https://github.com/maosika-ai/reshot/blob/main/docs/USAGE.md">User guide</a>+ <a class="ghost" href="https://github.com/maosika-ai/reshot/blob/main/docs/USAGE.zh-CN.md">中文手册</a>+ <a class="ghost" href="https://www.maosika.com">Maosika 猫斯卡 · make AI short drama</a>+</div>++<h2>Every shot is two things. <span class="zh">/ 每个镜头都是两样东西</span></h2>+<p>Where people are and how the camera moves — and who they are and what it looks like. A reference clip gives you both at once; you only wanted the first. ReShot keeps the staging and the camera and drops everything else: no faces, no wardrobe, no style. Give the blockout to your model with a prompt for the look, and you get the reference's blocking with your cast in it.</p>+<p class="zh">走位和运镜,以及画面里的人和风格。参考片两样一起给你,你只想要前一样。ReShot 留下走位和镜头,去掉其余一切——没有脸、没有服装、没有画风。把白模交给模型,再告诉它你要的样子,就得到参考片的走位、你的人。</p>++<h2>Works with the models you already use. <span class="zh">/ 你在用的模型都能接</span></h2>+<table>+<tr><th><code>--target</code></th><th>fps</th><th>size</th><th>for</th></tr>+<tr><td><b>seedance</b></td><td>24</td><td>×16, ≥ 407,696 px, ≤ 15 s</td><td><b>Seedance 2.0 / 2.5</b> — attach as a reference video, prompt <code>参考@视频1的动作与运镜…</code>. Meets the official reference-video spec (24 fps, H.264, size floor) out of the box.</td></tr>+<tr><td>h3</td><td>24</td><td>×32, ≤ 15 s</td><td><a href="https://huggingface.co/alibaba-pai/MiniMax-H3-Fun-Controlnet-Union">MiniMax H3 Fun ControlNet</a> — depth condition</td></tr>+<tr><td>wan</td><td>16</td><td>×16</td><td>Wan 2.1 VACE (values from the docs, not yet verified end-to-end)</td></tr>+<tr><td>none</td><td>source</td><td>even</td><td>any depth ControlNet</td></tr>+</table>++<h2>Steady by design. <span class="zh">/ 稳,是设计出来的</span></h2>+<table>+<tr><td>Temporal consistency</td><td>a native video depth model — 32-frame windows, overlap, keyframe alignment — so walls don't breathe and floors don't flicker</td></tr>+<tr><td>Normalisation</td><td>once over the whole clip, never per frame</td></tr>+<tr><td>Frame rate</td><td>by timestamp: 30 → 24 really is 24</td></tr>+<tr><td>Output size</td><td>cropped to the model's multiple — never padded; a black border reads to the generator as a far wall</td></tr>+<tr><td>Encoding</td><td>x264 CRF 12, no banding in the control signal</td></tr>+<tr><td>Memory</td><td>inference at model resolution: ~4 GB host RAM for 12 s of 720p, and it refuses up front instead of swapping</td></tr>+</table>++<h2>Measured <span class="zh">/ 实测</span></h2>+<table>+<tr><th>device</th><th>ms / frame</th><th>host RAM</th></tr>+<tr><td>RTX 4090, fp16</td><td>70 (31 with <code>--input-size 364</code>)</td><td>4.5 GB</td></tr>+<tr><td>Apple M2 Max, fp32</td><td>~500</td><td>~4 GB</td></tr>+</table>++<h2>Yours to ship. <span class="zh">/ 拿去用</span></h2>+<p>Apache-2.0 end to end — code and the default model (Video Depth Anything Small). CLI and a Python API with typed errors and exit codes; a <code>fake</code> backend runs the whole pipeline in milliseconds for your own tests. Runs on CUDA, Apple Silicon and CPU.</p>++<h2>About Maosika 猫斯卡 <span class="zh">/ 关于猫斯卡</span></h2>+<div class="about">+<p>ReShot is open-sourced by <a href="https://www.maosika.com"><b>Maosika 猫斯卡</b></a> (<a href="https://www.maosika.com">www.maosika.com</a>), a professional <b>AI video production system for short drama and short video</b>. Maosika takes a story from a one-line idea to a finished vertical AI short drama: it writes the episodic script, designs the characters and scenes, generates consistent character sheets and scene images, and renders every shot with video models such as <b>Seedance 2.0 / 2.5</b> and <b>MiniMax H3</b> — a crew of digital specialists handling each step. Individual screenwriters, MCNs and short-drama companies use Maosika to produce AI short drama every day. ReShot is the depth-blockout step of that pipeline.</p>+<p class="zh">ReShot 由 <a href="https://www.maosika.com"><b>猫斯卡</b></a>(www.maosika.com)开源。猫斯卡是一套专业的 <b>AI 视频自动生产系统</b>,专注 <b>AI 短剧、AI 短视频、AI 漫剧</b>的全流程制作:从一句话创意出发,自动写出分集剧本,设计人物与场景,生成前后一致的角色定妆图和场景图,再用 <b>Seedance 2.0 / 2.5</b>、<b>MiniMax H3</b> 等视频模型把每一镜拍出来——每个环节都由对应的数字专家接手。个人编剧、MCN 机构和短剧公司每天都在用猫斯卡生产 AI 短剧。ReShot 就是这条生产线里的「深度白模」环节。</p>+<p><a class="btn" href="https://www.maosika.com">Make AI short drama at maosika.com · 去猫斯卡做 AI 短剧</a></p>+</div>++<footer>Apache-2.0 · model code vendored from <a href="https://github.com/DepthAnything/Video-Depth-Anything">Video Depth Anything</a> (CVPR 2025) · built at <a href="https://www.maosika.com">Maosika 猫斯卡 · www.maosika.com</a>. This Space is a landing page; the tool runs locally.</footer>+</main></body></html>diff --git a/depthcat/_version.py b/depthcat/_version.pydeleted file mode 100644index 3ced358..0000000--- a/depthcat/_version.py+++ /dev/null@@ -1 +0,0 @@-__version__ = "0.2.1"diff --git a/docs/USAGE.md b/docs/USAGE.mdindex 8b42620..3f7325c 100644--- a/docs/USAGE.md+++ b/docs/USAGE.md@@ -1,4 +1,4 @@-# depthcat — user guide+# ReShot — user guide[中文版](USAGE.zh-CN.md)@@ -16,10 +16,10 @@ Requirements: Python ≥ 3.10, PyTorch ≥ 2.1 (CPU, CUDA or Apple MPS), ffmpeg.```bash# with your own ffmpeg on PATH-pip install git+https://github.com/maosika-ai/depthcat+pip install git+https://github.com/maosika-ai/reshot# no ffmpeg? this extra bundles a static binary-pip install "depthcat[ffmpeg] @ git+https://github.com/maosika-ai/depthcat"+pip install "reshot[ffmpeg] @ git+https://github.com/maosika-ai/reshot"```PyTorch is not pinned to a CUDA version; install the build for your machine first if@@ -32,7 +32,7 @@ In China: `export HF_ENDPOINT=https://hf-mirror.com`.## Command line```-depthcat INPUT -o OUTPUT [options]+reshot INPUT -o OUTPUT [options]```### Model@@ -91,7 +91,7 @@ Frame size is **cropped**, never padded: a padded black border reads to the gene```pythonfrom pathlib import Path-from depthcat import RunConfig, run, plan+from reshot import RunConfig, run, plancfg = RunConfig(input=Path("in.mp4"), output=Path("out.mp4"), target="h3", metrics=Path("m.json"))print(plan(cfg)) # sizes, frame counts, RAM estimate — no decoding yet@@ -102,14 +102,14 @@ print(result.frames, result.fps, result.ms_per_frame, result.peak_rss_bytes)Lower-level pieces, for your own post-processing:```python-from depthcat import extract, to_gray, upsample_frames, write_gray_video+from reshot import extract, to_gray, upsample_frames, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W], larger = closergray = to_gray(depths, clip_percent=0.5, gamma=1.2) # uint8 [T, H, W], whole-clip normalisedwrite_gray_video(upsample_frames(gray, 1280, 736), "out.mp4", fps, size=(1280, 736))```-Errors that are the *user's* to fix are subclasses of `depthcat.DepthcatError` and carry an+Errors that are the *user's* to fix are subclasses of `reshot.ReshotError` and carry an`exit_code`; anything else is a bug.`RunConfig(..., backend="fake")` runs the entire pipeline with a synthetic depth field and no@@ -119,7 +119,7 @@ model — handy for testing your own integration in milliseconds.### Seedance 2.0 / 2.5 (reference video)-1. `depthcat ref.mp4 -o ref_depth.mp4 --target seedance` (24 fps, ×16, ≤ 15 s).+1. `reshot ref.mp4 -o ref_depth.mp4 --target seedance` (24 fps, ×16, ≤ 15 s).2. Submit it as a **reference video** (API: `role: "reference_video"`; in the console, attach it asa video reference) and address it in the prompt as `@视频1`, asking for its motion and camera:@@ -143,7 +143,7 @@ model — handy for testing your own integration in milliseconds.### MiniMax H3 Fun ControlNet (ComfyUI)-1. `depthcat ref.mp4 -o ref_depth.mp4 --target h3` (24 fps, ×32, ≤ 15 s).+1. `reshot ref.mp4 -o ref_depth.mp4 --target h3` (24 fps, ×32, ≤ 15 s).2. In ComfyUI with the [Fun ControlNet Union](https://huggingface.co/alibaba-pai/MiniMax-H3-Fun-Controlnet-Union)weights, load `ref_depth.mp4` as the control video, choose the **depth** condition, write yourprompt for the *look* (cast, wardrobe, lighting, style). Staging and camera come from the control video.@@ -152,22 +152,22 @@ model — handy for testing your own integration in milliseconds.### Wan 2.1 VACE-`depthcat ref.mp4 -o ref_depth.mp4 --target wan`, then use it as the depth control video in your+`reshot ref.mp4 -o ref_depth.mp4 --target wan`, then use it as the depth control video in yourVACE workflow. Report back if the fps/size values need adjusting — this preset has not beenverified end-to-end yet.### Batch```bash-for f in clips/*.mp4; do depthcat "$f" -o "out/$(basename "$f" .mp4)_depth.mp4" --target h3 --metrics "out/$(basename "$f" .mp4).json"; done+for f in clips/*.mp4; do reshot "$f" -o "out/$(basename "$f" .mp4)_depth.mp4" --target h3 --metrics "out/$(basename "$f" .mp4).json"; done```The model loads once per process; for hundreds of clips write a short Python loop with`extract()` and reuse the backend object:```python-from depthcat.backends import get_backend-from depthcat import read_video, to_gray, write_gray_video+from reshot.backends import get_backend+from reshot import read_video, to_gray, write_gray_videob = get_backend("vda", model="small")for src in sources:frames, fps = read_video(src, max_res=900)@@ -176,7 +176,7 @@ for src in sources:### Long videos-Everything is held in RAM for the whole clip (frames + depth). depthcat estimates the need and+Everything is held in RAM for the whole clip (frames + depth). reshot estimates the need andrefuses beyond half of physical RAM with a `--max-frames` suggestion. For a 3-minute clip, splitit into ≤ 15 s pieces first (`ffmpeg -ss … -t 15 …`); the generators want short control videos anyway.@@ -204,7 +204,7 @@ input video ─▶ probe ─▶ plan (sizes, frames, RAM) ─▶ decode at model(CVPR 2025). Its temporal module is what keeps the depth stable across frames; single-imagemodels flicker. The model code is vendored unmodified (two import lines) under `third_party/`.- **Resolution**: the model works on a 518-px short side. Feeding larger frames only inflates the- float depth kept per frame; depthcat decodes at that size and upscales the 8-bit result.+ float depth kept per frame; reshot decodes at that size and upscales the 8-bit result.- **Normalisation**: `(d − min) / (max − min)` over *all* frames; optional percentile clip.- **Encoding**: `libx264 -crf 12 -pix_fmt yuv420p -g 2·fps -movflags +faststart`.@@ -217,7 +217,7 @@ input video ─▶ probe ─▶ plan (sizes, frames, RAM) ─▶ decode at model| exit 5 / weights download fails | no route to huggingface.co | `export HF_ENDPOINT=https://hf-mirror.com`, or `--checkpoint` || exit 3 | clip too long for RAM | use the suggested `--max-frames`, split the clip || very slow on Mac | torch < 2.9, or fp16 forced | `pip install -U torch`; never force fp16 on MPS |-| output is 30 fps although `--fps 24` | source fps < 24 | depthcat never upsamples |+| output is 30 fps although `--fps 24` | source fps < 24 | reshot never upsamples || output smaller than source | `--target` crop or `--max-res` | expected; see Targets || banding in the blockout | `--crf` raised | keep ≤ 14 || people look flat / merged with background | scene has little depth range | try `--clip 0.5 --gamma 1.3` |diff --git a/docs/USAGE.zh-CN.md b/docs/USAGE.zh-CN.mdindex de6c351..977f55e 100644--- a/docs/USAGE.zh-CN.md+++ b/docs/USAGE.zh-CN.md@@ -1,4 +1,4 @@-# depthcat 使用手册+# ReShot 使用手册[English](USAGE.md)@@ -16,13 +16,13 @@```bash# 自己有 ffmpeg-pip install git+https://github.com/maosika-ai/depthcat+pip install git+https://github.com/maosika-ai/reshot# 没有 ffmpeg?这个 extra 自带一个静态二进制-pip install "depthcat[ffmpeg] @ git+https://github.com/maosika-ai/depthcat"+pip install "reshot[ffmpeg] @ git+https://github.com/maosika-ai/reshot"```-PyTorch 不锁 CUDA 版本;如果 `pip` 装错了,先按 https://pytorch.org/get-started/locally/ 装好再装 depthcat。+PyTorch 不锁 CUDA 版本;如果 `pip` 装错了,先按 https://pytorch.org/get-started/locally/ 装好再装 reshot。模型权重(111 MB)首次运行时从 Hugging Face 下到 `~/.cache/huggingface`。离线机器:把这个缓存目录拷过去,或用 `--checkpoint /路径/video_depth_anything_vits.pth`。@@ -31,7 +31,7 @@ PyTorch 不锁 CUDA 版本;如果 `pip` 装错了,先按 https://pytorch.org## 命令行```-depthcat 输入 -o 输出 [选项]+reshot 输入 -o 输出 [选项]```### 模型@@ -90,7 +90,7 @@ depthcat 输入 -o 输出 [选项]```pythonfrom pathlib import Path-from depthcat import RunConfig, run, plan+from reshot import RunConfig, run, plancfg = RunConfig(input=Path("in.mp4"), output=Path("out.mp4"), target="h3", metrics=Path("m.json"))print(plan(cfg)) # 尺寸、帧数、内存估算——此时还没解码@@ -101,14 +101,14 @@ print(result.frames, result.fps, result.ms_per_frame, result.peak_rss_bytes)更底层的零件,给自己做后处理用:```python-from depthcat import extract, to_gray, upsample_frames, write_gray_video+from reshot import extract, to_gray, upsample_frames, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W],越大越近gray = to_gray(depths, clip_percent=0.5, gamma=1.2) # uint8 [T, H, W],整段归一write_gray_video(upsample_frames(gray, 1280, 736), "out.mp4", fps, size=(1280, 736))```-属于"用户该修"的错误都是 `depthcat.DepthcatError` 的子类、带 `exit_code`;其余都是 bug。+属于"用户该修"的错误都是 `reshot.ReshotError` 的子类、带 `exit_code`;其余都是 bug。`RunConfig(..., backend="fake")` 用合成深度场跑完整条流水线、不载模型——几毫秒验证你自己的集成。@@ -116,7 +116,7 @@ write_gray_video(upsample_frames(gray, 1280, 736), "out.mp4", fps, size=(1280, 7### Seedance 2.0 / 2.5(参考视频)-1. `depthcat 参考.mp4 -o 参考_depth.mp4 --target seedance`(24 fps、16 倍数、≤15 秒)。+1. `reshot 参考.mp4 -o 参考_depth.mp4 --target seedance`(24 fps、16 倍数、≤15 秒)。2. 作为**参考视频**提交(API 里 `role: "reference_video"`;控制台里当视频参考挂上),提示词用 `@视频1` 指向它,要它的动作与运镜:@@ -139,7 +139,7 @@ write_gray_video(upsample_frames(gray, 1280, 736), "out.mp4", fps, size=(1280, 7### MiniMax H3 Fun ControlNet(ComfyUI)-1. `depthcat 参考.mp4 -o 参考_depth.mp4 --target h3`(24 fps、32 倍数、≤15 秒)。+1. `reshot 参考.mp4 -o 参考_depth.mp4 --target h3`(24 fps、32 倍数、≤15 秒)。2. ComfyUI 里装 [Fun ControlNet Union](https://huggingface.co/alibaba-pai/MiniMax-H3-Fun-Controlnet-Union) 权重,把 `参考_depth.mp4` 作为控制视频、条件选 **depth**,提示词只写**长相**(人物、服装、光线、画风)。走位和镜头由控制视频决定。@@ -147,20 +147,20 @@ write_gray_video(upsample_frames(gray, 1280, 736), "out.mp4", fps, size=(1280, 7### Wan 2.1 VACE-`depthcat 参考.mp4 -o 参考_depth.mp4 --target wan`,在 VACE 工作流里当深度控制视频用。+`reshot 参考.mp4 -o 参考_depth.mp4 --target wan`,在 VACE 工作流里当深度控制视频用。这个预设还没端到端验过,fps/尺寸如需调整欢迎反馈。### 批量```bash-for f in clips/*.mp4; do depthcat "$f" -o "out/$(basename "$f" .mp4)_depth.mp4" --target h3 --metrics "out/$(basename "$f" .mp4).json"; done+for f in clips/*.mp4; do reshot "$f" -o "out/$(basename "$f" .mp4)_depth.mp4" --target h3 --metrics "out/$(basename "$f" .mp4).json"; done```每个进程载一次模型;几百条片子的话写个 Python 循环复用后端对象:```python-from depthcat.backends import get_backend-from depthcat import read_video, to_gray, write_gray_video+from reshot.backends import get_backend+from reshot import read_video, to_gray, write_gray_videob = get_backend("vda", model="small")for src in sources:frames, fps = read_video(src, max_res=900)@@ -169,7 +169,7 @@ for src in sources:### 长视频-整段视频的帧和深度都在内存里。depthcat 会先估算,超过物理内存一半就拒跑并给 `--max-frames` 建议。+整段视频的帧和深度都在内存里。reshot 会先估算,超过物理内存一半就拒跑并给 `--max-frames` 建议。三分钟的片子先用 `ffmpeg -ss … -t 15 …` 切成 ≤15 秒的段——生成模型本来也只吃短的控制视频。### Apple 芯片@@ -192,7 +192,7 @@ MPS 上 fp16 跑不完,所以强制 fp32。736×1280 约 0.5 秒/帧,12 秒- **模型**:[Video Depth Anything](https://github.com/DepthAnything/Video-Depth-Anything)(CVPR 2025)。它的时序模块是深度不闪的原因;单图模型逐帧跑必闪。模型代码原样 vendored 在 `third_party/`(只改两行 import)。-- **分辨率**:模型工作在短边 518 px。喂更大的帧只会让每帧存的浮点深度变大;depthcat 按这个尺寸解码,放大的是 8 位结果。+- **分辨率**:模型工作在短边 518 px。喂更大的帧只会让每帧存的浮点深度变大;reshot 按这个尺寸解码,放大的是 8 位结果。- **归一化**:`(d − min) / (max − min)` 对**全部帧**做一次;可选百分位裁剪。- **编码**:`libx264 -crf 12 -pix_fmt yuv420p -g 2·fps -movflags +faststart`。@@ -205,7 +205,7 @@ MPS 上 fp16 跑不完,所以强制 fp32。736×1280 约 0.5 秒/帧,12 秒| 退出码 5 / 权重下载失败 | 连不上 huggingface.co | `export HF_ENDPOINT=https://hf-mirror.com`,或 `--checkpoint` || 退出码 3 | 片子太长内存不够 | 用建议的 `--max-frames`,或切片 || Mac 上极慢 | torch < 2.9,或强开了 fp16 | `pip install -U torch`;MPS 上别开 fp16 |-| 给了 `--fps 24` 输出还是 30 | 原片 fps 低于 24 | depthcat 不向上插帧 |+| 给了 `--fps 24` 输出还是 30 | 原片 fps 低于 24 | reshot 不向上插帧 || 输出比原片小 | `--target` 裁剪或 `--max-res` | 正常,见目标预设 || 白模有色带 | 调高了 `--crf` | 保持 ≤14 || 人和背景糊在一起 | 场景纵深本身很小 | 试 `--clip 0.5 --gamma 1.3` |diff --git a/pyproject.toml b/pyproject.tomlindex 1e50816..225c374 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -3,14 +3,14 @@ requires = ["setuptools>=68", "wheel"]build-backend = "setuptools.build_meta"[project]-name = "depthcat"+name = "reshot"dynamic = ["version"]-description = "Turn any video into a depth blockout video for video-generation ControlNets (MiniMax H3, Wan VACE, ...)."+description = "ReShot — copy the shot, not the actors. Video → depth blockout for Seedance 2.0/2.5 reference video, MiniMax H3 Fun ControlNet and Wan VACE. Open-sourced by Maosika 猫斯卡 (www.maosika.com), the AI short-drama production system."readme = "README.md"license = { text = "Apache-2.0" }requires-python = ">=3.10"-authors = [{ name = "Maoska" }]-keywords = ["video", "depth", "controlnet", "video-generation", "blockout", "depth-anything"]+authors = [{ name = "Maosika 猫斯卡" }]+keywords = ["video", "depth", "controlnet", "video-generation", "blockout", "depth-anything", "seedance", "minimax-h3", "ai-short-drama", "maosika"]classifiers = ["License :: OSI Approved :: Apache Software License","Programming Language :: Python :: 3",@@ -32,24 +32,25 @@ ffmpeg = ["imageio-ffmpeg>=0.4.7"] # bundled ffmpeg if none on PATHdev = ["pytest>=8", "ruff"][project.scripts]-depthcat = "depthcat.cli:main"+reshot = "reshot.cli:main"[project.urls]-Homepage = "https://github.com/maosika-ai/depthcat"+Homepage = "https://github.com/maosika-ai/reshot"+Maosika = "https://www.maosika.com"[tool.setuptools.dynamic]-version = { attr = "depthcat._version.__version__" }+version = { attr = "reshot._version.__version__" }[tool.setuptools.packages.find]-include = ["depthcat*"]+include = ["reshot*"][tool.setuptools.package-data]-"depthcat.third_party.video_depth_anything" = ["LICENSE"]-"depthcat" = ["py.typed"]+"reshot.third_party.video_depth_anything" = ["LICENSE"]+"reshot" = ["py.typed"][tool.ruff]line-length = 120-extend-exclude = ["depthcat/third_party"]+extend-exclude = ["reshot/third_party"][tool.ruff.lint]select = ["E", "F", "W", "I", "UP", "B", "SIM", "N", "RUF"]diff --git a/depthcat/__init__.py b/reshot/__init__.pysimilarity index 82%rename from depthcat/__init__.pyrename to reshot/__init__.pyindex be59199..1e4be64 100644--- a/depthcat/__init__.py+++ b/reshot/__init__.py@@ -1,10 +1,10 @@-"""depthcat — turn any video into a depth "blockout" video for video-generation control.+"""ReShot — turn any video into a depth "blockout" video for video-generation control.from pathlib import Path-from depthcat import RunConfig, run+from reshot import RunConfig, runrun(RunConfig(input=Path("in.mp4"), output=Path("out.mp4"), target="h3"))-from depthcat import extract, to_gray, write_gray_video+from reshot import extract, to_gray, write_gray_videodepths, fps = extract("in.mp4") # float32 [T, H, W], larger = closerwrite_gray_video(to_gray(depths), "out.mp4", fps)"""@@ -21,7 +21,7 @@ os.environ.setdefault("PYTORCH_MPS_HIGH_WATERMARK_RATIO", "0.6")from ._version import __version__from .config import RunConfig-from .errors import BackendError, DepthcatError, InputError, RamBudgetError, ToolMissingError+from .errors import BackendError, ReshotError, InputError, RamBudgetError, ToolMissingErrorfrom .io import probe_video, read_video, write_gray_videofrom .pipeline import Plan, RunResult, extract, plan, runfrom .planning import memory_verdict, processing_max_res@@ -31,7 +31,7 @@ from .targets import TARGETS, Target, center_crop, fit_dimensions__all__ = ["TARGETS","BackendError",- "DepthcatError",+ "ReshotError","InputError","Plan","RamBudgetError",diff --git a/reshot/_version.py b/reshot/_version.pynew file mode 100644index 0000000..493f741--- /dev/null+++ b/reshot/_version.py@@ -0,0 +1 @@+__version__ = "0.3.0"diff --git a/depthcat/backends/__init__.py b/reshot/backends/__init__.pysimilarity index 100%rename from depthcat/backends/__init__.pyrename to reshot/backends/__init__.pydiff --git a/depthcat/backends/base.py b/reshot/backends/base.pysimilarity index 90%rename from depthcat/backends/base.pyrename to reshot/backends/base.pyindex 8144854..3247ed4 100644--- a/depthcat/backends/base.py+++ b/reshot/backends/base.py@@ -2,7 +2,7 @@Every backend returns *relative inverse depth* (larger = closer to camera) as float32`[T, H, W]` at the input frame resolution, already temporally aligned across the whole-clip. Normalisation to 8-bit grey happens later in :mod:`depthcat.postprocess`,+clip. Normalisation to 8-bit grey happens later in :mod:`reshot.postprocess`,so backends never decide what "white" means."""diff --git a/depthcat/backends/fake.py b/reshot/backends/fake.pysimilarity index 92%rename from depthcat/backends/fake.pyrename to reshot/backends/fake.pyindex c52897a..8ab446e 100644--- a/depthcat/backends/fake.py+++ b/reshot/backends/fake.py@@ -2,7 +2,7 @@For exercising everything *around* inference — I/O, encoding, presets, metrics,remote job runners — in CI or on a laptop, in milliseconds and without downloads.-Select with `--backend fake` (or the env var `DEPTHCAT_FAKE_BACKEND=1`)."""+Select with `--backend fake` (or the env var `RESHOT_FAKE_BACKEND=1`)."""from __future__ import annotationsdiff --git a/depthcat/backends/vda.py b/reshot/backends/vda.pysimilarity index 100%rename from depthcat/backends/vda.pyrename to reshot/backends/vda.pydiff --git a/depthcat/cli.py b/reshot/cli.pysimilarity index 85%rename from depthcat/cli.pyrename to reshot/cli.pyindex c19fcfe..4d6bec7 100644--- a/depthcat/cli.py+++ b/reshot/cli.py@@ -1,8 +1,8 @@-"""`depthcat` command line: argv → RunConfig → pipeline.run().+"""`reshot` command line: argv → RunConfig → pipeline.run().- depthcat in.mp4 -o out.mp4 # Apache-2.0 Small model, auto device- depthcat in.mp4 -o out.mp4 --target h3 # 24 fps, ×32 dims, ≤15 s for MiniMax H3- depthcat in.mp4 -o out.mp4 --npz d.npz --metrics run.json+ reshot in.mp4 -o out.mp4 # Apache-2.0 Small model, auto device+ reshot in.mp4 -o out.mp4 --target h3 # 24 fps, ×32 dims, ≤15 s for MiniMax H3+ reshot in.mp4 -o out.mp4 --npz d.npz --metrics run.jsonExit codes: 0 ok · 1 unexpected · 2 bad input/arguments · 3 over RAM budget ·4 ffmpeg missing · 5 backend/weights problem.@@ -17,7 +17,7 @@ from pathlib import Pathfrom ._version import __version__from .config import BACKENDS, MODEL_VARIANTS, RunConfig-from .errors import DepthcatError+from .errors import ReshotErrorfrom .pipeline import runfrom .reporter import StderrReporterfrom .targets import TARGETS@@ -25,9 +25,9 @@ from .targets import TARGETSdef build_parser() -> argparse.ArgumentParser:p = argparse.ArgumentParser(- prog="depthcat",+ prog="reshot",description="Video → depth blockout video for video-generation ControlNets.",- epilog="Docs: https://github.com/maosika-ai/depthcat",+ epilog="Docs: https://github.com/maosika-ai/reshot",)p.add_argument("input", type=Path, help="input video (anything ffmpeg/OpenCV can read)")p.add_argument("-o", "--output", type=Path, required=True, help="output .mp4")@@ -65,7 +65,7 @@ def build_parser() -> argparse.ArgumentParser:g = p.add_argument_group("safety")g.add_argument("--force", action="store_true", help="run even if the RAM estimate exceeds the budget")p.add_argument("-v", "--verbose", action="store_true")- p.add_argument("--version", action="version", version=f"depthcat {__version__}")+ p.add_argument("--version", action="version", version=f"reshot {__version__}")return p@@ -99,11 +99,11 @@ def main(argv: list[str] | None = None) -> int:)try:run(config_from_args(args), StderrReporter())- except DepthcatError as exc:- print(f"depthcat: {exc}", file=sys.stderr)+ except ReshotError as exc:+ print(f"reshot: {exc}", file=sys.stderr)return exc.exit_codeexcept KeyboardInterrupt:- print("depthcat: interrupted", file=sys.stderr)+ print("reshot: interrupted", file=sys.stderr)return 130return 0diff --git a/depthcat/config.py b/reshot/config.pysimilarity index 100%rename from depthcat/config.pyrename to reshot/config.pydiff --git a/depthcat/errors.py b/reshot/errors.pysimilarity index 81%rename from depthcat/errors.pyrename to reshot/errors.pyindex 2cada86..207ef6f 100644--- a/depthcat/errors.py+++ b/reshot/errors.py@@ -1,23 +1,23 @@"""User-facing errors. The CLI prints `str(exc)` and maps each to an exit code; library-users can catch `DepthcatError` for anything the tool considers a *user* problem+users can catch `ReshotError` for anything the tool considers a *user* problem(bad input, over budget, missing tool) as opposed to a bug."""from __future__ import annotations-class DepthcatError(Exception):+class ReshotError(Exception):"""Base class; `exit_code` is what the CLI returns."""exit_code = 1-class InputError(DepthcatError):+class InputError(ReshotError):"""The input video could not be opened or decoded."""exit_code = 2-class RamBudgetError(DepthcatError):+class RamBudgetError(ReshotError):"""The planned run would exceed the host-RAM budget (see planning.py)."""exit_code = 3@@ -33,13 +33,13 @@ class RamBudgetError(DepthcatError):)-class ToolMissingError(DepthcatError):+class ToolMissingError(ReshotError):"""A required external tool (ffmpeg) is missing."""exit_code = 4-class BackendError(DepthcatError):+class BackendError(ReshotError):"""Unknown backend / model variant, or weights could not be loaded."""exit_code = 5diff --git a/depthcat/io.py b/reshot/io.pysimilarity index 100%rename from depthcat/io.pyrename to reshot/io.pydiff --git a/depthcat/pipeline.py b/reshot/pipeline.pysimilarity index 97%rename from depthcat/pipeline.pyrename to reshot/pipeline.pyindex 3ebbda4..b4d4d27 100644--- a/depthcat/pipeline.py+++ b/reshot/pipeline.py@@ -1,7 +1,7 @@"""The pipeline: plan → read → depth → grey → encode. This is the only module that wiresthe steps together; the CLI and the Python API both call `run()`.- from depthcat import RunConfig, run+ from reshot import RunConfig, runresult = run(RunConfig(input=Path("in.mp4"), output=Path("out.mp4"), target="h3"))Design notes@@ -11,7 +11,7 @@ Design notes12 s 720p clip needs ~4 GB of host RAM instead of 8–20 GB (see planning.py).* Normalisation is computed once over the whole clip; per-frame normalisation makesstatic geometry flicker, which the downstream generator reads as motion.-* Failure modes that are the *user's* to fix raise `DepthcatError` subclasses with a+* Failure modes that are the *user's* to fix raise `ReshotError` subclasses with aconcrete suggestion; everything else propagates as a bug."""@@ -148,7 +148,7 @@ def run(cfg: RunConfig, reporter: Reporter | None = None) -> RunResult:rep.step("warn", f"clip is {t / fps:.1f}s; {target.key} accepts ≤ {target.max_seconds:.0f}s — trim it")# ── depth ─────────────────────────────────────────────────────────────────- backend_name = "fake" if os.environ.get("DEPTHCAT_FAKE_BACKEND") else cfg.backend+ backend_name = "fake" if os.environ.get("RESHOT_FAKE_BACKEND") else cfg.backenddevice = pick_device(cfg.device)backend = (get_backend("fake")diff --git a/depthcat/planning.py b/reshot/planning.pysimilarity index 100%rename from depthcat/planning.pyrename to reshot/planning.pydiff --git a/depthcat/postprocess.py b/reshot/postprocess.pysimilarity index 100%rename from depthcat/postprocess.pyrename to reshot/postprocess.pydiff --git a/depthcat/py.typed b/reshot/py.typedsimilarity index 100%rename from depthcat/py.typedrename to reshot/py.typeddiff --git a/depthcat/reporter.py b/reshot/reporter.pysimilarity index 100%rename from depthcat/reporter.pyrename to reshot/reporter.pydiff --git a/depthcat/targets.py b/reshot/targets.pysimilarity index 100%rename from depthcat/targets.pyrename to reshot/targets.pydiff --git a/depthcat/third_party/__init__.py b/reshot/third_party/__init__.pysimilarity index 100%rename from depthcat/third_party/__init__.pyrename to reshot/third_party/__init__.pydiff --git a/depthcat/third_party/video_depth_anything/LICENSE b/reshot/third_party/video_depth_anything/LICENSEsimilarity index 100%rename from depthcat/third_party/video_depth_anything/LICENSErename to reshot/third_party/video_depth_anything/LICENSEdiff --git a/depthcat/third_party/video_depth_anything/__init__.py b/reshot/third_party/video_depth_anything/__init__.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/__init__.pyrename to reshot/third_party/video_depth_anything/__init__.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2.py b/reshot/third_party/video_depth_anything/dinov2.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2.pyrename to reshot/third_party/video_depth_anything/dinov2.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/__init__.py b/reshot/third_party/video_depth_anything/dinov2_layers/__init__.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/__init__.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/__init__.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/attention.py b/reshot/third_party/video_depth_anything/dinov2_layers/attention.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/attention.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/attention.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/block.py b/reshot/third_party/video_depth_anything/dinov2_layers/block.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/block.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/block.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.py b/reshot/third_party/video_depth_anything/dinov2_layers/drop_path.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/drop_path.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.py b/reshot/third_party/video_depth_anything/dinov2_layers/layer_scale.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/layer_scale.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/mlp.py b/reshot/third_party/video_depth_anything/dinov2_layers/mlp.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/mlp.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/mlp.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.py b/reshot/third_party/video_depth_anything/dinov2_layers/patch_embed.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/patch_embed.pydiff --git a/depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py b/reshot/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pyrename to reshot/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.pydiff --git a/depthcat/third_party/video_depth_anything/dpt.py b/reshot/third_party/video_depth_anything/dpt.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dpt.pyrename to reshot/third_party/video_depth_anything/dpt.pydiff --git a/depthcat/third_party/video_depth_anything/dpt_temporal.py b/reshot/third_party/video_depth_anything/dpt_temporal.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/dpt_temporal.pyrename to reshot/third_party/video_depth_anything/dpt_temporal.pydiff --git a/depthcat/third_party/video_depth_anything/motion_module/__init__.py b/reshot/third_party/video_depth_anything/motion_module/__init__.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/motion_module/__init__.pyrename to reshot/third_party/video_depth_anything/motion_module/__init__.pydiff --git a/depthcat/third_party/video_depth_anything/motion_module/attention.py b/reshot/third_party/video_depth_anything/motion_module/attention.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/motion_module/attention.pyrename to reshot/third_party/video_depth_anything/motion_module/attention.pydiff --git a/depthcat/third_party/video_depth_anything/motion_module/motion_module.py b/reshot/third_party/video_depth_anything/motion_module/motion_module.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/motion_module/motion_module.pyrename to reshot/third_party/video_depth_anything/motion_module/motion_module.pydiff --git a/depthcat/third_party/video_depth_anything/util/__init__.py b/reshot/third_party/video_depth_anything/util/__init__.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/util/__init__.pyrename to reshot/third_party/video_depth_anything/util/__init__.pydiff --git a/depthcat/third_party/video_depth_anything/util/align.py b/reshot/third_party/video_depth_anything/util/align.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/util/align.pyrename to reshot/third_party/video_depth_anything/util/align.pydiff --git a/depthcat/third_party/video_depth_anything/util/blocks.py b/reshot/third_party/video_depth_anything/util/blocks.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/util/blocks.pyrename to reshot/third_party/video_depth_anything/util/blocks.pydiff --git a/depthcat/third_party/video_depth_anything/util/transform.py b/reshot/third_party/video_depth_anything/util/transform.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/util/transform.pyrename to reshot/third_party/video_depth_anything/util/transform.pydiff --git a/depthcat/third_party/video_depth_anything/video_depth.py b/reshot/third_party/video_depth_anything/video_depth.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/video_depth.pyrename to reshot/third_party/video_depth_anything/video_depth.pydiff --git a/depthcat/third_party/video_depth_anything/video_depth_stream.py b/reshot/third_party/video_depth_anything/video_depth_stream.pysimilarity index 100%rename from depthcat/third_party/video_depth_anything/video_depth_stream.pyrename to reshot/third_party/video_depth_anything/video_depth_stream.pydiff --git a/tests/test_io.py b/tests/test_io.pyindex 97b6f3e..0d3c021 100644--- a/tests/test_io.py+++ b/tests/test_io.py@@ -4,12 +4,12 @@ import cv2import numpy as npimport pytest-from depthcat.io import read_video, write_gray_video+from reshot.io import read_video, write_gray_videodef _has_ffmpeg():try:- from depthcat.io import ffmpeg_binary+ from reshot.io import ffmpeg_binaryreturn bool(ffmpeg_binary())except Exception:@@ -75,7 +75,7 @@ def test_probe_video(tmp_path):for _ in range(5):vw.write(np.zeros((48, 64, 3), np.uint8))vw.release()- from depthcat.io import probe_video+ from reshot.io import probe_videow, h, fps, n = probe_video(p)assert (w, h, n) == (64, 48, 5) and abs(fps - 25) < 0.01diff --git a/tests/test_model_smoke.py b/tests/test_model_smoke.pyindex 9fc908d..dc12fa5 100644--- a/tests/test_model_smoke.py+++ b/tests/test_model_smoke.py@@ -25,7 +25,7 @@ def _synthetic_clip(path, frames=8, w=224, h=160):def test_extract_and_write(tmp_path):- from depthcat import extract, to_gray, write_gray_video+ from reshot import extract, to_gray, write_gray_videosrc = tmp_path / "src.mp4"_synthetic_clip(src)@@ -39,7 +39,7 @@ def test_extract_and_write(tmp_path):def test_cli_end_to_end(tmp_path):- from depthcat.cli import main+ from reshot.cli import mainsrc = tmp_path / "src.mp4"_synthetic_clip(src)diff --git a/tests/test_pipeline.py b/tests/test_pipeline.pyindex b1070c5..2d8425a 100644--- a/tests/test_pipeline.py+++ b/tests/test_pipeline.py@@ -8,8 +8,8 @@ import cv2import numpy as npimport pytest-from depthcat import RunConfig, RunResult, plan, run-from depthcat.errors import InputError, RamBudgetError+from reshot import RunConfig, RunResult, plan, run+from reshot.errors import InputError, RamBudgetErrordef _clip(path: Path, frames=12, w=200, h=120, fps=30):@@ -51,7 +51,7 @@ def test_plan_is_cheap_and_consistent(tmp_path):def test_ram_budget_refuses_then_force_allows(tmp_path, monkeypatch):- import depthcat.pipeline as pl+ import reshot.pipeline as plsrc = _clip(tmp_path / "src.mp4")monkeypatch.setattr(pl, "memory_verdict", lambda *_: {"estimate": 10, "budget": 1, "ok": False, "max_frames_ok": 1})@@ -74,7 +74,7 @@ def test_missing_input_is_a_user_error(tmp_path):def test_cli_exit_codes(tmp_path):- from depthcat.cli import main+ from reshot.cli import mainsrc = _clip(tmp_path / "src.mp4")assert main([str(src), "-o", str(tmp_path / "o.mp4"), "--backend", "fake"]) == 0diff --git a/tests/test_planning.py b/tests/test_planning.pyindex f78aadc..3b09d10 100644--- a/tests/test_planning.py+++ b/tests/test_planning.py@@ -1,6 +1,6 @@"""Planning is pure arithmetic — test it without a model."""-from depthcat.planning import (+from reshot.planning import (HOST_RAM_BUDGET_RATIO,estimate_host_bytes,memory_verdict,diff --git a/tests/test_postprocess.py b/tests/test_postprocess.pyindex 9cd674c..670a4a9 100644--- a/tests/test_postprocess.py+++ b/tests/test_postprocess.py@@ -3,8 +3,8 @@import numpy as npimport pytest-from depthcat.postprocess import to_gray-from depthcat.targets import TARGETS, center_crop, fit_dimensions+from reshot.postprocess import to_gray+from reshot.targets import TARGETS, center_crop, fit_dimensionsdef test_global_normalisation_not_per_frame():