installation process
Install server MONAI Label
The following installation process is executed on the ubuntu20.04 x64 platform.
The version of monai is 0.9.1
and the version of monalabel is 0.4.2.
Install pytorch
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
install monialabel
pip install monailabel
After executing the command, many dependent libraries will be installed
Check if the installation was successful
monailabel -h
Download Sample Apps and datasets
# Download Sample Apps
monailabel apps # List sample apps
monailabel apps --download --name radiology --output apps
# Download MSD Datasets
monailabel datasets # List sample datasets
monailabel datasets --download --name Task09_Spleen --output datasets
Execute monalabel apps to find that the app has been installed
- Download the dataset
to execute the command:monailabel datasets
you can view some of his built-in datasets
The Internet speed of science is not good, and it was cut off when downloading.
It can be downloaded in other ways, download link: http://medicaldecathlon.com/ Fortunately, I have downloaded these data before. Then put the downloaded compressed package in the datasets folder in the home directory.
Then open /home/username/datasets/ and find that the data has been decompressed.
start service
Start the service with the following command
# Run Deepedit Model.
# Options can be (deepedit|deepgrow|segmentation|segmentation_spleen|all) in case of radiology app.
# You can also pass comma seperated models like --conf models deepedit,segmentation
monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models deepedit
The parameter apps/radiology should write the real path of your own installation. Use monailabel apps
to see your path.
monailabel start_server --app /home/bian/monaiEnv/monailabel/sample-apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models deepedit
Note that after starting the service, the local machine can directly link to http://127.0.0.1:8000/. If it is a remote machine, write the real IP address.
You can see the model file pretrained_deepedit_dynunet.pt required for downloading deepEdit.
Install the client
At present, the client-side labeling software supported by monalabel is
- 3D Slicer: for image data annotation
- OHIF: Used for image data annotation.
- QuPath: for pathological data annotation.
- Digital Slide Archive (DSA): used for pathological data annotation.
Slicer is currently the most widely used open source software for scientific research, and its plug-in architecture design pattern allows developers to easily develop their own plug-ins. The plugin library is also huge. We use 3D slicer installation as the client
3D Slicer download address: https://download.slicer.org/
Note: 3D Slicer version requires >=4.13 or above. I downloaded the current version 5.0.3
Click on the plugin icon to get a list of plugins
Find the MoLNALabel module
and enter monailabel server: Note that http is written instead of https.
Information about executing run
Annotate custom datasets
To annotate a custom dataset with DeepEdit, we can download the DeepEdit application as described above, however, the dataset directory does not need to be populated. Follow the command below to set a custom dataset annotation using an empty local directory as image and label storage location. my_dataset
# install MONAI Label
pip install monailabel
# download DeepEdit sample app to local directory
monailabel apps --name deepedit --download --output .
# create an empty folder for the custom dataset
mkdir my_dataset
# start the DeepEdit app in MONAI label server
# on the empty dataset folder
monailabel start_server --app radiology --studies my_dataset --conf models deepedit
Upload files to server
Click on the Upload Volume button to upload new images to the server
reference documents
https://docs.monai.io/projects/label/en/latest/installation.html
https://github.com/Project-MONAI/MONAILabel
https://www.youtube.com/watch?v=o8HipCgSZIw&t=1319s
https://docs.monai.io/projects/label/en/latest/quickstart.html