Add masked loss support for region-of-interest driven registration#67
Merged
rohitrango merged 1 commit intomaskedlossfrom Jan 29, 2026
Merged
Add masked loss support for region-of-interest driven registration#67rohitrango merged 1 commit intomaskedlossfrom
rohitrango merged 1 commit intomaskedlossfrom
Conversation
Copilot
AI
changed the title
[WIP] Add support for masked losses
Add masked loss support for region-of-interest driven registration
Jan 29, 2026
rohitrango
added a commit
that referenced
this pull request
Jan 30, 2026
* made sure all tests still pass Signed-off-by: rohitrango <rohit.rango@gmail.com> * added preliminary keypoint support Signed-off-by: rohitrango <rohit.rango@gmail.com> * scipy tests Signed-off-by: rohitrango <rohit.rango@gmail.com> * fix few bugs here Signed-off-by: rohitrango <rohit.rango@gmail.com> * refactor smoothing to account for image and mask Signed-off-by: rohitrango <rohit.rango@gmail.com> * masked losses test cases Signed-off-by: rohitrango <rohit.rango@gmail.com> * testcases pass Signed-off-by: rohitrango <rohit.rango@gmail.com> * add docs Signed-off-by: rohitrango <rohit.rango@gmail.com> * Add masked loss support for region-of-interest driven registration (#67) Initial plan Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * ignore debug folders Signed-off-by: rohitrango <rohit.rango@gmail.com> * added keypoints docs Signed-off-by: rohitrango <rohit.rango@gmail.com> * update copyright Signed-off-by: rohitrango <rohit.rango@gmail.com> * docs Signed-off-by: rohitrango <rohit.rango@gmail.com> --------- Signed-off-by: rohitrango <rohit.rango@gmail.com> Signed-off-by: Rohit Jena <rohitrango@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.
Enables registration to be driven only by specific regions of interest by computing loss exclusively where masks are non-zero. Both fixed and moving images accept an optional mask channel.
Implementation
masked=Trueparameter"mult"(element-wise product) or"max"maskedutils.py): mask extraction, combination, and weighted loss reductionloss_type="masked_cc"or"masked_mse"prefix activates masked modegenerate_image_mask_allones()andapply_mask_to_image()for easy mask channel concatenationUsage
Testing
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.