added fused classifier head

This commit is contained in:
rpotter6298
2026-03-02 06:44:22 +01:00
parent fd1452c187
commit 080b5999fa
11 changed files with 583 additions and 21 deletions
+24 -13
View File
@@ -1,34 +1,45 @@
#!/usr/bin/env bash
set -euo pipefail
# Runs two back-to-back Hypertower mode comparisons with ROI cropping:
# 1) GT masks
# 2) UNet masks
# Six V2HyperTower runs using GT ROI crop:
# binary × {ensemble, bilateral} (runs 1-2)
# multiclass × {ensemble, bilateral} (runs 3-4)
# multiclass × {ensemble, bilateral} + balanced (runs 5-6)
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "$ROOT_DIR"
CROP_ARGS=(
--img-crop-manifest manifest.csv
--img-crop-gt
)
COMMON_ARGS=(
--eval-modes binary multiclass
--tower-modes single ensemble bilateral
--epochs 40
--n-splits 5
--batch-size 8
--backbone refugelike
--img-crop-manifest manifest.csv
)
echo "[1/2] Starting GT ROI run..."
# Runs 1-4: binary + multiclass, ensemble + bilateral, no balanced sampling
echo "[1/2] GT ROI — binary + multiclass, ensemble + bilateral..."
python3 scripts/basic_analysis/compare_hypertower_modes.py \
"${COMMON_ARGS[@]}" \
--img-crop-gt \
--run-name v2_modes_full_40ep_5fold_roi_gt_holdout
"${CROP_ARGS[@]}" \
--eval-modes binary multiclass \
--tower-modes ensemble bilateral \
--run-name v2_modes_gt_40ep_5fold_no_single_v2
echo "[2/2] Starting UNet ROI run..."
# Runs 5-6: multiclass only, ensemble + bilateral, balanced sampling
# (reuse the crop cache built during runs 1-4)
echo "[2/2] GT ROI — multiclass, ensemble + bilateral, balanced sampling..."
python3 scripts/basic_analysis/compare_hypertower_modes.py \
"${COMMON_ARGS[@]}" \
--img-crop-weights models/v2/refuge/segmentation/per_image_refuge_build/best.pt \
--img-crop-normalize per_image \
--run-name v2_modes_full_40ep_5fold_roi_unet_perimage_refugebuild_holdout
"${CROP_ARGS[@]}" \
--eval-modes multiclass \
--tower-modes ensemble bilateral \
--balanced-sampling \
--persist-img-crop-cache \
--run-name v2_modes_gt_40ep_5fold_multiclass_balanced_v2
echo "All runs complete."