Skip to content

JIT compiled gaussian mixture model (GMM)#1802

Merged
wyli merged 101 commits intoProject-MONAI:devfrom
charliebudd:gmm-implementation
Jun 20, 2021
Merged

JIT compiled gaussian mixture model (GMM)#1802
wyli merged 101 commits intoProject-MONAI:devfrom
charliebudd:gmm-implementation

Conversation

@charliebudd
Copy link
Copy Markdown
Collaborator

@charliebudd charliebudd commented Mar 18, 2021

Introduces a new feature, gaussian mixture modeling. The algorithm takes some initial labeling and uses a mixture of gaussians to approximate each classes distribution in the feature space. Each unlabled element is then asigned a label based on which classes distibution it fits best.

This is implemented as a c++/cuda extention, but currently it is only implemented in cuda. It may be run with any spatial dimension, channel count, class count, and mixture component count (number of gaussians in each classes mixture).

This PR also introduces JIT compilation for c++/cuda extentions. The source code for this extention is not compiled when monai is installed. When an end user comes to create a GMM python object for the first time, the code will be compiled. This allows us to take parameters passed to the GMM python object and use these as compile time constants in the build allowing the compiler to provide more optimized binaries. A new build is created and stored for each configuration the user asks for. Once a configuration has been built, the JIT system will provide this binary for all subsequent requests.

see #1601

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: charliebudd <[email protected]>
Signed-off-by: chaliebudd <[email protected]>
Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks -- I put some comments on the load_module API. now we have the packaging tests, it's time to revisit this PR and merge it soon...

Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks, apart from the minor comments and ci errors, the module looks good to me

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Jun 20, 2021

/integration-test
/black

Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the gmm-implementation branch from 86486c9 to 0eb7cd0 Compare June 20, 2021 17:30
wyli added 2 commits June 20, 2021 18:50
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the gmm-implementation branch from 24e199f to 91ea107 Compare June 20, 2021 18:01
Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli force-pushed the gmm-implementation branch from fdbf94b to 62eaafb Compare June 20, 2021 19:08
@wyli wyli enabled auto-merge (squash) June 20, 2021 19:58
@wyli wyli disabled auto-merge June 20, 2021 20:10
@wyli wyli enabled auto-merge (squash) June 20, 2021 20:14
@wyli wyli merged commit 67e68f6 into Project-MONAI:dev Jun 20, 2021
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