Files
nbrightandClaude Opus 5 609d9a6972 Add SUM Parts reproduction and Seosan Myeongcheon application pipeline
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>
2026-08-21 10:29:25 +09:00

56 lines
1.8 KiB
Bash

#!/usr/bin/env bash
# SUM Parts - Korean data proof of concept
#
# Scope is deliberately one tile. The point is to answer "does our data go
# through this pipeline at all", not to measure anything. Nothing here produces
# a number worth quoting.
#
# Source: Seosan Myeongcheon, 구역2(미션7)/BlockYBA
# ContextCapture OBJ, 4,553,583 faces, 17 texture atlases
# local metric coords, EPSG:5186+9999, SRSOrigin 155184.79/469705.03/149.57
# block extent 465.36 x 487.46 x 27.55 m
#
# We cut one 252 m tile out of the middle -- 252 m is the size of the tile
# SUM Parts ships, so the point density and neighbourhood radii line up with
# what the cfgs assume.
set -euo pipefail
CONDA_ROOT="$HOME/miniconda3"
ENV_NAME="sumparts"
SCRIPTS="/mnt/d/MYCLAUDE_PROJECT/sum-parts-test/scripts"
SRC="/mnt/d/MyProject_대용량샘플/02. 데이터/01. 서산 명천_08월/02. 본태모델/구역2(미션7)/BlockYBA/BlockYBA.obj"
OUT_DIR="$HOME/sum-parts/data/korea_poc"
OUT="$OUT_DIR/seosan_BlockYBA_tile0.ply"
# centre 252 m tile of the block's 465 x 487 m footprint
X0=300; Y0=720; X1=552; Y1=972
# demo_texsp_pcl.ply carries 471,726 points over a 252 m tile; match it so the
# voxel_size 0.02 / voxel_max 64000 settings behave the same way
POINTS=470000
source "$CONDA_ROOT/etc/profile.d/conda.sh"
conda activate "$ENV_NAME"
if [ ! -f "$SRC" ]; then
echo "error: source mesh not found:" >&2
echo " $SRC" >&2
exit 1
fi
mkdir -p "$OUT_DIR"
echo "=== converting one 252m tile ==="
python "$SCRIPTS/mesh_to_ply.py" "$SRC" "$OUT" \
--points "$POINTS" \
--bbox "$X0" "$Y0" "$X1" "$Y1" \
--label 0
echo
echo "=== verifying against the SUM Parts schema ==="
python "$SCRIPTS/check_ply.py" "$OUT" \
"$HOME/sum-parts/data/pcl/face_labeling_pcl/demo_texsp_pcl.ply"
echo "POC CONVERT DONE"