This work is a part of a PhD thesis, "Détection faiblement supervisée de pathologies vasculaires" (Weakly supervised detection of vascular pathologies).
- This is a work in progress.
- This work was tested on Windows using a Quadro RTX 8000 GPU.
-
Clone this repository in your workspace and move into it.
-
Set PYTHONPATH environment variable :
Windows (this will only affect the current user's environment):setx PYTHONPATH "$Env:PYTHONPATH;
<workspace_path>
\XAI-VesselNet-torch\xai-vesselnet".Linux (preferably in the .bashrc):
export PYTHONPATH="
<workspace_path>
/XAI-VesselNet-torch/xai-vesselnet:$PYTHONPATH" -
Create the requiered conda environment to execute XAI-VesselNet-torch
conda env create -f environment.yml
NB : Replace the <workspace_path>
aliases by your own path.
We integrated only a few classical models from the MONAI framework.
Model | Arg | Description |
---|---|---|
U-Net | unet |
Basic U-Net. Downsampling are perform by stride, not pooling. |
Residual U-Net | res-unet |
Residual U-Net |
Attention U-Net | attention-unet |
Attention U-Net |
First, activate the freshly created environment.
conda activate -n xai_vesselnet
python ./bin/train.py [--hyperparameters HYPERPARAMETERS_JSON_PATH] MODEL TRAIN_CSV_PATH VAL_CSV_PATH
python ./bin/eval.py [--mask MASK_CSV_PATH] MODEL WEIGHTS_PATH EVAL_CSV_PATH
python ./bin/infer.py MODEL WEIGHTS_PATH INFER_CSV_PATH
We provides an easy way to define your own datasets. XAI-VesselNet-torch's scripts require CSV dataset. CSV annotations should contain pairs of image;annotation, e.g.
<absolute_path_to_image>/image_1.nii;<absolute_path_to_seg>/seg_image_1.nii
<absolute_path_to_image>/image_2.nii;<absolute_path_to_seg>/seg_image_2.nii
...
<absolute_path_to_image>/image_n.nii;<absolute_path_to_seg>/seg_image_n.nii