medicalliversegmentationtoolkit

Medical Toolkit for Liver Volume Segmentation

https://github.com/marqinhos/medicalliversegmentationtoolkit

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords

medical-application medical-image-analysis medical-image-segmentation pytorch pytorch-lightning transformers unet volume-rendering
Last synced: 6 months ago · JSON representation ·

Repository

Medical Toolkit for Liver Volume Segmentation

Basic Info
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
medical-application medical-image-analysis medical-image-segmentation pytorch pytorch-lightning transformers unet volume-rendering
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Medical Liver Segmentation ToolKit

MKT MKT MKT MKT

Implemented Architectures

The following network architectures have been implemented: - UNet - VNet - ResUNet - UNet++ - Attention-UNet - UNETR - SwinUNETR - MedFormer - SegFormer

Results

Radar chart results

| Architectures | DSC | NSD | MASD | HD | RVD | |------------------|----------|----------|----------|----------|----------| | UNet | 0.955 | 0.903 | 1.326 | 48 | -0.036 | | VNet | 0.941 | 0.860 | 3.483 | 148 | -0.052 | | ResUNet | 0.956 | 0.902 | 0.890 | 35 | -0.046 | | UNet++ | 0.951 | 0.888 | 1.218 | 37 | -0.009 | | Attention-UNet | 0.959| 0.907 | 0.845 | 37 | -0.037 | | UNETR | 0.952 | 0.890 | 1.263 | 36 | 0.006| | SwinUNETR | 0.956 | 0.898 | 0.837| 43 | -0.006| | MedFormer | 0.957 | 0.917| 1.251 | 55 | -0.021 | | SegFormer | 0.946 | 0.878 | 1.482 | 40 | -0.043 |

Quickstart

⚠️ Warning This project is under development

Installation

💡 Software installation Download Medical Liver Segmentation ToolKit

bash (.venv) $ git clone https://github.com/marqinhos/MedicalLiverSegmentationToolkit.git

bash (.venv) $ cd MedicalLiverSegmentationToolkit/

bash (.venv) $ pip install -r requirements.txt

Usage

❗ Important To introduce new network architectures, follow these steps:

  1. Enter the architecture in model/dim3/{your_architecture}.py.
  2. Add the network import in model/utils.py.
  3. Add the network training configuration in config/{database}/{your_architecture}_3d.yaml.
Training Network

bash (.venv) $ python3 train.py --model {network_name} --max_epochs {num_max_epochs}

📝 Note See the Train Module documentation for more info on parameters.

💡 Tip To train more than 1 network, use train_sequential.py, more info.

Test Network

bash (.venv) $ python3 train.py --model {network_name} --version {training_version}

Predict Network

bash (.venv) $ python3 train.py --model {network_name} --version {training_version}

💡 Tip To predict more than 1 network, use predict_sequential.py, more info.

Evaluation of Trained Models

Performance Measures

📝 Note The performance measures computed are:

  1. Dice Similarity Coefficient (DSC).
  2. Normalize Surface Distance (NSD).
  3. Mean Average Surface Distance (MASD).
  4. Hausdorff Distance (HD).
  5. Relative Volume Difference (RVD).

bash (.venv) $ python3 metrics_sequential.py

📝 Note Generate a JSON file with networks as shown below (more info): ```python :lineno-start: 20 :emphasize-lines: 10

models3d = [ 'attentionunet', 'medformer', 'resunet', 'swinunetr', 'unet++', 'unetr', 'vnet', 'segformer', '{namearchitecture}', ] ```

Complexity Measures

bash (.venv) $ python3 calculate_features_networks.py

📝 Note The profiler calculates:

  1. Number of params.
  2. Floating point operations per second (Flops).
  3. Memory usage in an inference.
  4. Layer sizes.

more info.

License

Medical Liver Segmentation ToolKit is available under next license:

Owner

  • Name: Marcos
  • Login: marqinhos
  • Kind: user

4º Robotica USC

Citation (CITATION.cff)

cff-version: 1.0.0
preferred-citation:
  type: software
  message: If you use this software, please cite it as below.
  authors:
  - family-names: Fernández
    given-names: Marcos
  title: "MedicalLiverSegmentationToolKit"
  version: 2.0.0
  date-released: 2024-07-05
  license: AGPL-3.0
  url: "https://github.com/marqinhos/MedicalLiverSegmentationToolKit"

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Dependencies

docs/requirements.txt pypi
  • furo *
  • myst-parser *
  • sphinx *
  • sphinx-autodoc-typehints *
  • sphinx-copybutton *
  • sphinx-rtd-theme *
  • sphinxcontrib-napoleon *
