Quickstart
Warning
This project is under development
Installation
Software installation
Download Medical Liver Segmentation ToolKit
(.venv) $ git clone https://github.com/Removirt/LiverSegmentation.git
(.venv) $ cd MedicalLiverSegmentationToolkit/
(.venv) $ pip install -r requirements.txt
Usage
Important
To introduce new network architectures, follow these steps:
Enter the architecture in
model/dim3/{your_architecture}.py.Add the network import in
model/utils.py.Add the network training configuration in
config/{database}/{your_architecture}_3d.yaml.
Training Network
(.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
(.venv) $ python3 train.py --model {network_name} --version {training_version}
Predict Network
(.venv) $ python3 train.py --model {network_name} --version {training_version}
Tip
To predict more than 1 network, use predict_sequential.py, more info.
Evaluation trained models
Performance measures
Note
The performance measures compute are:
Dice Similarity Coefficient (DSC).
Normalize Surface Distance (NSD).
Mean Average Surface Distance (MASD).
Hausdorff Distance (HD).
Relative Volume Difference (RVD).
(.venv) $ python3 metrics_sequential.py
Note
Generate a JSON file with networks put in (more info):
20models_3d = [
21 'attention_unet',
22 'medformer',
23 'resunet',
24 'swin_unetr',
25 'unet++',
26 'unetr',
27 'vnet',
28 'segformer',
29 '{name_architecture}',
30 ]
Complexity measures
(.venv) $ python3 calculate_features_networks.py
Note
The profiler calculate:
Number of params.
Floating point operations per second (Flops).
Memory usage in a inference.
Layers size.