Skip to content

Making Predictions

Jacob Silterra edited this page Sep 4, 2024 · 7 revisions

Once the server is running, one makes predictions by sending DICOM images via POST.

Example data and scripts

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

Sybil example data

Prediction using published container

Here we show an example of using the Mirai container to run prediction on a set of example data. For Mirai, the container name is mitjclinic/Mirai. For Sybil, the process is the same, just use container name mitjclinic/Sybil

Graphical User Interface

  1. Launch the container. This can be done by the command line (below), or from Docker Desktop:

Screenshot 2024-05-07 at 10 33 07

When running the container, make sure port 5000 is mapped.

Screenshot 2024-05-07 at 10 33 54

  1. Open a web browser, and enter http://localhost:5000/home

Screenshot 2024-05-07 at 10 35 06

You should see a simple web site like the one above.

  1. Click the "Choose Files" button and select the DICOM images to analyze.

  2. The results will be displayed at the right, for example:

Screenshot 2024-05-07 at 10 36 41

Command Line

# 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://www.dropbox.com/scl/fi/xfrti6z41ihzs9i7587ju/mirai_demo_data.zip?rlkey=iq3957hio9b3tmogwb5uljdrc&dl=1"
mkdir mirai_demo_data && tar -xf mirai_demo_data.zip -C mirai_demo_data

# Submit images for prediction
./ark_predict.sh mirai_demo_data