Skip to content

Prep for new Models#61

Open
robert-graf wants to merge 18 commits into
mainfrom
loading
Open

Prep for new Models#61
robert-graf wants to merge 18 commits into
mainfrom
loading

Conversation

@robert-graf
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the segmentation pipeline for new model variants by extending inference configuration (C1/sacrum handling) and adding optional auto-cropping/timing instrumentation around the semantic/instance pipeline.

Changes:

  • Extend Segmentation_Inference_Config with has_c1 and sacrum_ids, and thread these into postprocessing.
  • Add optional VIBESeg-based auto-cropping and per-stage timing logs to process_img_nii.
  • Refactor/robustify parts of semantic/instance/postprocessing (e.g., canal-empty guard, CC assignment logic, label mapping cleanup).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
spineps/utils/seg_modelconfig.py Adds new inference-config knobs (has_c1, sacrum_ids) to support upcoming model label sets.
spineps/seg_run.py Introduces auto-crop + timing, CT-specific preprocessing tweak, and passes new config values into postprocessing.
spineps/seg_model.py Minor cleanup and improved failure logging in model run().
spineps/phase_semantic.py Adds a guard for empty canal segmentation in inferior-cleaning logic.
spineps/phase_pre.py Adds compute_crop() wrapper around VIBESeg with backward-compat handling.
spineps/phase_post.py Adds disable_c1/sacrum_ids, refactors postprocessing order and missing-CC assignment logic.
spineps/phase_labeling.py Removes unused sacrum-related snippet in labeling step.
spineps/phase_instance.py Adjusts corpus detection checks, improves logging, and simplifies label mapping/cutout code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spineps/seg_run.py
Comment thread spineps/seg_run.py Outdated
Comment thread spineps/seg_run.py
Comment thread spineps/seg_run.py Outdated
Comment thread spineps/phase_post.py
Comment thread spineps/seg_run.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants