-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add SegmentHumanBody extension #2014
base: main
Are you sure you want to change the base?
Conversation
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 have provided an initial pass of review and have issued
Usability issues:
- Support for Pytorch 2.1 and newer mazurowski-lab/SlicerSegmentHumanBody#1
- Failure to enter SegmentAny3D module mazurowski-lab/SlicerSegmentHumanBody#2
Packaging for ExtensionsIndex distribution issues:
Also will need to be mindful if #2011 is integrated before this PR which switches from .s4ext to .json files. See https://discourse.slicer.org/t/introduction-of-tiers-for-slicer-extensions/34870 for more details.
@jamesobutler Thank you for your initial review. I fixed 2 of the problems and left a comment about the last one. I also renamed the extension with the last commit. |
@jamesobutler I've closed the last issue as well |
@jamesobutler Could you find a chance to check the recent changes in the repository? |
@jamesobutler I'm writing to follow up. Do you have more reviews about the extension? |
Unable to force push changes onto mazurowski-lab/SlicerExtensionsIndex@main, the updated changes are published here main...jcfr:ExtensionsIndex:mazurowski-lab-main Consider running the following command to update this pull request:
|
Thank you for your submission. I had a look at code and found two issues:
|
Related to this, I would like to point out that this extension wraps https://github.com/mazurowski-lab/SegmentAnyBone, which is distributed under CC-BY-NC, which places restrictions on the "derived work". In this issue mazurowski-lab/SegmentAnyBone#3 I asked what are the implications of this license on the segmentations produced by the model, but did not receive any response. I think it is very important that there is a clear statement about whether segmentations produced by this model are considered derived work and are covered by the same CC-BY-NC. If this is the case, there should be a very prominent warning about this in the module GUI, as well as a console warning. |
We went through a similar exercise in MONAI Auto3DSeg extension and decided to drop all training data that was distributed with restrictive licenses. Maybe not everyone will make the same conclusions, but we are really happy that we decided so, because it is just so much simpler to avoid such data and not worry about possible implications of using them. Since then, several clinicians approached us and offered to contribute segmentations for free without restrictions, so I'm quite optimistic that this will all work out well. I agree that if some extensions with restrictive licenses get into the Slicer extensions index then we need to very clearly label them to make sure users are aware of the limitations. |
This is a related decision, and I am indeed glad you did it that way, but the license covering the data does not necessarily determine the license of the model. One could take data available under CC-BY, and (for example) train a model and distribute it under CC-BY-NC, while attributing the original dataset. I don't think there is anything to prevent this. That is why I think it is important to
and
|
Agreed. Restrictions on the source data and the trained model should be both clearly described. |
Thank you all for the discussion above. @jcfr I run the commands you provided and pushed the changes. @lassoan & @fedorov We appreciate the discussion for the license. However, the project leadership decided to go with CC BY-NC 4.0 license because of commercialization reasons. The readme file of the repository has the license information. Furthermore, a pop-up warning that says the extension and the model has CC BY-NC 4.0 license appears whenever a user opens the extension on 3D Slicer. We also appreciate the questions about the license, and its downstream consequences. However, we also do not have the legal background to authoritatively answer these questions, similarly with the reviewers. |
Presumably, you are with the institution that has legal authority to distribute this code. There is no one else better equipped to answer this question than your legal experts at your institution. If the questions about the license covering output produced by the model cannot be answered, I do not think it is ethical to distribute this model in Slicer. The users of the model most definitely have the right to know what they are agreeing to. It is the responsibility of the maintainers of Slicer to protect the users of the application. I am not the one making the decisions here, but as a reviewer, I personally would vote against including a model if the terms of use for its output are unknown. |
I agree that we must avoid misleading users, but as long as we can make sure users are aware of all limitations, we should be all good. We'll soon also have classification of extensions into tiers, which should further help preventing users from accidentally using extensions with restrictive license. The license information "The repository is licensed under the CC BY-NC 4.0" is quite prominently displayed on the extension main page. Since there is a direct link to information (and mostly developers visit the github page), I think the terms are clear enough. Within the module in Slicer, a popup is displayed with this text: "The model and the extension is licensed under the CC BY-NC 4.0 license!\n\nPlease also note that this software is developed for research purposes and is not intended for clinical use yet. Users should exercise caution and are advised against employing it immediately in clinical or medical settings." I think this should be sufficient. The only place where the unusual license is not displayed is in the extension description. Maybe we could add a sentence like "CC BY-NC 4.0 license. Commercial use is not allowed" to avoid disappointing users (users only realize that they cannot use the after they already installed it)? |
I'm wondering if we should have a special tier, or maybe a tier modifier for any non-commercial extensions. |
I think we can keep it simple and say that requirement for tier 3 or better is non-restrictive license. |
@lassoan I also added a text about the license to extension description and the issue you have opened was closed. Thank you for the discussion. |
Hi all, I'm writing to follow up. Is there any updates for our pull request? |
Hi, could you find a chance to read my previous comments? |
Hi all, I'm writing to follow up. Could you take a look at the recent changes? |
Hi all, I'm writing to follow up. Are there any updates to our pull request? |
Thank you for your patience with this. I've tried the extension. The documentation was very helpful in getting started, but unfortunately I was not able to get any usable segmentation result from it. I've loaded CTLiver image from Sample Data module, created two segments (hip and femur), and clicked "Run Automatic Segmentation" button and got this very poor result after 12 minutes: Is this expected? Is there any other Slicer sample data set where the segmentation result is more reasonable? I've tried the "Assign label (2D)" and "Assign label (3D)" buttons, but they did not have any effect, regardless of what label and mask I chose. I then created box prompts and placed positive and negative prompt points, clicked "Start segmentation for current slice", but either nothing happened or the whole slice got filled. These errors appeared in the Python console:
I've also received many of these warnings:
These are due to loading floating-point voxel values into a segmentation. To fix it, you can cast the segmentation result to integer (e.g., uint8) at the end of inference, before writing to file. I've updated your documentation (see mazurowski-lab/SlicerSegmentHumanBody#6) to make it a bit easier to follow (step-by-step instructions). Please improve it further: describe the steps that lead to a usable segmentation result (choose an image on that the model actually works, describe more clearly how to relabel data and how to use prompts - exactly what buttons have to be clicked in what order). I also find the extension name claiming too much, which is unfair to other extension developers and may be confusing for users. "Segment" word is fine, but then it has to be made more specific, it has to be distinguished from other extensions in a truthful and meaningful way. "HumanBody" does not seem to be valid, as it does not segment any parts of the body and it is not restricted to the human body. The extension uses SAM or SegmentAnyBone and can do automatic segmentation in 3D, so names like "SegmentWithSAM3D" or "SegmentAnyBone" would work better, at least it would be a bit more specific, and if people know SegmentAnythingModel or SegmentAnyBone model then they would know that this extension exposes these models. |
@lassoan Maybe your poor results using the CTLiver sample dataset is because that is a CT volume? https://github.com/mazurowski-lab/SegmentAnyBone specifically says it is for MRI volumes. This extension (https://github.com/mazurowski-lab/SlicerSegmentHumanBody/blob/main/README.md) doesn’t explicitly describe whether it is MRI only or if it is possible to segment CT volumes as well. |
The screenshot in the documentation shows a CT image - https://github.com/mazurowski-lab/SlicerSegmentHumanBody/blob/main/README.md#license The documentation does not mention what modality and/or what kind of structures it can segment. This definitely need to be described in the documentation, and maybe included also in the extension name (something like |
Same picture is also used in https://github.com/mazurowski-lab/SlicerSegmentWithSAM, so I am not sure if it is intended to convey anything specific to the repo functionality. |
Thanks for your reviews. SegmentAnyBone is developed only for segmentation of MRIs. It is probably the reason why you got a poor segmentation results since you tried to run it on CT image. However, we plan to add more models that can segment other type of tissues in the future. That is why we wanted to call it in a more generalizable way (e.g. SegmentHumanBody).
|
Hi, could you try to run it on a MRI sample and check my previous comment? |
Hi all, I'm writing to follow up |
@lassoan @jamesobutler We think that we have addressed all the concerns. Is there anything else we need to address? |
Is there anything else we need to address? |
Hi all, is there anything else we need to address? |
1 similar comment
Hi all, is there anything else we need to address? |
Hi all, is there anything else that is preventing us from moving forward? |
Thank you for your patience. We are very busy with preparing the new Slicer Stable Release (5.8). I'll try to get back to this issue next week. |
New extension
3d-slicer-extension
GitHub topic so that it is listed here. To edit topics, click the settings icon in the right side of "About" section header and enter3d-slicer-extension
in "Topics" and click "Save changes". To learn more about topics, read https://help.github.com/en/articles/about-topicsSettings
and in repository settings uncheckWiki
,Projects
, andDiscussions
(if they are currently not used)About
in the top-right corner of the repository main page and uncheckReleases
andPackages
(if they are currently not used)