-
config.pyis now the single source of truth for paths and experiment settings.- Dataset path
- Checkpoint paths
- Output directories
- Training hyperparameters
- Evaluation thresholds
- NME normalization mode
- Alignment template and output size
-
DeepLake300W.__getitem__()now returns three values:
img, heatmaps, ptspts is the true landmark coordinate after crop and resize. Evaluation should use pts directly as GT.
evaluate.pyno longer decodes GT points from GT heatmaps.
Old behavior:
gt_pts = heatmaps_to_pts(gt_hm, IMG_SIZE)Corrected behavior:
for imgs, _gt_hm, gt_pts in loader:
...-
evaluate.pynow reports:- Mean NME
- Median NME
- Failure rate
- AUC
- Per-region pixel error
- Per-region normalized error
-
predict_align.pynow reads real GT landmarks directly and adds quantitative alignment metrics.
Change these in config.py instead of editing scripts:
EVAL_CHECKPOINT_PATH = CHECKPOINT_DIR / "hrnet_epoch_200.pth"
EVAL_OUT_DIR = TEST_DIR / "full_eval_epoch_200_fixed"
NME_NORM_TYPE = "inter_ocular"
FAILURE_THRESHOLD = 0.08
AUC_THRESHOLD = 0.08
ALIGN_CHECKPOINT_PATH = EVAL_CHECKPOINT_PATH
ALIGN_OUT_DIR = TEST_DIR / "single_predict_fixed"
ALIGN_OUTPUT_SIZE = 112python train.py
python evaluate.py
python predict_align.pyIf another script still has:
img, heatmaps = dataset[index]change it to:
img, heatmaps, pts = dataset[index]or:
img, heatmaps, _ = dataset[index]