Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Zaferyildiz
Copy link
Contributor

New extension

  • Extension has a reasonable name (not too general, not too narrow, suggests what the extension is for)
  • Repository name is Slicer+ExtensionName
  • Repository is associated with 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 enter 3d-slicer-extension in "Topics" and click "Save changes". To learn more about topics, read https://help.github.com/en/articles/about-topics
  • Extension description summarizes in 1-2 sentences what the extension is usable (should be understandable for non-experts)
  • Any known related patents must be mentioned in the extension description.
  • LICENSE.txt is present in the repository root. MIT (https://choosealicense.com/licenses/mit/) or Apache (https://choosealicense.com/licenses/apache-2.0/) license is recommended. If source code license is more restrictive for users than MIT, BSD, Apache, or 3D Slicer license then the name of the used license must be mentioned in the extension description.
  • Extension URL and revision (scmurl, scmrevision) is correct, consider using a branch name (main, release, ...) instead of a specific git hash to avoid re-submitting pull request whenever the extension is updated
  • Extension icon URL is correct (do not use the icon's webpage but the raw data download URL that you get from the download button - it should look something like this: https://raw.githubusercontent.com/user/repo/main/SomeIcon.png)
  • Screenshot URLs (screenshoturls) are correct, contains at least one
  • Homepage URL points to valid webpage containing the following:
    • Extension name
    • Short description: 1-2 sentences, which summarizes what the extension is usable for
    • At least one nice, informative image, that illustrates what the extension can do. It may be a screenshot.
    • Description of contained modules: at one sentence for each module
    • Tutorial: step-by-step description of at least the most typical use case, include a few screenshots, provide download links to sample input data set
    • Publication: link to publication and/or to PubMed reference (if available)
    • License: We suggest you use a permissive license that includes patent and contribution clauses. This will help protect developers and ensure the code remains freely available. We suggest you use the Slicer License or the Apache 2.0. Always mention in your README file the license you have chosen. If you choose a different license, explain why to the extension maintainers. Depending on the license we may not be able to host your work. Read here to learn more about licenses.
    • Content of submitted s4ext file is consistent with the top-level CMakeLists.txt file in the repository (description, URLs, dependencies, etc. are the same)
  • Hide unused features in the repository to reduce noise/irrelevant information:
    • Click Settings and in repository settings uncheck Wiki, Projects, and Discussions (if they are currently not used)
    • Click the settings icon next to About in the top-right corner of the repository main page and uncheck Releases and Packages (if they are currently not used)

Copy link
Contributor

@jamesobutler jamesobutler left a 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:

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.

@Zaferyildiz
Copy link
Contributor Author

@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 jamesobutler changed the title Add files via upload ENH: Add new extension - SlicerSegmentAny3D Mar 25, 2024
@Zaferyildiz
Copy link
Contributor Author

@jamesobutler I've closed the last issue as well

@Zaferyildiz
Copy link
Contributor Author

@jamesobutler Could you find a chance to check the recent changes in the repository?

@Zaferyildiz
Copy link
Contributor Author

@jamesobutler I'm writing to follow up. Do you have more reviews about the extension?

@jcfr jcfr changed the title ENH: Add new extension - SlicerSegmentAny3D ENH: Add SegmentWithSAM extension May 1, 2024
@jcfr jcfr changed the title ENH: Add SegmentWithSAM extension ENH: Add SegmentAny3D extension May 1, 2024
@jcfr jcfr changed the title ENH: Add SegmentAny3D extension ENH: Add SlicerSegmentHumanBody extension May 1, 2024
@jcfr jcfr changed the title ENH: Add SlicerSegmentHumanBody extension ENH: Add SegmentHumanBody extension May 1, 2024
@jcfr
Copy link
Member

jcfr commented May 1, 2024

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:

git clone git@github.com:mazurowski-lab/SlicerExtensionsIndex.git
cd SlicerExtensionsIndex
git checkout main
git remote add jcfr https://github.com/jcfr/ExtensionsIndex.git
git fetch jcfr
git reset --hard jcfr/mazurowski-lab-main
git push origin main --force

@jcfr jcfr changed the title ENH: Add SegmentHumanBody extension Add SegmentHumanBody extension May 2, 2024
@lassoan
Copy link
Contributor

lassoan commented May 2, 2024

Thank you for your submission. I had a look at code and found two issues:

  • The module should not automatically download a huge package such as pytorch without user consent. Please replace the delay display call by a confirm dialog at https://github.com/mazurowski-lab/SlicerSegmentHumanBody/blob/2496837be2a5b42bd92525e246b32f0197633de7/SegmentHumanBody/SegmentHumanBody.py#L101
  • Currently, all Slicer extensions use a permissive license (freely usable for any purpose). Usage of non-commercial licenses are not banned, but strongly discouraged, as most users would not want to spend time with even trying a tool that is cannot be used for treating patients, planning surgeries, etc. (these may all be classified as commercial activities). I would recommend to reconsider the license choice. If it remains non-commercial then very visible warnings must be added to the extension description, documentation, and maybe even in the module GUI, to ensure that users are aware that usage of this extension is restricted.

@fedorov
Copy link
Member

fedorov commented May 2, 2024

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.

@lassoan
Copy link
Contributor

lassoan commented May 2, 2024

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.

@jcfr jcfr added the Status: Awaiting Response ⏳ Waiting for a response/more information label May 2, 2024
@fedorov
Copy link
Member

fedorov commented May 2, 2024

We went through a similar exercise in MONAI Auto3DSeg extension and decided to drop all training data that was distributed with restrictive licenses.

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

  1. have clarity on the license covering the model

and

  1. have clarity on how the license covering the model applies/propagates to the data generated using the model

@lassoan
Copy link
Contributor

lassoan commented May 2, 2024

Agreed. Restrictions on the source data and the trained model should be both clearly described.

@Zaferyildiz
Copy link
Contributor Author

Thank you all for the discussion above.

@jcfr I run the commands you provided and pushed the changes.
@lassoan I changed the delay display function to confirm dialog.

@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.

@Zaferyildiz
Copy link
Contributor Author

@jcfr @lassoan @fedorov

I'm writing to follow up. Is there any more concerns we need to address?

@fedorov
Copy link
Member

fedorov commented May 22, 2024

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.

@lassoan
Copy link
Contributor

lassoan commented May 23, 2024

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)?

@pieper @jcfr what do you think?

@pieper
Copy link
Member

pieper commented May 24, 2024

I'm wondering if we should have a special tier, or maybe a tier modifier for any non-commercial extensions.

@lassoan
Copy link
Contributor

lassoan commented May 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Response ⏳ Waiting for a response/more information
Development

Successfully merging this pull request may close these issues.

None yet

6 participants