Skip to content

MLV^2-Net: Rater-Based Majority-Label Voting for Consistent Meningeal Lymphatic Vessel Segmentation

License

Notifications You must be signed in to change notification settings

ai-med/mlv2-net

Repository files navigation

MLV2-Net

Official implementation of paper MLV2-Net: Rater-Based Majority-Label Voting for Consistent Meningeal Lymphatic Vessel Segmentation - ML4H 2024

Installation

  1. Install and setup nnU-Net v2 as described in the Documentation.
  2. Install additional python packages from the requirements.txt as follows:
pip install -r /path/to/requirements.txt

Training

1. Create nnU-Net v2 Dataset

python create_nnunetv2_dataset.py \
--src_mri_files <mri_file1> <mri_file2> ... \
--src_ann_files <annotation_file1> <annotation_file2> ... \
--annotators <annotator_idx1> <annotator_idx2> ... \
--labels ./data/mlv_example_labels.json \
--dest <path to nnUNet_raw folder>

2. Train nnU-Net model

Please follow the instructions of the official Documentation to first preprocess and then perform training on each of the 5 folds:

nnUNetv2_plan_and_preprocess -d <dataset_id> --verify_dataset_integrity
nnUNetv2_train <dataset_id> 3d_fullres <fold_idx> --npz

Inference

1. Create Predictions for each individual Annotator

python predict.py \
--training_dir <path_to_nnunet_training_folder> \
--out <path_to_store_annotators_predictions_in> \
--annotator_idx <annotator_idx> \
--data <unlabeled_mri_file1> <unlabeled_mri_file2> ...

It is important to store each annotators predictions in different output folder to prevent them from being overwritten.

2. Merging individual Predictions

python merge_annotations.py \
--out_folder <path_to_output_folder> \
--annotations0 <annotator_0_prediction1> <annotator_0_prediction2> ... \
--annotations1 <annotator_1_prediction1> <annotator_1_prediction2> ... \
--annotations2 <annotator_2_prediction1> <annotator_2_prediction2> ... \
--annotations3 <annotator_3_prediction1> <annotator_3_prediction2> ... \

About

MLV^2-Net: Rater-Based Majority-Label Voting for Consistent Meningeal Lymphatic Vessel Segmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages