Feat(Segmentation): algorithm-dependent model constraints - #1061
Open
jdeschamps wants to merge 3 commits into
Open
Feat(Segmentation): algorithm-dependent model constraints#1061jdeschamps wants to merge 3 commits into
jdeschamps wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1061 +/- ##
==========================================
- Coverage 87.59% 87.57% -0.03%
==========================================
Files 251 252 +1
Lines 8903 8914 +11
==========================================
+ Hits 7799 7806 +7
- Misses 1104 1108 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 24, 2026
This was referenced Aug 25, 2026
jdeschamps
force-pushed
the
jd/feat/model_constraints_from_algo
branch
from
August 25, 2026 10:35
c85d3a9 to
98f961d
Compare
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.
Semantic segmentation requires different model constraints from restoration algorithms because the model output has different shape than the target arrays. Indeed, model output are logits/probability per class while the target are class labels (no "C" dimension).
This PR changes the parameter passed to
get_model_constraintsfrom the model configuration to the algorithm configuration.It also adds the segmentation constraints class.
Changes
Added
validate_target_channelsneeds to ensure that targets are class labels by checking it is a singleton channelModified
get_model_constraintsto take in the algorithm configuration and accommodate segmentation constraints.SupportedAlgorithmsto accommodate segmentation, reorganizes order.ConfigurationandCAREamistto pass the correct configuration (algorithm, not model) toget_model_constraintsNotes
Part of splitting #986 into smaller PRs.