### Clone, create environment, and activate pxwplanar Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Sets up the repository: clones it, creates the conda environment `pxwplanar` from `env/environment.yml`, installs the package in editable mode, and initializes the MoGe submodule. Run from the repo root after cloning. ```bash git clone https://github.com/alpayozkan/PixelwisePlanarity.git cd PixelwisePlanarity bash env/create_env.sh # conda env `pxwplanar` from env/environment.yml, # `pip install -e .`, MoGe submodule init conda activate pxwplanar ``` -------------------------------- ### Run demo and assemble GIF Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Commands to run the demo pipeline on example frames and assemble the montages into a GIF. The first command runs the full pipeline (MoGe 4-head inference + plane segmentation) on demo/inputs/, writing outputs to demo/outputs// and a combined montage. The second command assembles the montages into demo/assets/demo.gif. ```bash python demo/run_demo.py # runs on the example frames in demo/inputs/ python demo/make_gif.py # assemble the montages into demo/assets/demo.gif ``` -------------------------------- ### Example hypersim/val.txt Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Sample content of a split file for hypersim, showing one scene ID per line. ```text ai_001_001 ai_002_003 ai_003_007 ... ``` -------------------------------- ### Run outdoor dataset extraction (synthia, vkitti2) Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Run scene_runner.py with named arguments for outdoor datasets that extract from depth and semantics instead of meshes. Synthia uses --scene_dir, vkitti2 uses --scene and --variant. ```bash # synthia python scene_runner.py --scene_dir --config ../configs/synthia_default.yml ``` ```bash # vkitti2 python scene_runner.py --scene --variant clone --config ../configs/vkitti2_default.yml ``` -------------------------------- ### Example scannetpp/train.txt Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Sample content of a split file for scannetpp, showing one scene ID per line. ```text 0a7cc12c0e 0a5c013435 0acbcdc1d0 ... ``` -------------------------------- ### Install as third-party dependency via pip Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Lets another project depend on this repo directly without cloning or submodules. The MoGe fork is pulled in as the `moge` dependency and the checkpoint downloads from Hugging Face Hub on first use. ```bash pip install "pxwplanar @ git+https://github.com/alpayozkan/PixelwisePlanarity.git" ``` -------------------------------- ### Train on Hypersim with explicit roots Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Run from the repo root with the `pxwplanar` environment active. Pass raw Hypersim data, plane ground truth, and split CSV explicitly via `--hypersim_root`, `--hypersim_planes`, and `--hypersim_split_csv`. ```bash python MoGe/train_moge_4heads_planarity_hypersim.py \ --hypersim_root --hypersim_planes --hypersim_split_csv ``` -------------------------------- ### Repository structure tree Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Directory tree of the repository, showing the main package 'pxwplanar' with subpackages for shared utilities, ground-truth creation, inference, evaluation, and paths configuration. Also lists demo, splits, env, scripts, and the MoGe submodule. ```text ├── pxwplanar/ # The Python package (pip-installed editable) │ ├── shared/ # Core library used by everything else │ │ ├── plane_fitting/ # RANSAC fitting, metrics, projection │ │ ├── segmentation/ # Region growing, merging, postprocessing │ │ ├── rendering/ # Open3D mesh rendering and raycasting │ │ ├── datasets/ # Loaders: ScanNet++, Hypersim, NYU-v2, 7-Scenes, SYNTHIA, VKITTI2 │ │ ├── outdoor/ # Outdoor-specific plane fitting │ │ └── utils/ # Depth/normal processing, visualization, labels, I/O │ ├── gt_creation/ # Semantic mesh → 2D plane-label GT (HDF5) │ │ ├── scannetpp/ hypersim/ synthia/ vkitti2/ │ │ ├── configs/ # YAML configs per dataset │ │ └── scripts/ # SLURM batch scripts (README in each scripts/ dir) │ ├── inference/ # RGB → signals → plane labels │ │ ├── planarity/ # MoGe wrapper, signal export, segmentation from H5 │ │ ├── segmentation/ # On-the-fly prediction pipeline │ │ └── scripts/ # Shell wrappers (see its README) │ ├── evaluation/ # Metrics + visualization │ │ ├── quantitative/ # evaluate_all_baselines.py + outdoor variants │ │ ├── qualitative/ # Comparison videos, 3D visualization │ │ └── scripts/ # Shell wrappers (see its README) │ └── paths.py # ALL dataset/checkpoint/output paths — configure before running ├── demo/ # Example frames + run_demo.py + make_gif.py ├── splits/ # Train/val/test scene lists per dataset ├── env/ # Conda environment + setup script ├── scripts/format.sh # ruff formatting entry point (config: ruff.toml) └── MoGe/ # Git submodule: MoGe fork with 4-head training code ``` -------------------------------- ### Train on ScanNet++ with rendered plane GT Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Run from the repo root with the `pxwplanar` environment active. Uses default ScanNet++ roots from `pxwplanar/paths.py`; override with `--rgb_root` / `--plane_gt_root`. ```bash python MoGe/train_moge_4heads_planarity_scannetpp.py # ScanNet++ (rendered plane GT) ``` -------------------------------- ### Train on mixed data with explicit roots Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Run from the repo root with the `pxwplanar` environment active. Pass raw Hypersim data, plane ground truth, and split CSV explicitly via `--hypersim_root`, `--hypersim_planes`, and `--hypersim_split_csv`. ```bash python MoGe/train_moge_4heads_planarity_mixed.py \ --hypersim_root --hypersim_planes --hypersim_split_csv ``` -------------------------------- ### Run mesh-based scene extraction (scannetpp, hypersim) Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Run scene_runner.py with a positional scene id for mesh-based datasets (ScanNet++, Hypersim). Requires editing /path/to/... placeholders in the YAML config or passing --input_root/--output_root. ```bash # scannetpp, hypersim python scene_runner.py --config ../configs/_default.yml ``` -------------------------------- ### Run formatting script on changed files or all files Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Formats and lints Python code with ruff. `./scripts/format.sh` targets files changed vs. main (or all files on main); `--all` processes every tracked Python file. The script runs `ruff format` then `ruff check --fix`; the MoGe submodule is never reformatted. ```bash ./scripts/format.sh # files changed vs. main (all files on main) ./scripts/format.sh --all # every tracked Python file ``` -------------------------------- ### Pipeline overview diagram Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md ASCII diagram showing the pipeline stages: RGB input goes through the MoGe 4-head model to produce planarity, metric depth, normals, and mask; then 8-connected region growing on planarity, normal, and depth; then per-segment RANSAC plane fitting; finally 2D metrics (SC, RI, VOI) and 3D precision/recall at thresholds. Each stage lists the corresponding package directory. ```text RGB → MoGe 4-head model → planarity, metric depth, normals, mask (pxwplanar/inference/planarity/) ↓ 8-connected region growing on planarity + normal + depth (pxwplanar/shared/segmentation/) ↓ per-segment RANSAC plane fitting (pxwplanar/shared/plane_fitting/) ↓ 2D metrics (SC, RI, VOI) + 3D precision/recall @ thresholds (pxwplanar/evaluation/quantitative/) ``` -------------------------------- ### Stage 1: Generate planarity/depth/normal signals (save_moge_signals_planarity.py) Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Runs RGB frames through the MoGe model to produce one moge_signals.h5 per scene. The --resolution 1440x1920 flag reproduces the released 'ours' configuration; the default is 480x640. --dataset also accepts hypersim, and nyuv2 / sevenscenes in the NPZ format of the ZeroPlane (CVPR 2025) release. ```bash python pxwplanar/inference/planarity/save_moge_signals_planarity.py \ --dataset scannetpp --scenes splits/scannetpp/test.txt \ --model_path --output_root \ --resolution 1440x1920 --frame_step 25 --batch_size 8 --num_tokens 1600 # --resolution 1440x1920 reproduces the released "ours" configuration # (the flag defaults to 480x640). --dataset also accepts hypersim, and # nyuv2 / sevenscenes in the NPZ format of the ZeroPlane (CVPR 2025) release. ``` -------------------------------- ### Stage 3: Evaluate methods against GT (evaluate_all_baselines.py) Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Runs quantitative evaluation for the specified methods (gt and ours) against ground truth. The --aggregate-only flag produces summary tables. The method registry is the METHODS dict at the top of the script, which ships with exactly two methods: 'gt' (upper bound from rendered GT labels) and 'ours' (experiment name moge_ours_ep1, read from paths.ours_planes_root). ```bash python pxwplanar/evaluation/quantitative/evaluate_all_baselines.py --methods gt ours --max-scenes 5 python pxwplanar/evaluation/quantitative/evaluate_all_baselines.py --aggregate-only # summary tables ``` -------------------------------- ### Batch SLURM scripts for ScanNet++ and other datasets Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Batch SLURM scripts for plane extraction and rendering. scannetpp_render_planes.sh produces rendered.h5 per scene, scannetpp_render_depth.sh produces rendered_depth.h5. Hypersim has analogues plus hypersim_raycast_depth.sh; outdoor datasets have extraction scripts only. ```bash bash pxwplanar/gt_creation/scripts/scannetpp_plane_extraction.sh [config] bash pxwplanar/gt_creation/scripts/scannetpp_render_planes.sh # -> rendered.h5 per scene bash pxwplanar/gt_creation/scripts/scannetpp_render_depth.sh # -> rendered_depth.h5 per scene # hypersim_* analogues plus hypersim_raycast_depth.sh; the outdoor datasets # (synthia_*, vkitti2_*) have extraction scripts only (they write their H5 directly) ``` -------------------------------- ### Stage 2: Segment signals into plane labels (segment_signals_to_planes.py) Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Converts the signals from stage 1 into one planes.h5 per scene. Point --output_root at paths.ours_planes_root because stage 3 looks there for the 'ours' predictions. The command is shardable across SLURM jobs using --part_id and --num_parts. ```bash python pxwplanar/inference/planarity/segment_signals_to_planes.py \ --input_root --output_root \ [--part_id 0 --num_parts 15] ``` -------------------------------- ### Minimal API usage for MoGePlanarityInference and compute_planar_segments Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/README.md Minimal Python API usage to load the MoGe planarity model and compute planar segments. The model is loaded from the Hugging Face repo 'alpayozkan/pxwplanar-moge2-planarity' and predicts metric depth, normals, planarity probability, and other heads. The segmentation function uses a planarity threshold of 0.3, a 5-degree angle threshold, and a depth threshold of 0.025. ```python from pxwplanar.inference.planarity.moge_inference import MoGePlanarityInference from pxwplanar.shared.segmentation import compute_planar_segments import numpy as np model = MoGePlanarityInference.from_pretrained("alpayozkan/pxwplanar-moge2-planarity") res = model.predict_metric("image.jpg", num_tokens=1600, return_all_heads=True) # res: planarity_probability, depth (m), normal, points, mask, intrinsics labels, n = compute_planar_segments( (res["planarity_probability"] > 0.3).astype(np.int16), res["normal"], res["depth"], np.deg2rad(5.0), 0.025, neighbor_match_count_thresh=8) ``` -------------------------------- ### Run qualitative comparison videos Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/evaluation/scripts/README.md Shell wrapper to generate side-by-side method comparison videos. Requires ``, ``, ``, and ``; optional `[frame_skip]` (default 50) and `[max_scenes]`. Outputs `comparison_videos/{scene_id}_baseline.mp4`. ```bash ./run_qualitative.sh [frame_skip] [max_scenes] # frame_skip default: 50 ``` -------------------------------- ### Using Split Files with PyTorch Datasets Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Shows how to instantiate ScanNetPPPlaneDataset and HypersimPlanarityDataset by passing the directory containing {train,val,test}.txt files and the split name. The ScanNet++ loader is for evaluation (require_gt=False for inference-only), while the Hypersim loader is for training. Paths for RGB, plane labels, semantic labels, and depth labels are required. ```python from pxwplanar.shared.datasets import ScanNetPPPlaneDataset, HypersimPlanarityDataset # ScanNet++ (eval loader; require_gt=False for inference-only runs) train_dataset = ScanNetPPPlaneDataset( rgb_root='/path/to/scannetpp/data', plane_label_root='/path/to/plane_gt_rendered', # /rendered.h5 sem_label_root='/path/to/plane_gt_rendered', # /rendered_sem.h5 (optional) depth_label_root='/path/to/plane_gt_rendered', # /rendered_depth.h5 split_txt_dir='splits/scannetpp', split='train', ) # Hypersim (training loader) val_dataset = HypersimPlanarityDataset( root_dir='/path/to/hypersim', plane_label_root='/path/to/hypersim_plane_gt', filtered_csv_path='/path/to/filtered_split.csv', split='val', ) ``` -------------------------------- ### Run quantitative benchmark Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/evaluation/scripts/README.md Python entry point for the quantitative evaluation benchmark. Invoke with the `--methods` flag to specify which methods to evaluate (e.g., `gt` and `ours`). ```bash python pxwplanar/evaluation/quantitative/evaluate_all_baselines.py --methods gt ours ``` -------------------------------- ### Training a Model with train.txt Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Loads the training split using the 'train' split name and creates a DataLoader with batch size 32 and shuffling enabled. ```python # Use train.txt for training train_dataset = load_dataset(split='train') train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True) ``` -------------------------------- ### Run 3D plane comparison renders Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/evaluation/scripts/README.md Shell wrapper for GT-vs-prediction 3D plane renders for ScanNet++ scenes. Accepts optional `[scene_list]`, `[output_root]`, and `[checkpoint]`; defaults are `pxwplanar/evaluation/qualitative/scannetpp_vis_scenes.txt`, `paths.vis3d_root`, and `paths.planarity_model_path` respectively. ```bash ./run_3d_comparison.sh [scene_list] [output_root] [checkpoint] ``` -------------------------------- ### Create custom batch splits for Hypersim Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Navigate to hypersim and run split_scenes.py to create batch splits for parallel processing. Modify N (default 100) and REVERSE_ORDER (default False) in the script. ```bash cd hypersim python split_scenes.py # Modify split_scenes.py: # - N: Number of splits (default: 100) # - REVERSE_ORDER: Reverse scene order (default: False) ``` -------------------------------- ### Hypersim Plane Rendering Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for rendering planes per camera. Accepts optional params_root, plane_root, output_root, frame_skip, python_script, and metadata_csv; python_script defaults to ../hypersim/rendering.py, frame_skip to 1, and metadata_csv to pxwplanar/shared/datasets/metadata_camera_parameters.csv. Outputs rendered_planes_.h5 per scene. ```bash ./hypersim_render_planes.sh [params_root] [plane_root] [output_root] \ [frame_skip] [python_script] [metadata_csv] # python_script default: ../hypersim/rendering.py (relative to the scripts dir); frame_skip default: 1 # metadata_csv default: pxwplanar/shared/datasets/metadata_camera_parameters.csv ``` -------------------------------- ### Validation During Training with val.txt Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Loads the validation split using the 'val' split name and creates a DataLoader with batch size 32 and shuffling disabled. ```python # Use val.txt for validation val_dataset = load_dataset(split='val') val_loader = DataLoader(val_dataset, batch_size=32, shuffle=False) ``` -------------------------------- ### SYNTHIA and VKITTI2 Plane Extraction Scripts Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch scripts for plane extraction from outdoor datasets (SYNTHIA and VKITTI2). Both accept optional --config and --test_run arguments; output_root is read from the dataset YAML and raw input roots from paths.py. SYNTHIA_RAW or --train_root/--test_root can override the raw path. ```bash ./synthia_plane_extraction.sh [--config ../configs/synthia_default.yml] ``` ```bash ./vkitti2_plane_extraction.sh [--config ../configs/vkitti2_default.yml] ``` -------------------------------- ### ScanNet++ Video Generation Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for generating visualization videos from rendered plane H5s. Accepts optional h5_root, rgb_root, output_root, and fps; fps defaults to 5. ```bash ./scannetpp_video_gen.sh [h5_root] [rgb_root] [output_root] [fps] # fps default: 5 ``` -------------------------------- ### Final Evaluation with test.txt Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Loads the test split using the 'test' split name and creates a DataLoader with batch size 1 and shuffling disabled. ```python # Use test.txt for final evaluation test_dataset = load_dataset(split='test') test_loader = DataLoader(test_dataset, batch_size=1, shuffle=False) ``` -------------------------------- ### Regenerate splits command Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/SPLITS_SUMMARY.txt Run this script to regenerate the train/val/test split files. Requires the script to be present in the project root. ```bash python create_train_val_test_splits.py ``` -------------------------------- ### Loading Split Files in Python Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Loads train/val split text files containing scene names. The first block reads a train split with a context manager and filters empty lines; the second uses pathlib's read_text() to load a validation split. Both print or store the list of scene identifiers. ```python # Load train scenes with open('splits/scannetpp/train.txt', 'r') as f: train_scenes = [line.strip() for line in f if line.strip()] print(f"Loaded {len(train_scenes)} training scenes") # Or using pathlib from pathlib import Path split_file = Path('splits/hypersim/val.txt') val_scenes = split_file.read_text().strip().split('\n') ``` -------------------------------- ### Run planarity inference script Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/inference/scripts/README.md Shell wrapper for per-image planarity prediction on a folder of images. Takes model path, input directory, and output directory as arguments. Outputs raw probability maps (.npy), binary masks (.png), and visualizations in subdirectories. ```bash ./run_planarity_inference.sh ``` -------------------------------- ### Batch Processing with Hypersim Splits Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Commands for processing one batch of scenes from the 100-way split files. The first runs the extraction script on a single scene list; the second submits all 100 batches to SLURM using a for loop. The wrapper script takes a scene list and reads roots from the config. ```bash # Process one batch (the wrapper takes a scene list; roots come from the config) bash pxwplanar/gt_creation/scripts/hypersim_plane_extraction.sh \ splits/hypersim/scene_splits/split_0/scene_list_0.txt # Submit all batches to SLURM for i in {0..99}; do sbatch pxwplanar/gt_creation/scripts/hypersim_plane_extraction.sh \ splits/hypersim/scene_splits/split_$i/scene_list_$i.txt done ``` -------------------------------- ### ScanNet++ GT Depth Rendering Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for rendering depth from the full scene mesh. Accepts optional input_root, output_root, and frame_skip; defaults are /data, paths.scannetpp_rend_plane_path, and 25. Keep frame_skip equal to step 2 for index alignment. CPU-only, no GL required. ```bash ./scannetpp_render_depth.sh [input_root] [output_root] [frame_skip] # input_root default: /data # output_root default: paths.scannetpp_rend_plane_path # frame_skip default: 25 (keep equal to step 2 so the H5s stay index-aligned) ``` -------------------------------- ### ScanNet++ Plane Rendering Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for rendering planes into H5 files. Accepts optional input_root, plane_root, output_root, and frame_skip; defaults are /data, paths.scannetpp_plane_path, paths.scannetpp_rend_plane_path, and 25 respectively. Calls render_scene.py to produce rendered.h5 with plane IDs and frame_ids. ```bash ./scannetpp_render_planes.sh [input_root] [plane_root] [output_root] [frame_skip] # input_root default: /data # plane_root default: paths.scannetpp_plane_path # output_root default: paths.scannetpp_rend_plane_path # frame_skip default: 25 ``` -------------------------------- ### Parallel GT Generation with scene_splits Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Iterates over 100 split IDs and calls process_scenes on each scene list file for batch processing. ```bash # Use scene_splits for batch processing for split_id in {0..99}; do process_scenes "hypersim/scene_splits/split_${split_id}/scene_list_${split_id}.txt" done ``` -------------------------------- ### Load scene list in Python Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/SPLITS_SUMMARY.txt Reads a split file (e.g., scannetpp/train.txt) into a list of scene IDs, stripping newlines. Use this to load any split file from the splits directory. ```python with open('splits/scannetpp/train.txt') as f: train_scenes = [line.strip() for line in f] ``` -------------------------------- ### Hypersim Raycasted Depth Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for raycasting depth from Hypersim planes. Accepts optional params_root, plane_root, output_root, frame_skip, python_script, metadata_csv, and depth_type; depth_type can be zdepth (default, outputs to *_raycast/) or euclidean (outputs to *_raycast_euc/). ```bash ./hypersim_raycast_depth.sh [params_root] [plane_root] [output_root] \ [frame_skip] [python_script] [metadata_csv] [depth_type] # depth_type: zdepth (default, -> *_raycast/) or euclidean (-> *_raycast_euc/) ``` -------------------------------- ### ScanNet++ Plane Extraction Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for plane extraction from ScanNet++ meshes. Accepts optional config, input_root, and output_root arguments; config defaults to ../configs/scannetpp_default.yml. Outputs planes.json and planes.ply per scene. ```bash ./scannetpp_plane_extraction.sh [config] [input_root] [output_root] # config default: ../configs/scannetpp_default.yml ``` -------------------------------- ### Run segmentation prediction script Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/inference/scripts/README.md Shell wrapper for the full RGB to MoGe to plane-segmentation pipeline over scene folders. Takes model path, input root, output root, and optional frame_skip (default 50). Outputs label arrays (.npy) and visualizations (.png) per scene. ```bash ./run_segmentation.sh [frame_skip] # frame_skip default: 50 ``` -------------------------------- ### Hypersim Plane Extraction Script Usage Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/pxwplanar/gt_creation/scripts/README.md Batch script for plane extraction from Hypersim data. Accepts optional config, input_root, and output_root; config defaults to ../configs/hypersim_default.yml. ```bash ./hypersim_plane_extraction.sh [config] [input_root] [output_root] # config default: ../configs/hypersim_default.yml ``` -------------------------------- ### Validate splits for overlap Source: https://github.com/alpayozkan/pixelwiseplanarity/blob/main/splits/README.md Python function to check that train, val, and test splits have no overlapping scene IDs. Prints total scene count if validation passes. ```python # Check no overlap between splits def validate_splits(train_file, val_file, test_file): with open(train_file) as f: train = set(line.strip() for line in f) with open(val_file) as f: val = set(line.strip() for line in f) with open(test_file) as f: test = set(line.strip() for line in f) assert len(train & val) == 0, "Train/val overlap!" assert len(train & test) == 0, "Train/test overlap!" assert len(val & test) == 0, "Val/test overlap!" total = len(train) + len(val) + len(test) print(f"✓ No overlap. Total: {total} scenes") # Run validation validate_splits('scannetpp/train.txt', 'scannetpp/val.txt', 'scannetpp/test.txt') validate_splits('hypersim/train.txt', 'hypersim/val.txt', 'hypersim/test.txt') ```