Project-MONAI / Project-MONAI/MONAI

Native transform for computing image registration (classical/instance-optimization)

Open
#9,008 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.

MONAI has strong support for applying transforms (Affine, Warp, DVF2DDF) and for training registration networks (GlobalNet/LocalNet/RegUNet + registration losses), but no way to directly compute a classical/instance-level registration for a single image pair although many DL applications require it as pre-processing step.

Getting this today means round-tripping through ANTsPy/SimpleITK/itk-elastix, which brings its own convention mismatches (LPS/RAS, physical vs. voxel space, center-of-rotation, composition order e.g #4281, #8467 — both since resolved, but illustrative of how easy this is to get subtly wrong). itk_torch_bridge helps with affine import/export but doesn't cover DDF import from an external tool.

Describe the solution you'd like
A Compose-compatible transform that parametrizes a deformation (affine, B-spline grid, or dense DDF) as a differentiable tensor and optimizes it directly against existing losses (LocalNormalizedCrossCorrelationLoss, GlobalMutualInformationLoss, BendingEnergyLoss) with a multi-resolution schedule, basically a GPU-native "instance optimization" step, not a full SyN reimplementation, and no ITK round-trip required.

Describe alternatives you've considered
We could more simply consider a thin, well-tested wrapper transform around known registration libraries such as ANTsPy/SimpleITK/itk-elastix that completes what itk_torch_bridge already started: convert fixed/moving MetaTensors to the external library's image type (largely doable today via metatensor_to_itk_image / ants.from_numpy), calling the classical optimizer, and converting the resulting DDF back into MONAI's convention correctly and with test coverage, so this isn't reinvented (and re-debugged) per project. So a different tool for a different job vs. the instance-optimization idea above which would require more validation, but would enable fully end-to-end training applications.

Additional context
Happy to help implement either. Wanted to check appetite/scope before starting a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Affine, Warp, and DVF2DDF transforms and the LocalNormalizedCrossCorrelationLoss, GlobalMutualInformationLoss, and BendingEnergyLoss entry points. Compare the native instance-optimization proposal with the wrapper alternative using metatensor_to_itk_image and ants.from_numpy. Done requires an agreed scope plus tests covering MetaTensor conventions, DDF conversion, and multi-resolution behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.