Reproduces the SUM Parts (CVPR 2025) face-labeling benchmark on a single consumer GPU, then applies it to drone-photogrammetry road survey meshes. Verified on RTX 3060 12GB / WSL2 Ubuntu 22.04 / CUDA 11.8 / torch 2.0.1: - CUDA extensions build (pointnet2_batch, pointops, chamfer_dist, emd, subsampling) - PointNet 100 epochs reaches mIoU 17.19, matching the paper's reported 15.1 - OBJ -> PLY conversion round-trips through the model and yields per-point predictions Four upstream source patches, all idempotent, originals preserved: - numpy aliases removed in 1.24 (np.long etc.) and collections ABCs moved in python 3.10 - the blind test split ships label = -1, which crashed ConfusionMatrix - mode=val referenced `epoch` before assignment Documents the traps that cost the most time, including VRAM overflow silently falling back to host RAM on WSL2 (25-100x slowdown, no OOM) and the colour scale mismatch between r/g/b float32 and red/green/blue uint8. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53 lines
1.8 KiB
Bash
53 lines
1.8 KiB
Bash
#!/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
|
|
# <data_root>/{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"
|