From 24a546acba68aecfaee5be97fbe10160af3324fd5f2574366c31d14e70b1f80d Mon Sep 17 00:00:00 2001 From: Ben_Kosytorz Date: Sat, 22 Aug 2026 16:54:05 +0200 Subject: [PATCH] Rewrote the readme to clearyfy the wibecoded nature of this script and made it more concise. Fixed licencing. Added a wiki. --- Cargo.toml | 3 +- README.md | 266 +++++++++------------------------------- wiki/Architecture.md | 65 ++++++++++ wiki/GPU.md | 75 +++++++++++ wiki/Getting-Started.md | 53 ++++++++ wiki/Home.md | 14 +++ wiki/Pipeline.md | 47 +++++++ wiki/Usage.md | 62 ++++++++++ 8 files changed, 377 insertions(+), 208 deletions(-) create mode 100644 wiki/Architecture.md create mode 100644 wiki/GPU.md create mode 100644 wiki/Getting-Started.md create mode 100644 wiki/Home.md create mode 100644 wiki/Pipeline.md create mode 100644 wiki/Usage.md diff --git a/Cargo.toml b/Cargo.toml index 9f8ddaa..6c177d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,8 @@ name = "pipeline-360" version = "0.1.0" edition = "2021" description = "360° equirect -> COLMAP cubemap rig pipeline (Rust/WebGPU rewrite)" -license = "MIT" +# The full GPL-3.0 text lives in ./LICENSE. +license = "GPL-3.0-or-later" [lib] name = "pipeline_360" diff --git a/README.md b/README.md index f29661b..f7079d8 100644 --- a/README.md +++ b/README.md @@ -1,226 +1,78 @@ -# pipeline_360 — Rust/WebGPU rewrite +# pipeline_360 -An in-progress rewrite of the Python `pipeline_360.py` equirect→COLMAP-cubemap -rig pipeline in **Rust**, with all heavy image math on the **GPU through -WebGPU** (`wgpu`) for cross-vendor compatibility (Vulkan / Metal / DX12, and -WebGPU/wasm). +Convert equirectangular 360° videos into a **COLMAP-ready cubemap camera-rig +dataset** — sharpest-frame extraction, movable-object masks, an +equirect→cubemap projection, and a `rig_config.json` + nested file tree. -> **Status: complete — single binary, masks default, native GUI, GPU masks.** -> One `pipeline_360` binary runs the full GPU pipeline and, with -> `--features gui`, also launches a native egui+wgpu GUI when invoked with no -> subcommand. The YOLO masks stage is on by default. Validated end-to-end on -> real 8K equirect video. `cargo test` passes; 0 clippy warnings in pipeline -> code. YOLO11x-seg via ONNX Runtime, and masks now run on the **GPU** (AMD -> MIGraphX/ROCm) and on the **cube-face images** directly (no equirect -> round-trip). All GPU stages are **batched** for throughput. -> See [PLAN.md](PLAN.md) for the full design and milestone list. +This is the **Rust + WebGPU rewrite** of the original Python pipeline (now in +[`../python`](../python), kept as legacy reference). -## Current state +> ⚡ **Status: fully vibecoded, and the rewrite is done.** Everything described +> here is implemented and running on real 8K test footage — GPU sharpness, +> YOLO segmentation masks on the GPU, cubemap projection, and rig generation all +> work end-to-end. It should just work; if something doesn't, the +> [Wiki](wiki/Home.md) and issue tracker are the place to look. -| Piece | Status | -| --- | --- | -| `math.rs` (face rotations, quaternions, intrinsics) | ✅ pure std, verified | -| `stages/rig.rs` (rig_config.json + nested tree + linking) | ✅ pure std, verified | -| `selftest.rs` (mirrors Python `rig --self-test`, 6 groups) | ✅ passes (`cargo test`) | -| CLI / `main.rs` (derive-based, mirrors Python commands) | ✅ `extract` + `cubemap` + `all` + `rig` work | -| `video/mod.rs` (ffmpeg/ffprobe CLI decode → rawvideo RGBA) | ✅ verified end-to-end | -| `gpu/mod.rs` (adapter prefers **discrete** GPU; batched readback) | ✅ picks the dGPU (was defaulting to LowPower/iGPU) | -| `gpu/shaders/equirect_to_cubemap.wgsl` | ✅ projection verified vs `py360convert.e2c` | -| `gpu/shaders/sharpness.wgsl` (workgroup-reduced metrics) | ✅ verified end-to-end | -| `gpu/shaders/c2e.wgsl` (cubemap→equirect nearest) | ✅ round-trip validated (legacy mask reprojection) | -| `stages/extract.rs` (GPU sharpness + quality + selection, **batched**) | ✅ superset of Python; verified | -| `stages/cubemap.rs` (GPU equirect→6 faces, skip/resume, **batched**) | ✅ verified vs `py360convert.e2c` | -| `stages/masks.rs` (YOLO11x-seg on cube faces; **MIGraphX GPU**; cache) | ✅ IoU 0.96 vs ultralytics | -| `gui.rs` (native **egui+wgpu** GUI; in the same binary via `--features gui`) | ✅ builds & runs | +## What it does -## Build - -There is **one binary**, `pipeline_360`. The YOLO masks stage is **on by -default** (via ONNX Runtime). Use `--no-default-features` for a lighter build -without masks. - -```bash -cargo build # default: full pipeline incl. YOLO masks -./target/debug/pipeline_360 all --project-dir --video --skip-masks -cargo test # runs the rig self-test (6 groups) -cargo run -- rig --self-test - -# Lighter build without ONNX Runtime (no masks stage): -cargo build --no-default-features - -# Run the GPU extract stage (needs ffmpeg/ffprobe on PATH + a GPU): -cargo run -- extract --video