Prep for new Models#61
Open
robert-graf wants to merge 18 commits into
Open
Conversation
…value not exists.
Contributor
There was a problem hiding this comment.
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_Configwithhas_c1andsacrum_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.