Files
2026-08-22 16:54:05 +02:00

102 lines
3.2 KiB
TOML

[package]
name = "pipeline-360"
version = "0.1.0"
edition = "2021"
description = "360° equirect -> COLMAP cubemap rig pipeline (Rust/WebGPU rewrite)"
# The full GPL-3.0 text lives in ./LICENSE.
license = "GPL-3.0-or-later"
[lib]
name = "pipeline_360"
path = "src/lib.rs"
[[bin]]
name = "pipeline_360"
path = "src/main.rs"
[dependencies]
# GPU compute (the WebGPU layer) — Vulkan/Metal/DX12 on native, WebGPU on wasm.
wgpu = "25"
# Image I/O (PNG/JPEG) for extracted frames and cube faces.
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff", "webp"] }
# CPU-side parallel orchestration (per-frame / per-face work).
rayon = "1.10"
# CLI parsing.
clap = { version = "4.5", features = ["derive"] }
# Serde for any structured config beyond the minimal `json` module.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Block on the async wgpu device/adapter setup from a sync CLI.
pollster = "0.4"
# Errors / logging.
anyhow = "1"
thiserror = "2"
# Optional YOLO masks (ONNX Runtime). Gated behind a feature so the
# extract/cubemap/rig core builds without system deps. Video decode uses the
# `ffmpeg`/`ffprobe` CLI (piped rawvideo) instead of native bindings, so there
# is no `video` feature/dependency.
#
# `ort` is used with `load-dynamic` so it loads the *system* libonnxruntime at
# runtime (via dlopen, path overridable with `ORT_DYLIB_PATH`) instead of
# downloading a CPU-only build. On this box the system lib is 1.28 built with
# the MIGraphX execution provider (AMD ROCm GPU), so `--mask-device rocm` runs
# YOLO inference on the Radeon GPU. `migraphx` gates the `ep::MIGraphX` binding;
# `api-28` matches the system lib's API version.
[features]
# `masks` is on by default so a plain `cargo build` produces a fully-featured
# binary (YOLO segmentation via ONNX Runtime). Use `--no-default-features` for a
# lighter build without ONNX Runtime.
default = ["masks"]
masks = ["dep:ort", "dep:ndarray", "ort/load-dynamic", "ort/migraphx", "ort/api-28"]
# Native GUI (egui + wgpu). When enabled, the single `pipeline_360` binary also
# launches the GUI when invoked with no subcommand (or `--gui`).
gui = [
"dep:eframe",
"dep:egui",
"dep:egui-wgpu",
"dep:rfd",
]
# ort has no stable release yet; declare the rc so `cargo fetch` resolves it.
# `default-features = false` + `load-dynamic` avoids downloading/linking a
# CPU-only ONNX Runtime and instead dlopens the system lib (which has the
# MIGraphX GPU EP on AMD/ROCm systems). `ndarray` is needed for
# `TensorRef::from_array_view` / `try_extract_tensor`.
[dependencies.ort]
version = "2.0.0-rc"
optional = true
default-features = false
features = ["ndarray", "load-dynamic", "migraphx", "api-28"]
# NCHW tensor construction for ort inputs (only needed by the masks stage).
[dependencies.ndarray]
version = "0.17"
optional = true
# Native GUI deps (egui + wgpu + native file dialogs).
[dependencies.egui]
version = "0.36"
optional = true
[dependencies.eframe]
version = "0.36"
optional = true
default-features = false
features = ["wgpu", "wayland", "x11"]
[dependencies.egui-wgpu]
version = "0.36"
optional = true
[dependencies.rfd]
version = "0.15"
optional = true
[profile.release]
lto = true
codegen-units = 1