Check README_original for further documentation and citation!
git clone https://github.com/giurdeluca/Sybil.git
cd Sybil/
conda create -n <env_name> python=<python_version>
conda activate <env_name>
pip install -e .
for my old computational environment (CUDA 11.3, python 3.8)
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 -f https://download.pytorch.org/whl/torch_stable.html
or, on newer environment (CUDA 12.4, python 3.10) to be compliant with latest author requirements
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
#!/bin/bash
# Run inference on the demo data
# The output will be printed to the console
demo_scan_dir=sybil_demo_data
# Download the demo data if it doesn't exist
if [ ! -d "$demo_scan_dir" ]; then
# Download example data
curl -L -o sybil_example.zip "https://www.dropbox.com/scl/fi/covbvo6f547kak4em3cjd/sybil_example.zip?rlkey=7a13nhlc9uwga9x7pmtk1cf1c&dl=1"
unzip -q sybil_example.zip
fi
# If not installed with pip, sybil-predict will not be available.
# Can use "python3 sybil/predict.py" instead.
sybil-predict \
--loglevel DEBUG \
--output-dir demo_prediction \
--write-attention-images \
--return-attentions \
--save-individually \
--save-gif \
$demo_scan_dir
python sybil/sybil_DICOM.py \
--model ensemble \
--input-list /path/to/list/of/DICOM/paths.txt
--output-dir /path/to/output/directory
--save-maps
Argument | Default | Description |
---|---|---|
--model |
ensemble |
Pretrained model to load (ensemble, that averages 5 folds, or base)) |
--input-list |
- | Path to text file containing input CT image paths (DICOM) |
--output-dir |
./derived/pipeline/ |
Directory to save output files |
--save-maps |
False | If added, saves pngs with attention maps |
-
Download the JSON file here
-
Run convert_annotation_json_to_csv.py
python utils/convert_annotation_json_to_csv.py <path_to_annotation.json> <path_to_annotations.csv>
- Run extract_annotation_seed.py for calculation of bounding box center and visualization
python utils/extract_annotation_seed.py <dicom_root_folder> <path_to_annotations.csv> <output_folder>