← ClaudeAtlas

photo-depthlisted

Give a single photo, painting or AI-generated picture real depth on the web. Estimates a depth map with MoGe-2 (MIT licence), then either makes the picture behave like a window in a three.js scene (parallax that holds up as the camera moves, without tearing at edges) or finds where things are in it (fit a plane to a wall or sign to place a billboard, the ground under a character, the 3D point under a pixel). Use when the user wants a backdrop, portal, skybox picture or matte painting to stop looking like a flat print, mentions depth maps, parallax, 2.5D, MoGe, Depth Anything or monocular depth, or needs to place 3D objects into a picture.
skyeyesec333/photo-depth · ★ 0 · AI & Automation · score 72
Install: claude install-skill skyeyesec333/photo-depth
# Photo depth: a picture that behaves like a place ``` 0. setup a Python env with MoGe-2 (once; asks before downloading) scripts/setup.sh 1. depth picture → nearness map (+ 16-bit distance, camera, raw npz) scripts/depth.py 2a. window the picture as a window in three.js examples/portal.js 2b. place planes and points in the picture's own 3D scripts/fit_plane.py 3. check look at it from the extreme views you will really use ``` `scripts/` and `examples/` mean the folders **in this skill's own directory** (`${CLAUDE_SKILL_DIR}`, for a plugin or a copied skill alike), not the user's project. Set `S` to that `scripts/` folder and run `"$S/depth.py"` and the others by full path. ## 0. Setup (once) Check first: an existing env with `import moge` working can be reused (ask the user where they keep one). Otherwise **ask the user before downloading**, naming what comes down: PyTorch and helpers from PyPI (about 1 GB installed), MoGe's source and two small libraries from GitHub (pinned commits, a few MB), and later the model weights (about 1.3 GB, `Ruicheng/moge-2-vitl` on Hugging Face). Then: ```sh "$S/setup.sh" <folder-for-the-env> --yes ``` Details, GPU notes and other models: [references/setup.md](references/setup.md). ## 1. Depth ```sh <env>/.venv/bin/python "$S/depth.py" picture.jpg --out public/depth/ [--dist16] [--npz] ``` - Always writes `<stem>-near.webp`: nearness (disparity), 0 the sky,