-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cellprofiler app + plugin #1724
Merged
tangy5
merged 34 commits into
Project-MONAI:main
from
binliunls:add-vsita2d-to-cellprofiler
Aug 30, 2024
Merged
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
563393f
first version of cellprofiler plugin
binliunls 386307c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9657320
add vista support
binliunls 02745d5
fix some issues
binliunls ab24f92
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] dcfe2b1
update the plugin part
binliunls a611b4f
Merge branch 'add-vsita2d-to-cellprofiler' of https://github.com/binl…
binliunls 25a3f33
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6d97251
fix format
binliunls a370cfa
Merge branch 'add-vsita2d-to-cellprofiler' of https://github.com/binl…
binliunls 23e6d7e
fix plugin doc
binliunls 5b438bd
remove redundant imports
binliunls 5852e0a
add the test case
f37c05d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 71a13a9
add mock test
binliunls ca99c89
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0a20ba1
add unit test
1f1045d
add readme for cellprofiler plugin
binliunls d7adf0d
add the cellprofiler image
binliunls c80c53d
update readme file
binliunls 02bbc82
remove the unnecessary file
binliunls ed36f3a
fix import
binliunls ec832fd
add return
binliunls ad41a8d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] becf05c
update vista app readme
binliunls 8b031d5
Merge branch 'add-vsita2d-to-cellprofiler' of https://github.com/binl…
binliunls 4679ac7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6ac2f48
Merge branch 'main' into add-vsita2d-to-cellprofiler
binliunls 79de3fe
rename the vista app to vista2d app
binliunls 3bba98b
fix vista to vista2d
binliunls 99e9e35
fix the bundle name from cell_vista_segmentation to vista2d
binliunls 9975265
add vista2d model
binliunls 57d027d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 71bbd07
fix readme issue
binliunls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
Copyright (c) MONAI Consortium | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# MONAI Label Plugin for CellProfiler | ||
CellProfiler is a free open-source software designed to enable biologists without training in computer vision or programming to quantitatively measure phenotypes from thousands of images automatically. | ||
|
||
CellProfiler is designed to serve biologists as well as bioimage analysts who want a flexible system that is easy to deploy to collaborators who lack computational skills. It is commonly used for small-scale experiments involving a few images but is also routinely run on millions of images using cluster or cloud computing resources at some of the largest pharmaceutical companies and academic screening centers in the world. | ||
|
||
<img src="../../docs/images/cellprofiler.jpg" width=70% /> | ||
|
||
### Table of Contents | ||
- [Supported Applications](#supported-applications) | ||
- [Installing CellProfiler](#installing-cellprofiler) | ||
- [Install MONAI Label Extension From Binaries](#install-monai-label-extension) | ||
- [Using the Plugin](#using-the-plugin) | ||
|
||
### Supported Applications | ||
Users can find supported applications in the [sample-apps](../../sample-apps/monaibundle/) folder and use the cell_vista_segmentation bundle. Currently, only this bundle can be used to create and refine labels for medical imaging tasks in CellProfiler. | ||
|
||
### Installing CellProfiler | ||
|
||
To use MONAILabel with CellProfiler, you first need to install CellProfiler from source code following the installation part of [CellProfiler WiKi](https://github.com/CellProfiler/CellProfiler/wiki). Once you have CellProfiler installed, you can install the MONAILabel plugin as shown in the `Install MONAI Label Extension` part. | ||
|
||
Please note these tips when installing the software: | ||
1. After cloned the source code, you must switch to a specific version tag of the repo to start installation. | ||
1. For Macbooks with Apple Silicon, please note [this issue](https://github.com/CellProfiler/CellProfiler/issues/4932) before you start to install. | ||
1. Before actually running the command `pip install -e .`, you may need to install numpy if it doesn't exist in your environment. | ||
|
||
### Install MONAI Label Extension | ||
1. Save the runvista2d.py file to a local path. | ||
1. Start CellProfiler from CLI, open the `File-->preferences` option and fill in the `CellProfiler plugin directory` parameter with your local path. | ||
|
||
## Using the Plugin | ||
|
||
1. Start the MONAI Label server with cell_vista_segmentation bundle. | ||
1. Add the `RunVISTA2D` module to your pipeline for object processing. | ||
1. Make sure the MONAILabel Server URL is correctly set in the plugin input. | ||
1. Click the `Analyse Images` or `Start Test Mode` button to execute the pipeline. | ||
1. Update masks and perform the sequential modules to get measurement results. | ||
|
||
<img src="../../docs/images/cellprofiler_plugin.png" width=70% /> |
Binary file not shown.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this change break any existing checkpoints for other models? bundles? other apps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Because of this line
model_state_dict = checkpoint.get(self.model_state_dict, checkpoint)
. If the checkpoint is the model_state_dict, then it will return the checkpoint directly. Otherwise it will return the model_state_dict. I think this is why this line exists here. And the old condition logic which uses the checkpoint looks like a bug to me. Please correct me if there are other cases.Thanks
Bin