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
2.0 KiB
Bash
53 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
# SUM Parts - make the extracted dataset match what the loader globs for
|
|
#
|
|
# pcl.zip ships splits named train / validate / test. The dataset class asks for
|
|
# split='val':
|
|
#
|
|
# if split == "train" or split == 'val':
|
|
# self.data_list = glob.glob(os.path.join(data_root, split, "*.ply"))
|
|
#
|
|
# so `validate/` is never found and validation silently runs on 0 samples --
|
|
# the same quiet failure mode as a wrong data_root. Symlink val -> validate.
|
|
#
|
|
# Track layout after extraction:
|
|
# face_labeling/{face_cen,possion,random,texsp}_pcl/ -> 13-class triangle
|
|
# pixel_labeling/{possion,random,texsp}_pcl/ -> 20-class texture
|
|
#
|
|
# cfgs/sumv2_triangle uses data_root ../../data/sumv2_tri_texpcl, i.e. the
|
|
# triangle track sampled with the texture-superpixel sampler:
|
|
# face_labeling/texsp_pcl
|
|
set -euo pipefail
|
|
|
|
DATA="$HOME/sum-parts/data"
|
|
|
|
echo "=== linking val -> validate in every track ==="
|
|
for track in "$DATA"/face_labeling/*_pcl "$DATA"/pixel_labeling/*_pcl; do
|
|
[ -d "$track" ] || continue
|
|
if [ -d "$track/validate" ] && [ ! -e "$track/val" ]; then
|
|
ln -sfn validate "$track/val"
|
|
echo " linked $(basename "$(dirname "$track")")/$(basename "$track")/val -> validate"
|
|
fi
|
|
done
|
|
|
|
echo
|
|
echo "=== split sizes ==="
|
|
printf '%-40s %6s %6s %6s\n' "track" "train" "val" "test"
|
|
for track in "$DATA"/face_labeling/*_pcl "$DATA"/pixel_labeling/*_pcl; do
|
|
[ -d "$track" ] || continue
|
|
rel="$(basename "$(dirname "$track")")/$(basename "$track")"
|
|
# -L so the val symlink is followed; plain find would report 0 and look
|
|
# like the link did not work
|
|
tr=$(find -L "$track/train" -name '*.ply' 2>/dev/null | wc -l)
|
|
va=$(find -L "$track/val" -name '*.ply' 2>/dev/null | wc -l)
|
|
te=$(find -L "$track/test" -name '*.ply' 2>/dev/null | wc -l)
|
|
printf '%-40s %6s %6s %6s\n' "$rel" "$tr" "$va" "$te"
|
|
done
|
|
|
|
echo
|
|
echo "=== recommended data_root ==="
|
|
echo " triangle (13 classes) : $DATA/face_labeling/texsp_pcl"
|
|
echo " texture (20 classes) : $DATA/pixel_labeling/texsp_pcl"
|
|
|
|
echo "SPLIT DONE"
|