Inference API
Enables a developer to access information about model inferences on studies from an institution
The Inference
object
Inference
objectThis is an object representing a model inference on a study. It contains information about the model, the study, inputs derived from the study, and outputs estimated by running the model on the inputs derived from the study.
Inputs derived from the study correspond to DICOM data elements, such as the patient's sex, the pixel spacing of the series, or the X/Y/Z position of the image. A data element's value may apply to an entire study or only specific series or instances. For example, the patient's sex applies to the entire study, whereas the pixel spacing only applies to specific series and the X/Y/Z position only applies to specific instances.
Outputs estimated by running the model on the inputs may also apply to the entire study or only specific series or instances.
Attributes
model
(dictionary)
Model information associated with the inference, including its name and version.
study
(dictionary)
Study information associated with the inference, including the date and references to DICOM files.
inputs
(dictionary)
Inputs passed to the model for inference that are derived from the study. Inputs that are too large to be easily serializable (e.g. pixel array) are excluded.
outputs
(dictionary)
Outputs estimated by running the model on the inputs for inference.
Example of an Inference
object
Inference
object{
"model": {
"name": "predicts_zeros",
"version": "1.0.0"
},
"study": {
"date": "20230101",
"files": [
{
"study_instance_uid": "$STUDY_INSTANCE_UID",
"series_instance_uid": "$SERIES_INSTANCE_UID",
"url": "$PRESIGNED_URL"
},
{
"study_instance_uid": "$STUDY_INSTANCE_UID",
"series_instance_uid": "$SERIES_INSTANCE_UID",
"url": "$PRESIGNED_URL"
}
]
}
"inputs": {
"patient_sex": {
"$STUDY_INSTANCE_UID": "F"
},
"pixel_spacing": {
"$STUDY_INSTANCE_UID": {
"$SERIES_INSTANCE_UID": [0.5, 0.5]
}
},
"image_position_patient": {
"$STUDY_INSTANCE_UID": {
"$SERIES_INSTANCE_UID": {
1: [0, 0, 0.1],
2: [0, 0, 0.2],
3: [0, 0, 0.3],
...
}
}
}
},
"outputs": {
"estimated_number": {
"$STUDY_INSTANCE_UID": 0
},
"estimated_string": {
"$STUDY_INSTANCE_UID": "zero"
},
"estimated_segmentation_array": {
"$STUDY_INSTANCE_UID": {
"$SERIES_INSTANCE_UID": "$PRESIGNED_URL"
}
}
}
]
Last updated