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

50 lines
1.7 KiB
Bash

#!/usr/bin/env bash
# SUM Parts - WSL2 conda env setup (no sudo required)
#
# NOTE: Anaconda's "defaults" channels (repo.anaconda.com/pkgs/*) require accepting
# a Terms of Service that carries commercial-license obligations for larger orgs.
# This script deliberately avoids them entirely: conda-forge for packages,
# nvidia channel for the CUDA toolkit, both with --override-channels.
set -euo pipefail
CONDA_ROOT="$HOME/miniconda3"
ENV_NAME="sumparts"
export PATH="$CONDA_ROOT/bin:$PATH"
source "$CONDA_ROOT/etc/profile.d/conda.sh"
echo "=== [0/5] pin channels to conda-forge (drop anaconda defaults) ==="
conda config --remove channels defaults 2>/dev/null || true
conda config --add channels conda-forge
conda config --set channel_priority strict
echo "=== [1/5] create env: $ENV_NAME (python 3.10) ==="
conda create -n "$ENV_NAME" -y --override-channels -c conda-forge python=3.10
conda activate "$ENV_NAME"
echo "=== [2/5] CUDA Toolkit 11.8 (nvidia channel, no sudo) ==="
conda install -y --override-channels -c "nvidia/label/cuda-11.8.0" cuda-toolkit
echo "=== [3/5] PyTorch 2.0.1 + cu118 (pip wheels) ==="
pip install --no-cache-dir \
torch==2.0.1+cu118 torchvision==0.15.2+cu118 \
--index-url https://download.pytorch.org/whl/cu118
echo "=== [4/5] pin numpy<2 (torch 2.0.x is ABI-incompatible with numpy 2) ==="
pip install --no-cache-dir "numpy<2"
echo "=== [5/5] verify ==="
which nvcc
nvcc --version | tail -2
python - <<'PY'
import torch, numpy
print("torch :", torch.__version__)
print("cuda :", torch.version.cuda)
print("avail :", torch.cuda.is_available())
print("device :", torch.cuda.get_device_name(0) if torch.cuda.is_available() else None)
print("numpy :", numpy.__version__)
PY
echo "ENV DONE"