gateway.py
is a helper class that establishes an HTTP endpoint for communication with the Arterys app. It accepts inference requests in the form of a multipart/related HTTP request. The parts in the multipart request are parsed into a JSON object and an array of buffers containing contents of input DICOM files. They are in turn passed to a handler function that you can implement and register with the gateway class. The return values of the handler function are expected to be a JSON object and an array of buffers (the array could be empty). The gateway class will then package the returned values into a multipart/related HTTP response sent to the Arterys app.parts
array and one binary buffer (unless there was nothing detected for that image).inference_command
is only needed if your model can run different types of inference. In that case you can use it to decide whether to return bounding boxes, segmentation masks, etc. Possible values are: get-bounding-box-2d
or get-probability-mask
.inference-test-tool
folder which is used to test the model published on the root docker container.inference-test-tool/send-inference-request
script allows you to send dicom data to the mock server and exercise it. To use it run from inside the inference-test-tool
folder:-h
: Print usage help-s
: Use it if model is a segmentation model. Otherwise bounding box output will be assumed--host
and --port
: host and port of inference server<ARTERYS_SDK_ROOT>/inference-test-tool/study-folder
folder, you may send this study to your segmentation model listening on port 8600 on the host OS by running the following command in the inference-test-tool
directory:study-folder
in this case) must be a subfolder of inference-test-tool
so that they will be accessible inside the docker container.