Setting up Local Model API

December 30, 2021


git clone

docker-compose up


Before we start please make sure your server has access to:

Get the server code

You can either clone this repo

git clone

or download it directly from Local Model API.

Build the server

docker-compose up

Your model API should be available at:


If you want to run the server on different port then modify posts mapping inside docker-compose.yaml.

Use my own model

Model API receives an array of instances. Each instance is encoded as array of bytes and parsed into DICOM Instance with pydicom library.

This happens at L31 endpoint definition. You don't have to worry about handling DICOM data. It is covered by model-proxy and your API gets prepared data directly.

Inference point

Your model should receive a list of DICOM SOP Instances. and the example implementation is available here:

If you have your own model then replace the invocation at L42 of endpoint definition with it.