#!/usr/bin/env bash # SUM Parts - A/B the validation protocol on the same checkpoint # # Training reported val_miou 17.19 @E90, but a standalone mode=val gave 4.20. # The only difference is dataset.val.voxel_max: # # A) 64000 what training used after the memory mitigation (ยง3-2-1), # i.e. validation on a 64k-point crop, matching the training # input size # B) null the cfg's own default: the whole ~700k-point tile in one # forward pass # # PointNet pools a single global feature over whatever it is given, so input # size is not a neutral knob -- this measures how much it moved the number. set -uo pipefail CONDA_ROOT="$HOME/miniconda3" SEG="$HOME/sum-parts/semantic_segmentation/PointNeXt_bundle/examples/segmentation" DATA="$HOME/sum-parts/data/face_labeling/texsp_pcl" OUT="$HOME/sum-parts/runs/val_ab" source "$CONDA_ROOT/etc/profile.d/conda.sh" conda activate sumparts export WANDB_MODE=disabled WANDB_SILENT=true CUDA_HOME="$CONDA_PREFIX" export PYTORCH_CUDA_ALLOC_CONF="garbage_collection_threshold:0.7,max_split_size_mb:128" mkdir -p "$OUT" cd "$SEG" CKPT="${CKPT:-$(find "$SEG/log/sumv2_triangle" -name '*_ckpt_best.pth' -printf '%T@ %p\n' \ | sort -rn | head -1 | cut -d' ' -f2-)}" echo "checkpoint: $(basename "$CKPT")" echo run_val() { local tag="$1"; shift local log="$OUT/val_${tag}.log" python -u main.py \ --cfg ../../cfgs/sumv2_triangle/pointnet.yaml \ mode=val \ --pretrained_path "$CKPT" \ dataset.common.data_root="$DATA" \ wandb.use_wandb=False \ val_batch_size=1 \ "$@" \ > "$log" 2>&1 local rc=$? if [ $rc -ne 0 ]; then echo " [$tag] FAILED rc=$rc" tail -6 "$log" return 1 fi grep -aA1 'Best ckpt' "$log" | tail -2 | sed "s/^/ [$tag] /" } echo "=== A: voxel_max 64000 (what training measured) ===" run_val capped dataset.val.voxel_max=64000 echo echo "=== B: voxel_max null (cfg default, whole tile) ===" run_val full echo echo "logs in $OUT"