This repository contains the code associated with the paper "Radio-opaque artefacts in digital mammography: Automatic detection and analysis of downstream effects".
It contains the following files:
labelling_tools
contains the notebook with the lightweight artifact labelling toolartifact_detector_model.py
contains the model definition for the multi-label artifact detectorartifact_train.py
contains the code to train the detectorartifact_evaluation.ipynb
contains the evaluation code/plotting for the detectordownstream_model.py
contains the model definition for the downstream evaluation tasks (lesion detection and density prediction)cancer_train.py
to train the screening outcome / lesion detection prediction modeldensity_train.py
to train the density classification modeldataset.py
defines dataset classes and pytorch lightining data modules for all training tasks.
The manually labelled artifact dataset file can be found in labelling_tools/manual_annotations_new.csv
.
The model predictions from the artefact detector for all images in EMBED can be found in predicted_all_embed.csv
All required pip depencies needed to run code in this project are listed in requirements.txt
Simply run python train_detector.py
to train your own artefact detector.
Simply run python density_train.py
to train a density classification model.
To assess the model per artifact you can then run inference: python density_inference.py
and analyse outputs with density_evaluate_markers.ipynb