Skip to content
This repository was archived by the owner on Nov 11, 2026. It is now read-only.

Plate figure: drop the cut line's side walls - #612

Merged
haowjy merged 1 commit into
mainfrom
jimyao/p1769-plate-side-walls
Nov 5, 2026
Merged

haowjy merged 1 commit into
mainfrom
jimyao/p1769-plate-side-walls

Conversation

@haowjy

@haowjy haowjy commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Changelog

  • Fixed: the growth-plate comparison figure in training/plate-finetune/README.md no longer draws long vertical lines at the ends of the fine-tune's cut line (OA6-11RK V223, OA8-21L V194, OA6-5RK V163).

Why

After #605 the fine-tune cut line was drawn through every voxel of the voted region's cut-side boundary. That boundary also holds the region's side walls, where the region ends inside the tibia, and three panels showed them as tall vertical lines that read as errors.

Design decisions

  1. Both lines are masked exactly as score.py masks them. score.py now exposes scored_lines (the label cut and the predicted boundary, outside ignore voxels and columns), used by cutline_distance and by the figure, so the figure can't drift from the scorer. The reference line now has gaps where the score ignores voxels or columns.
  2. The drawn fine-tune line keeps only the region's distal face: scored boundary voxels whose +W neighbour is envelope outside the region. Ruled out: dropping only voxels facing ignored voxels; the walls face real non-region envelope, so that left them in place.

Walkthrough

Regenerate the figure

  1. Setup: this branch; ~/experiments/plate-data and ~/experiments/plate-figure/stock-growth-plate present.
  2. cd training/plate-finetune && uv run --group figure python make_comparison_figure.py (about 6 min, CPU).
  3. Expect the same per-section scores as main: 37.9, 10.5, 21.0, 47.0, 33.2, 21.0, 10.5, 10.5 µm. Rows 5, 7 and 8 have no vertical line at the end of the blue line.

What changed

  • score.py: scored_lines split out of cutline_distance; scoring is unchanged.
  • make_comparison_figure.py: release_prediction builds both lines through scored_lines and keeps the distal face of the predicted one.
  • Figures: PNG and WebP re-rendered; README caption updated.

Risk and where to look

  • Breaks or changes: only the README figure. Scores are identical.
  • Where to look: the distal-face filter in release_prediction. A steep piece of a real cut line would also be dropped from the drawing (not from the score).

Knowledge layers, docs and deletions

  • Docs: training/plate-finetune/README.md: caption says which voxels each line is drawn through.
  • Deleted: None.

Contract changes

None. packages/contracts is untouched.

Verification

Left out

  • The scorer counts the side-wall voxels as predicted boundary (they enter the prediction-to-label distances when within 30 voxels of the label cut). Not changed here, since it would move the published scores.

…e.py does

Both lines now come from score.scored_lines, split out of cutline_distance, so the
figure uses the scorer's masking. The drawn fine-tune line keeps only the region's
distal face; the region's side walls, where it ends inside the tibia, read as long
vertical errors on OA6-11RK V223, OA8-21L V194 and OA6-5RK V163. Scores unchanged.
@haowjy
haowjy merged commit 9756615 into main Nov 5, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant