Skip to content
Jacob Silterra edited this page Oct 24, 2024 · 14 revisions

This repository contains the source code for Mirai, a neural network used for breast cancer prediction based on mammogram images.

For general usage, we recommend using the public Docker container which has been packaged with Ark.
See the Ark wiki for more complete documentation.

Example scripts for bash, batch, and powershell: ark_predict.zip.

Each of these scripts accepts a directory, host, and port as input. The script then submits every DICOM image in the input directory to the host, assuming that the ark server is running.

Mirai example data

Prediction using published container

A pre-built container is available on Docker Hub at https://hub.docker.com/r/mitjclinic/mirai.

The following commands are an example of how to download and run the container, as well as submit images for prediction.

Mac or Linux

From a terminal:

# Run published container
docker run --rm -d -p 5000:5000 mitjclinic/mirai:latest

# Check that container is running, and get version
curl http://localhost:5000/info

# Download and unzip zip file with scripts
curl -L -o ark_predict.zip "https://github.com/reginabarzilaygroup/ark/files/14299465/ark_predict.zip"
tar -xf ark_predict.zip

# Download example data
curl -L -o mirai_demo_data.zip "https://github.com/reginabarzilaygroup/Mirai/releases/download/v0.12.0/mirai_demo_data.zip"
mkdir mirai_demo_data && tar -xf mirai_demo_data.zip -C mirai_demo_data

# Submit images for prediction
# Mac/Linux
./ark_predict.sh mirai_demo_data

Windows

Open PowerShell in administrative mode, and enter:

Set-ExecutionPolicy RemoteSigned

When prompted, confirm with "Y". The rest of the commands do not need a window with administrative access.

# Run published container in the background
docker run --rm -d -p 5000:5000 mitjclinic/mirai:latest

# Check that container is running, and get version
curl.exe http://localhost:5000/info

# Download and unzip zip file with scripts
curl.exe -L -o ark_predict.zip "https://github.com/reginabarzilaygroup/ark/files/14299465/ark_predict.zip"
tar -xf ark_predict.zip

# Download example data
curl.exe -L -o mirai_demo_data.zip "https://github.com/reginabarzilaygroup/Mirai/releases/download/v0.12.0/mirai_demo_data.zip"
mkdir mirai_demo_data
tar -xf mirai_demo_data.zip -C mirai_demo_data

# Submit images for prediction
.\ark_predict.ps1 mirai_demo_data

Expected response

After submitting the four images of a mammogram exam, in 10-60 seconds, you should see a response like:

{
  "data": {
    "predictions": {
      "Year 1": 0.0298,
      "Year 2": 0.0483,
      "Year 3": 0.0684,
      "Year 4": 0.09,
      "Year 5": 0.1016
    }
  },
  "message": null,
  "metadata": null,
  "runtime": "21.27s",
  "statusCode": 200
}

The numbers under "Year 1", "Year 2", Year X etc. represent the estimated probability that the patient will get breast cancer within X years. That is, the probabilities are cumulative.

Cite

@article{doi:10.1200/JCO.21.01337,
author = {Yala, Adam and Mikhael, Peter G. and Strand, Fredrik and Lin, Gigin and Satuluru, Siddharth and Kim, Thomas and Banerjee, Imon and Gichoya, Judy and Trivedi, Hari and Lehman, Constance D. and Hughes, Kevin and Sheedy, David J. and Matthis, Lisa M. and Karunakaran, Bipin and Hegarty, Karen E. and Sabino, Silvia and Silva, Thiago B. and Evangelista, Maria C. and Caron, Renato F. and Souza, Bruno and Mauad, Edmundo C. and Patalon, Tal and Handelman-Gotlib, Sharon and Guindy, Michal and Barzilay, Regina},
title = {Multi-Institutional Validation of a Mammography-Based Breast Cancer Risk Model},
journal = {Journal of Clinical Oncology},
volume = {40},
number = {16},
pages = {1732-1740},
year = {2022},
doi = {10.1200/JCO.21.01337},
note ={PMID: 34767469},
URL = {https://doi.org/10.1200/JCO.21.01337},
eprint = {https://doi.org/10.1200/JCO.21.01337}
}

Clone this wiki locally