Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@ mamba activate infinidepth

### 2) Install dependencies

#### Option A: Resolve everything from `pyproject.toml` with `uv sync` (recommended)

This repository's `pyproject.toml` already declares every dependency, including the PyTorch CUDA 12.8 index and the git sources for MoGe and gsplat. With `uv` installed, you can create a virtual environment and resolve all dependencies in a single command.

```bash
# Install uv (only if you don't have it yet)
pip install uv

# Read pyproject.toml / uv.lock, create a .venv, and install all dependencies
uv sync

# Activate the virtual environment
source .venv/bin/activate
```

Notes:
- `uv sync` automatically creates `.venv` and resolves PyTorch (cu128) and the git dependencies (MoGe / gsplat) according to `[tool.uv.sources]` and `[[tool.uv.index]]` in `pyproject.toml`.
- If you prefer to install into an existing conda/mamba environment instead of a new `.venv`, pass `uv sync --active` to target the currently active interpreter.
- `gsplat` builds CUDA extensions at install time, so make sure `nvcc` / CUDA Toolkit 12.8 and a compatible `g++` are available (see the optional commands in "1) Create environment").
- Run `uv lock --upgrade` when you want to refresh the lock file.

#### Option B: Install packages individually with `uv pip`

If you'd rather install packages one by one (similar to a plain `pip` workflow) without going through `pyproject.toml`, use the following steps.

```bash
# Create environment
pip install uv
Expand Down
132 changes: 132 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
[project]
name = "infinidepth"
version = "0.1.0"
description = "InfiniDepth"
readme = "README.md"
requires-python = ">=3.10,<3.11"
license = { file = "LICENSE" }

dependencies = [
# PyTorch and related packages (CUDA 12.8 on Linux / Windows, CPU wheels on macOS)
"torch==2.9.0+cu128; sys_platform == 'linux' or sys_platform == 'win32'",
"torch==2.9.0; sys_platform == 'darwin'",
"torchvision==0.24.0+cu128; sys_platform == 'linux' or sys_platform == 'win32'",
"torchvision==0.24.0; sys_platform == 'darwin'",
"torchaudio==2.9.0+cu128; sys_platform == 'linux' or sys_platform == 'win32'",
"torchaudio==2.9.0; sys_platform == 'darwin'",
"xformers==0.0.33.post1; sys_platform == 'linux' or sys_platform == 'win32'",

# Transformers and AI models
"huggingface-hub>=0.24.0",
"timm",
"lpips",
"tyro",

# Data processing and scientific computing
"numpy<2.0",
"pandas",
"einops>=0.4.1",
"h5py",
"omegaconf",
"dacite",
"hydra-core",
"scikit-learn",

# Computer vision and graphics
"opencv-python",
"scikit-image",
"imageio",
"imageio[ffmpeg]",
"moviepy==1.0.3",
"matplotlib",
"plyfile",
"open3d",
"OpenEXR",

# 3D
"viser",
"e3nn",
"roma",

# Metrics and evaluation
"torchmetrics",
"fvcore",
"iopath",

# Training frameworks
"pytorch-lightning",

# Logging and monitoring
"wandb",
"tensorboard",
"rich",
"tqdm",
"colorama",
"termcolor",

# Utilities
"jaxtyping",
"beartype",
"bidict",
"tabulate",
"svg-py",
"sk-video",
"ipdb",
"pdbr",
"ffmpeg-python",
"colorspacious",
"regex",

# simple skymask
"onnxruntime",

# Gradio app
"gradio>=4.44.0",
"plotly>=5.22.0",
"spaces",
"trimesh>=4.4.0",

# Waymo dataset
"protobuf==3.20.2",

# COLMAP python bindings
"pycolmap==4.0.3",

# External git dependencies
"moge",
"gsplat",

]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["InfiniDepth"]

[tool.uv.extra-build-dependencies]
# gsplat builds CUDA extensions at install time and needs torch present.
gsplat = ["torch==2.9.0+cu128; sys_platform == 'linux' or sys_platform == 'win32'"]

[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true

[tool.uv.sources]
torch = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchaudio = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
xformers = [
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
moge = { git = "https://github.com/microsoft/MoGe.git" }
gsplat = { git = "https://github.com/nerfstudio-project/gsplat.git" }

Loading