#!/usr/bin/env bash # SUM Parts - lay the demo tile out as a train/val/test split # # demo.zip ships a single showcase tile, not a split. The dataset class globs # /{train,val,test}/*.ply, so nothing runs until that structure # exists. # # WARNING: this puts the SAME tile in all three splits. That is fine for a # pipeline smoke test (does the chain survive?) and meaningless as a # measurement -- every val/test number it produces is train-set memorisation. # Do not quote any mIoU from this layout. # # Track selection follows the cfg directory name: cfgs/sumv2_triangle uses # data_root ../../data/sumv2_tri_texpcl, i.e. the triangle (face-label) track # sampled with the texture-superpixel sampler -> face_labeling_pcl/*_texsp_pcl.ply set -euo pipefail DATA="$HOME/sum-parts/data" # track name -> source ply declare -A SRC=( [sumv2_tri_texpcl]="$DATA/pcl/face_labeling_pcl/demo_texsp_pcl.ply" [sumv2_tex_texpcl]="$DATA/pcl/texture_labeling_pcl/demo_texsp_pcl.ply" ) for track in "${!SRC[@]}"; do src="${SRC[$track]}" if [ ! -f "$src" ]; then echo "skip $track: $src not found" continue fi echo "=== $track <- $(basename "$src") ===" for split in train val test; do mkdir -p "$DATA/$track/$split" # hardlink: same tile in three splits, one copy on disk ln -f "$src" "$DATA/$track/$split/$(basename "$src")" done # a stale presample cache silently overrides the ply files rm -rf "$DATA/$track/processed" done echo echo "=== layout ===" for track in "${!SRC[@]}"; do [ -d "$DATA/$track" ] || continue for split in train val test; do n=$(find "$DATA/$track/$split" -name '*.ply' 2>/dev/null | wc -l) printf '%-20s %-6s %s ply\n' "$track" "$split" "$n" done done echo "SPLIT DONE"