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

More documentation on using local (non-zoo) bundles with MONAILabel #1490

Open
wyli opened this issue Jul 14, 2023 · 3 comments
Open

More documentation on using local (non-zoo) bundles with MONAILabel #1490

wyli opened this issue Jul 14, 2023 · 3 comments

Comments

@wyli
Copy link
Collaborator

wyli commented Jul 14, 2023

bring your own bundle from local directories

@wyli wyli converted this from a draft issue Jul 14, 2023
@ericspod
Copy link
Member

This is an important one I think for people developing bundles and wanting to experiment/visualise with their results. My solution to the problem was to download the bundle app and then soft link the bundle's directory into the directory where the app would normally download bundles from the zoo. This maybe wasn't correct but I could find documentation elsewhere about how to do things with local bundles.

My script for doing this which assumes it's in the docs directory of a bundle:

#! /bin/bash

eval "$(conda shell.bash hook)"
conda activate monailabel

homedir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

BUNDLE="$(cd "$homedir/.." && pwd)"
BUNDLE_NAME="$(basename $BUNDLE)"
LABELDIR="$BUNDLE/monailabel"

if [ ! -d "$LABELDIR" ]
then
    mkdir "$LABELDIR"
    mkdir "$LABELDIR/datasets"
    cd "$LABELDIR"
    monailabel apps --download --name monaibundle
    mkdir "$LABELDIR/monaibundle/model"
    cd "$LABELDIR/monaibundle/model"
    ln -s "$BUNDLE" "$BUNDLE_NAME"
fi
    
cd "$LABELDIR"
monailabel start_server --app monaibundle --studies datasets --conf models "$BUNDLE_NAME" $*

@SachidanandAlle
Copy link
Collaborator

Correct. Importing your own bundle being supported couple of versions (may be from 0.5 onwards).
You can dump your bundle into model folder and use the same instead of importing it from zoo.

Documentation on this is missing. We never highlighted this feature/flexibility.
@diazandr3s / @tangy5 please update the doc for this feature

Possibly add a section: Bring Your Own Bundle in
https://github.com/Project-MONAI/MONAILabel/tree/main/sample-apps/monaibundle

@ericspod
Copy link
Member

If possible it would be nice to have a command-line mechanism for making this work with monailabel start_server so that I can specify the bundle by path and a symlink is created automatically.

@wyli wyli removed this from MONAI v1.3 Oct 13, 2023
@wyli wyli added this to MONAI v1.4 Oct 13, 2023
@wyli wyli moved this to Todo in MONAI v1.4 Oct 13, 2023
@wyli wyli removed the status in MONAI v1.4 Nov 3, 2023
@KumoLiu KumoLiu removed this from MONAI v1.4 Sep 20, 2024
@KumoLiu KumoLiu moved this to Backlog in MONAI v1.5 Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants