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

55 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# SUM Parts - list an archive's contents without extracting it
#
# Used to count tiles per split, which is what turns a per-iteration benchmark
# into a wall-clock training estimate.
set -euo pipefail
ARCHIVE="${1:-$HOME/sum-parts/data/_archives/mesh.zip}"
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda activate sumparts
python - "$ARCHIVE" <<'PY'
import re
import sys
import zipfile
from collections import Counter
from pathlib import Path
path = Path(sys.argv[1])
z = zipfile.ZipFile(path)
names = z.namelist()
print(f"=== {path.name} : {len(names)} entries ===\n")
dirs = Counter()
for n in names:
p = "/".join(n.split("/")[:-1]) or "."
dirs[p] += 1
for d, c in sorted(dirs.items()):
print(f" {c:>5} {d}/")
print()
splits = Counter()
for n in names:
m = re.search(r"(?:^|/)(train|val|test|training|validation)(?:/|_)", n, re.I)
if m:
splits[m.group(1).lower()] += 1
if splits:
print("split hints:", dict(splits))
ply = [n for n in names if n.lower().endswith(".ply")]
print(f"\n.ply entries: {len(ply)}")
per_split = Counter(n.split("/")[0] for n in ply)
for s, c in sorted(per_split.items()):
print(f" {c:>4} ply in {s}/")
for n in ply[:5]:
print(f" e.g. {n}")
total = sum(i.file_size for i in z.infolist())
print(f"\nuncompressed total: {total / 1e9:.2f} GB")
PY