requirements.txt pypi
  • Babel ==2.15.0
  • Jinja2 ==3.1.3
  • Markdown ==3.6
  • MarkupSafe ==2.1.5
  • PyYAML ==6.0.1
  • Pygments ==2.18.0
  • SimpleITK ==2.3.1
  • Sphinx ==7.3.7
  • Werkzeug ==3.0.2
  • absl-py ==2.1.0
  • addict ==2.4.0
  • aiohttp ==3.9.3
  • aiosignal ==1.3.1
  • alabaster ==0.7.16
  • async-timeout ==4.0.3
  • attrs ==23.2.0
  • batchgenerators ==0.25
  • certifi ==2024.2.2
  • charset-normalizer ==3.3.2
  • cmake ==3.29.0.1
  • contourpy ==1.2.1
  • cycler ==0.12.1
  • docutils ==0.20.1
  • einops ==0.7.0
  • filelock ==3.13.3
  • flopth ==0.1.5
  • fonttools ==4.51.0
  • frozenlist ==1.4.1
  • fsspec ==2024.3.1
  • future ==1.0.0
  • fvcore ==0.1.5.post20221221
  • grpcio ==1.62.1
  • huggingface-hub ==0.22.2
  • idna ==3.6
  • imageio ==2.34.0
  • imagesize ==1.4.1
  • importlib_metadata ==7.1.0
  • iopath ==0.1.10
  • joblib ==1.3.2
  • kaleido ==0.2.1
  • kiwisolver ==1.4.5
  • lazy_loader ==0.4
  • lightning-utilities ==0.11.2
  • linecache2 ==1.0.0
  • lit ==18.1.2
  • lxml ==5.2.2
  • matplotlib ==3.8.4
  • mmcv ==1.7.1
  • monai ==1.3.0
  • mpmath ==1.3.0
  • multidict ==6.0.5
  • networkx ==3.3
  • nibabel ==5.2.1
  • nilearn ==0.10.4
  • numpy ==1.26.4
  • nvidia-cublas-cu11 ==11.10.3.66
  • nvidia-cublas-cu12 ==12.1.3.1
  • nvidia-cuda-cupti-cu11 ==11.7.101
  • nvidia-cuda-cupti-cu12 ==12.1.105
  • nvidia-cuda-nvrtc-cu11 ==11.7.99
  • nvidia-cuda-nvrtc-cu12 ==12.1.105
  • nvidia-cuda-runtime-cu11 ==11.7.99
  • nvidia-cuda-runtime-cu12 ==12.1.105
  • nvidia-cudnn-cu11 ==8.5.0.96
  • nvidia-cudnn-cu12 ==8.9.2.26
  • nvidia-cufft-cu11 ==10.9.0.58
  • nvidia-cufft-cu12 ==11.0.2.54
  • nvidia-curand-cu11 ==10.2.10.91
  • nvidia-curand-cu12 ==10.3.2.106
  • nvidia-cusolver-cu11 ==11.4.0.1
  • nvidia-cusolver-cu12 ==11.4.5.107
  • nvidia-cusparse-cu11 ==11.7.4.91
  • nvidia-cusparse-cu12 ==12.1.0.106
  • nvidia-nccl-cu11 ==2.14.3
  • nvidia-nccl-cu12 ==2.19.3
  • nvidia-nvjitlink-cu12 ==12.4.127
  • nvidia-nvtx-cu11 ==11.7.91
  • nvidia-nvtx-cu12 ==12.1.105
  • opencv-python ==4.9.0.80
  • packaging ==24.0
  • pandas ==2.2.2
  • pillow ==10.3.0
  • platformdirs ==4.2.0
  • plotly ==5.21.0
  • portalocker ==2.8.2
  • protobuf ==5.26.1
  • psutil ==5.9.8
  • ptflops ==0.7.3
  • pyparsing ==3.1.2
  • python-dateutil ==2.9.0.post0
  • pytorch-lightning ==2.2.1
  • pytz ==2024.1
  • requests ==2.31.0
  • scikit-image ==0.22.0
  • scikit-learn ==1.4.1.post1
  • scipy ==1.13.0
  • six ==1.16.0
  • snowballstemmer ==2.2.0
  • sphinx-rtd-theme ==2.0.0
  • sphinxcontrib-applehelp ==1.0.8
  • sphinxcontrib-devhelp ==1.0.6
  • sphinxcontrib-htmlhelp ==2.0.5
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.7
  • sphinxcontrib-serializinghtml ==1.1.10
  • sympy ==1.12
  • tabulate ==0.9.0
  • tenacity ==8.2.3
  • tensorboard ==2.16.2
  • tensorboard-data-server ==0.7.2
  • termcolor ==2.4.0
  • thop ==0.1.1.post2209072238
  • threadpoolctl ==3.4.0
  • tifffile ==2024.2.12
  • timm ==0.6.12
  • tomli ==2.0.1
  • torch ==2.0.0
  • torch-summary ==1.4.5
  • torchmetrics ==1.3.2
  • torchvision ==0.15.1
  • tqdm ==4.66.2
  • traceback2 ==1.4.0
  • triton ==2.0.0
  • typing_extensions ==4.11.0
  • tzdata ==2024.1
  • unittest2 ==1.1.0
  • urllib3 ==2.2.1
  • yacs ==0.1.8
  • yapf ==0.40.2
  • yarl ==1.9.4
  • zipp ==3.18.1