Official implementation of paper MLV2-Net: Rater-Based Majority-Label Voting for Consistent Meningeal Lymphatic Vessel Segmentation - ML4H 2024
- Install and setup
nnU-Net v2
as described in the Documentation. - Install additional python packages from the
requirements.txt
as follows:
pip install -r /path/to/requirements.txt
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>
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
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.
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> ... \