Skip to content

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.

rename: video2blockout → depthcat (package, CLI, repo)

wangfeng8d9e22db85fb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12a6646..0379b7e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,7 @@
# Changelog
## 0.1.0 — 2026-09-11
-- First release: `video2blockout in.mp4 -o out.mp4` on Video Depth Anything Small (Apache-2.0).
+- First release: `depthcat 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/NOTICE b/NOTICE
index 9bd0966..aa16779 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,10 +1,10 @@
-video2blockout
+depthcat
Copyright 2026 Maoska
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 video2blockout/third_party/video_depth_anything/.
+two import lines, under depthcat/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.md
index b9ab44c..77e36c2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# video2blockout
+# depthcat
-[![ci](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml/badge.svg)](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml) [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
+[![ci](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml/badge.svg)](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml) [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
Turn any video into a **depth "blockout" video** — the grey near-white / far-black
clip that video-generation ControlNets (MiniMax H3 Fun ControlNet, Wan VACE, …) use to
@@ -16,8 +16,8 @@ One command, one model download (Apache-2.0), runs on an 8 GB GPU or an Apple M-
## Install
```bash
-pip install git+https://github.com/maosika-ai/video2blockout
-# needs ffmpeg on PATH (or: pip install "video2blockout[ffmpeg]")
+pip install git+https://github.com/maosika-ai/depthcat
+# needs ffmpeg on PATH (or: pip install "depthcat[ffmpeg]")
```
Weights (111 MB) download from Hugging Face on first run. In China set
@@ -26,13 +26,13 @@ Weights (111 MB) download from Hugging Face on first run. In China set
## Use
```bash
-video2blockout in.mp4 -o blockout.mp4 # keep fps/size, near = white
-video2blockout in.mp4 -o blockout.mp4 --target h3 # MiniMax H3: 24 fps, ×32 dims, ≤15 s
-video2blockout in.mp4 -o blockout.mp4 --npz depth.npz # also keep raw float depth
+depthcat in.mp4 -o blockout.mp4 # keep fps/size, near = white
+depthcat in.mp4 -o blockout.mp4 --target h3 # MiniMax H3: 24 fps, ×32 dims, ≤15 s
+depthcat in.mp4 -o blockout.mp4 --npz depth.npz # also keep raw float depth
```
```python
-from video2blockout import extract, to_gray, write_gray_video
+from depthcat import extract, to_gray, write_gray_video
depths, fps = extract("in.mp4") # float32 [T, H, W], larger = closer
write_gray_video(to_gray(depths), "out.mp4", fps)
```
@@ -90,7 +90,7 @@ We crop rather than pad: a padded black border reads to the generator as a far w
Code is Apache-2.0. The model code from
[DepthAnything/Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything)
-is vendored under `video2blockout/third_party/` (see `NOTICE`).
+is vendored under `depthcat/third_party/` (see `NOTICE`).
## ComfyUI
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 8a2ccb5..bfbfced 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,6 +1,6 @@
-# video2blockout
+# depthcat
-[![ci](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml/badge.svg)](https://github.com/maosika-ai/video2blockout/actions/workflows/ci.yml) [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
+[![ci](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml/badge.svg)](https://github.com/maosika-ai/depthcat/actions/workflows/ci.yml) [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
把任意视频抽成**深度白模视频**——近白远黑的灰度片,喂给视频生成模型的 ControlNet
(MiniMax H3 Fun ControlNet、Wan VACE……),只复制参考片的**走位与镜头**,不带走人脸、
@@ -13,8 +13,8 @@
## 安装
```bash
-pip install git+https://github.com/maosika-ai/video2blockout
-# 需要 PATH 里有 ffmpeg(或 pip install "video2blockout[ffmpeg]")
+pip install git+https://github.com/maosika-ai/depthcat
+# 需要 PATH 里有 ffmpeg(或 pip install "depthcat[ffmpeg]")
```
首次运行自动从 Hugging Face 下载权重。国内请设置 `HF_ENDPOINT=https://hf-mirror.com`。
@@ -22,13 +22,13 @@ pip install git+https://github.com/maosika-ai/video2blockout
## 用法
```bash
-video2blockout in.mp4 -o blockout.mp4 # 保持原 fps / 尺寸,近白远黑
-video2blockout in.mp4 -o blockout.mp4 --target h3 # MiniMax H3:24fps、边长 32 的倍数、≤15 秒
-video2blockout in.mp4 -o blockout.mp4 --npz depth.npz # 同时保存原始浮点深度
+depthcat in.mp4 -o blockout.mp4 # 保持原 fps / 尺寸,近白远黑
+depthcat in.mp4 -o blockout.mp4 --target h3 # MiniMax H3:24fps、边长 32 的倍数、≤15 秒
+depthcat in.mp4 -o blockout.mp4 --npz depth.npz # 同时保存原始浮点深度
```
```python
-from video2blockout import extract, to_gray, write_gray_video
+from depthcat import extract, to_gray, write_gray_video
depths, fps = extract("in.mp4") # float32 [T, H, W],越大越近
write_gray_video(to_gray(depths), "out.mp4", fps)
```
@@ -81,7 +81,7 @@ write_gray_video(to_gray(depths), "out.mp4", fps)
代码 Apache-2.0。模型代码来自
[DepthAnything/Video-Depth-Anything](https://github.com/DepthAnything/Video-Depth-Anything),
-vendored 在 `video2blockout/third_party/`(见 `NOTICE`)。
+vendored 在 `depthcat/third_party/`(见 `NOTICE`)。
## ComfyUI
diff --git a/video2blockout/__init__.py b/depthcat/__init__.py
similarity index 92%
rename from video2blockout/__init__.py
rename to depthcat/__init__.py
index b57148b..5ae3ebf 100644
--- a/video2blockout/__init__.py
+++ b/depthcat/__init__.py
@@ -1,6 +1,6 @@
-"""video2blockout — turn any video into a depth "blockout" video for video-generation control.
+"""depthcat — turn any video into a depth "blockout" video for video-generation control.
- from video2blockout import extract, to_gray, write_gray_video
+ from depthcat import extract, to_gray, write_gray_video
depths, fps = extract("in.mp4") # float32 [T, H, W], larger = closer
write_gray_video(to_gray(depths), "out.mp4", fps)
"""
diff --git a/video2blockout/backends/__init__.py b/depthcat/backends/__init__.py
similarity index 100%
rename from video2blockout/backends/__init__.py
rename to depthcat/backends/__init__.py
diff --git a/video2blockout/backends/base.py b/depthcat/backends/base.py
similarity index 90%
rename from video2blockout/backends/base.py
rename to depthcat/backends/base.py
index f4ba3fb..8144854 100644
--- a/video2blockout/backends/base.py
+++ b/depthcat/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:`video2blockout.postprocess`,
+clip. Normalisation to 8-bit grey happens later in :mod:`depthcat.postprocess`,
so backends never decide what "white" means.
"""
diff --git a/video2blockout/backends/vda.py b/depthcat/backends/vda.py
similarity index 100%
rename from video2blockout/backends/vda.py
rename to depthcat/backends/vda.py
diff --git a/video2blockout/cli.py b/depthcat/cli.py
similarity index 95%
rename from video2blockout/cli.py
rename to depthcat/cli.py
index d0a8e0c..11bbca7 100644
--- a/video2blockout/cli.py
+++ b/depthcat/cli.py
@@ -1,8 +1,8 @@
-"""`video2blockout` command line.
+"""`depthcat` command line.
- video2blockout in.mp4 -o out.mp4 # Apache-2.0 Small model, auto device
- video2blockout in.mp4 -o out.mp4 --target h3 # 24 fps, ×32 dims, ≤15 s for MiniMax H3
- video2blockout in.mp4 -o out.mp4 --npz depth.npz --metrics run.json
+ 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 depth.npz --metrics run.json
Memory model: depth is estimated at the model's working resolution (short side 518 px)
and only the 8-bit result is upscaled to the output size, frame by frame while
@@ -33,7 +33,7 @@ from .targets import TARGETS, fit_dimensions
def build_parser() -> argparse.ArgumentParser:
p = argparse.ArgumentParser(
- prog="video2blockout",
+ prog="depthcat",
description="Video → depth blockout video for video-generation ControlNets.",
)
p.add_argument("input", help="input video (anything ffmpeg/OpenCV can read)")
@@ -108,10 +108,10 @@ def main(argv: list[str] | None = None) -> int:
# ── depth ───────────────────────────────────────────────────────────────────────
device = pick_device(args.device)
- if os.environ.get("VIDEO2BLOCKOUT_FAKE_BACKEND"):
+ if os.environ.get("DEPTHCAT_FAKE_BACKEND"):
# Dry-run mode for exercising the whole pipeline (I/O, encoding, metrics, remote
# runbook) without loading a model. Produces a plausible radial gradient.
- _say("model FAKE backend (VIDEO2BLOCKOUT_FAKE_BACKEND set) — no inference")
+ _say("model FAKE backend (DEPTHCAT_FAKE_BACKEND set) — no inference")
yy, xx = np.mgrid[0:h, 0:w].astype(np.float32)
base = 1.0 / (1.0 + ((xx - w / 2) ** 2 + (yy - h / 2) ** 2) / (0.15 * w * h))
depths = np.stack([base * (0.8 + 0.2 * i / max(1, t - 1)) for i in range(t)]).astype(np.float32)
diff --git a/video2blockout/io.py b/depthcat/io.py
similarity index 100%
rename from video2blockout/io.py
rename to depthcat/io.py
diff --git a/video2blockout/planning.py b/depthcat/planning.py
similarity index 100%
rename from video2blockout/planning.py
rename to depthcat/planning.py
diff --git a/video2blockout/postprocess.py b/depthcat/postprocess.py
similarity index 100%
rename from video2blockout/postprocess.py
rename to depthcat/postprocess.py
diff --git a/video2blockout/targets.py b/depthcat/targets.py
similarity index 100%
rename from video2blockout/targets.py
rename to depthcat/targets.py
diff --git a/video2blockout/third_party/__init__.py b/depthcat/third_party/__init__.py
similarity index 100%
rename from video2blockout/third_party/__init__.py
rename to depthcat/third_party/__init__.py
diff --git a/video2blockout/third_party/video_depth_anything/LICENSE b/depthcat/third_party/video_depth_anything/LICENSE
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/LICENSE
rename to depthcat/third_party/video_depth_anything/LICENSE
diff --git a/video2blockout/third_party/video_depth_anything/__init__.py b/depthcat/third_party/video_depth_anything/__init__.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/__init__.py
rename to depthcat/third_party/video_depth_anything/__init__.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2.py b/depthcat/third_party/video_depth_anything/dinov2.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2.py
rename to depthcat/third_party/video_depth_anything/dinov2.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/__init__.py b/depthcat/third_party/video_depth_anything/dinov2_layers/__init__.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/__init__.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/__init__.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/attention.py b/depthcat/third_party/video_depth_anything/dinov2_layers/attention.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/attention.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/attention.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/block.py b/depthcat/third_party/video_depth_anything/dinov2_layers/block.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/block.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/block.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/drop_path.py b/depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/drop_path.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/drop_path.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/layer_scale.py b/depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/layer_scale.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/layer_scale.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/mlp.py b/depthcat/third_party/video_depth_anything/dinov2_layers/mlp.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/mlp.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/mlp.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/patch_embed.py b/depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/patch_embed.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/patch_embed.py
diff --git a/video2blockout/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py b/depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py
rename to depthcat/third_party/video_depth_anything/dinov2_layers/swiglu_ffn.py
diff --git a/video2blockout/third_party/video_depth_anything/dpt.py b/depthcat/third_party/video_depth_anything/dpt.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dpt.py
rename to depthcat/third_party/video_depth_anything/dpt.py
diff --git a/video2blockout/third_party/video_depth_anything/dpt_temporal.py b/depthcat/third_party/video_depth_anything/dpt_temporal.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/dpt_temporal.py
rename to depthcat/third_party/video_depth_anything/dpt_temporal.py
diff --git a/video2blockout/third_party/video_depth_anything/motion_module/__init__.py b/depthcat/third_party/video_depth_anything/motion_module/__init__.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/motion_module/__init__.py
rename to depthcat/third_party/video_depth_anything/motion_module/__init__.py
diff --git a/video2blockout/third_party/video_depth_anything/motion_module/attention.py b/depthcat/third_party/video_depth_anything/motion_module/attention.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/motion_module/attention.py
rename to depthcat/third_party/video_depth_anything/motion_module/attention.py
diff --git a/video2blockout/third_party/video_depth_anything/motion_module/motion_module.py b/depthcat/third_party/video_depth_anything/motion_module/motion_module.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/motion_module/motion_module.py
rename to depthcat/third_party/video_depth_anything/motion_module/motion_module.py
diff --git a/video2blockout/third_party/video_depth_anything/util/__init__.py b/depthcat/third_party/video_depth_anything/util/__init__.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/util/__init__.py
rename to depthcat/third_party/video_depth_anything/util/__init__.py
diff --git a/video2blockout/third_party/video_depth_anything/util/align.py b/depthcat/third_party/video_depth_anything/util/align.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/util/align.py
rename to depthcat/third_party/video_depth_anything/util/align.py
diff --git a/video2blockout/third_party/video_depth_anything/util/blocks.py b/depthcat/third_party/video_depth_anything/util/blocks.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/util/blocks.py
rename to depthcat/third_party/video_depth_anything/util/blocks.py
diff --git a/video2blockout/third_party/video_depth_anything/util/transform.py b/depthcat/third_party/video_depth_anything/util/transform.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/util/transform.py
rename to depthcat/third_party/video_depth_anything/util/transform.py
diff --git a/video2blockout/third_party/video_depth_anything/video_depth.py b/depthcat/third_party/video_depth_anything/video_depth.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/video_depth.py
rename to depthcat/third_party/video_depth_anything/video_depth.py
diff --git a/video2blockout/third_party/video_depth_anything/video_depth_stream.py b/depthcat/third_party/video_depth_anything/video_depth_stream.py
similarity index 100%
rename from video2blockout/third_party/video_depth_anything/video_depth_stream.py
rename to depthcat/third_party/video_depth_anything/video_depth_stream.py
diff --git a/pyproject.toml b/pyproject.toml
index 512852d..fd44a08 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
-name = "video2blockout"
+name = "depthcat"
version = "0.1.0"
description = "Turn any video into a depth blockout video for video-generation ControlNets (MiniMax H3, Wan VACE, ...)."
readme = "README.md"
@@ -32,17 +32,17 @@ ffmpeg = ["imageio-ffmpeg>=0.4.7"] # bundled ffmpeg if none on PATH
dev = ["pytest>=8", "ruff"]
[project.scripts]
-video2blockout = "video2blockout.cli:main"
+depthcat = "depthcat.cli:main"
[project.urls]
-Homepage = "https://github.com/maosika-ai/video2blockout"
+Homepage = "https://github.com/maosika-ai/depthcat"
[tool.setuptools.packages.find]
-include = ["video2blockout*"]
+include = ["depthcat*"]
[tool.setuptools.package-data]
-"video2blockout.third_party.video_depth_anything" = ["LICENSE"]
+"depthcat.third_party.video_depth_anything" = ["LICENSE"]
[tool.ruff]
line-length = 110
-extend-exclude = ["video2blockout/third_party"]
+extend-exclude = ["depthcat/third_party"]
diff --git a/tests/test_io.py b/tests/test_io.py
index a2cab78..32c27c8 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -4,11 +4,11 @@ import cv2
import numpy as np
import pytest
-from video2blockout.io import read_video, write_gray_video
+from depthcat.io import read_video, write_gray_video
def _has_ffmpeg():
try:
- from video2blockout.io import ffmpeg_binary
+ from depthcat.io import ffmpeg_binary
return bool(ffmpeg_binary())
except Exception:
@@ -74,7 +74,7 @@ def test_probe_video(tmp_path):
for _ in range(5):
vw.write(np.zeros((48, 64, 3), np.uint8))
vw.release()
- from video2blockout.io import probe_video
+ from depthcat.io import probe_video
w, h, fps, n = probe_video(p)
assert (w, h, n) == (64, 48, 5) and abs(fps - 25) < 0.01
diff --git a/tests/test_model_smoke.py b/tests/test_model_smoke.py
index 879ef2f..9b07139 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 video2blockout import extract, to_gray, write_gray_video
+ from depthcat import extract, to_gray, write_gray_video
src = 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 video2blockout.cli import main
+ from depthcat.cli import main
src = tmp_path / "src.mp4"
_synthetic_clip(src)
diff --git a/tests/test_planning.py b/tests/test_planning.py
index a31a678..f78aadc 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 video2blockout.planning import (
+from depthcat.planning import (
HOST_RAM_BUDGET_RATIO,
estimate_host_bytes,
memory_verdict,
diff --git a/tests/test_postprocess.py b/tests/test_postprocess.py
index 911a823..5d7d662 100644
--- a/tests/test_postprocess.py
+++ b/tests/test_postprocess.py
@@ -3,8 +3,8 @@
import numpy as np
import pytest
-from video2blockout.postprocess import to_gray
-from video2blockout.targets import TARGETS, center_crop, fit_dimensions
+from depthcat.postprocess import to_gray
+from depthcat.targets import TARGETS, center_crop, fit_dimensions
def test_global_normalisation_not_per_frame():