R-TF-028 AI/ML Release Report
Table of contents
Package Details
The algorithm package is composed of multiple deep learning models and configuration files.
The complete package is available in the designated repository, version v1.1.0.0. It contains:
- 1 ICD Category Distribution algorithm as an
.onnx
file and its configuration as a.json
file. - 1 Binary Indicator mapping matrix as a
.json
file. - Multiple Visual Sign Quantification models as
.onnx
files and their associated configurations as.json
files.
Algorithms Details & API Specifications
This section provides the technical specifications required for the integration team to implement the algorithms via an API.
ICD Category Distribution Algorithm
Purpose
The ICD Category Distribution algorithm analyzes a dermatological image to provide an interpretative distribution of probabilities across [NUMBER OF CATEGORIES TO BE DEFINED] possible ICD-11 categories.
The performance testing of this algorithm is detailed in R-TF-028-005 AI/ML Development Report
.
Input (for API call)
- Type: A single dermatological image (clinical or dermoscopic).
- Format: RGB, uint8. Standard image file format (e.g., JPEG, PNG).
Output (from this module)
- Type: A vector of probabilities.
- Dimension: [NUMBER OF CATEGORIES TO BE DEFINED] (one for each ICD-11 category).
- Format:
float32
. - Value Range:
[0.0, 1.0]
. The sum of all values in the vector is guaranteed to be1.0
.
Preprocessing (to be implemented by integration team)
The raw input image must be preprocessed before being passed to the ONNX model.
- Resize the image to the
target_shape
specified in the configuration file (e.g.,[224, 224]
). - Normalize the pixel values to the range specified by
normalization_range
in the configuration file (e.g.,[0, 1]
). - Convert the data type to
float32
.
Post-processing (to be implemented by integration team)
To achieve the validated performance, Test-Time Augmentation (TTA) must be applied.
- Create N augmented versions of the preprocessed input image as defined by
tta_augmentations
in the config file. - Run inference on the original image and each of the N augmented versions. This will produce N+1 probability vectors.
- Average these N+1 vectors element-wise to produce the final, robust probability distribution.
Configuration File (icd_distribution_config.json
)
{
"model_path": "models/icd_distribution_v1.1.0.onnx",
"target_shape": [224, 224],
"normalization_range": [0.0, 1.0],
"tta_augmentations": ["horizontal_flip", "brightness_adjust"],
"classes": ["ICD_CODE_1", "ICD_CODE_2", ..., "ICD_CODE_[NUMBER OF CATEGORIES TO BE DEFINED]"]
}
Binary Indicator Algorithms
Purpose
These are deterministic calculations that provide three key clinical indicators based on the output of the ICD Category Distribution algorithm.
The validation of these indicators is detailed in R-TF-028-005 AI/ML Development Report
.
Input (for this module)
- The final probability vector (dimension [NUMBER OF CATEGORIES TO BE DEFINED]) from the ICD Category Distribution algorithm.
- The
binary_indicator_matrix.json
file.
Output (from this module)
- Type: A JSON object containing three key-value pairs.
- Value Range:
[0.0, 1.0]
for each indicator. - Format:
{
"malignancy_indicator": 0.96,
"critical_complexity_indicator": 0.94,
"dermatological_condition_indicator": 0.99
}
Functioning (to be implemented by integration team)
For each of the three indicators, the integration code must perform the following calculation:
- Load the list of ICD-11 codes associated with that indicator from the
binary_indicator_matrix.json
file. - Sum the probabilities from the ICD distribution vector for only those specific ICD-11 codes.
- The resulting sum is the final value for that indicator.
Formula: Binary Indicator = Σ (ICD Probability × Binary Mapping)
Visual Sign Quantification Algorithms
Purpose
This suite of algorithms provides quantifiable data on the intensity, count, and extent of various clinical signs. Each task is handled by a dedicated deep learning model.
Input (for API call)
- Type: A single dermatological image (clinical or dermoscopic).
- Format: RGB, uint8.
Output (from this module)
The output is a structured JSON object containing a list of all detected and quantified signs. The specifications below are strict.
Functioning & Output Formats (to be implemented by integration team)
The integration code will process the input image with the relevant models to produce the following outputs:
- Intensity Quantification:
- Output: A numerical score or categorical label.
- API JSON Structure:
{
"sign": "erythema",
"type": "intensity",
"value": 2,
"scale": "0-4"
} - Value Ranges:
value
will be an integer within the range defined byscale
.
- Count Quantification:
- Output: A list of detected objects, each with a label, confidence score, and bounding box coordinates.
- API JSON Structure:
{
"sign": "nodule",
"type": "count",
"value": 2,
"detections": [
{"box": [101, 202, 154, 252], "confidence": 0.98},
{"box": [194, 130, 245, 179], "confidence": 0.92}
]
} - Value Ranges:
value
is the integer count of items indetections
.box
coordinates are[y_min, x_min, y_max, x_max]
in pixels.confidence
is a float between0.0
and1.0
.
- Extent Quantification:
- Output: A binary segmentation mask representing the affected area.
- API JSON Structure:
{
"sign": "hair_loss",
"type": "extent",
"value_percent": 15.7,
"mask": "iVBORw0KGgoAAAANSUhEUgAA..."
} - Specifications:
value_percent
is a float representing the percentage of the image covered by the mask.mask
is a Base64 encoded binary PNG image with the same dimensions as the input image. Pixels with value1
(white) indicate the presence of the sign; pixels with value0
(black) indicate absence.
Technical Integration Details
Backend API Logic
The backend service must orchestrate the calls to the models as follows:
- Receive a single image via an API endpoint.
- Execute the preprocessing pipeline on the image.
- Run inference on the ICD Category Distribution model, applying the mandatory TTA logic.
- Execute the Binary Indicator derivation logic using the result from the previous step.
- Concurrently, run inference on all relevant Visual Sign Quantification models.
- Aggregate all results into a single, structured JSON response according to the schema defined in the device's OpenAPI/Swagger specification.
- Return the complete JSON response. The API should be stateless.
Signature meaning
The signatures for the approval process of this document can be found in the verified commits at the repository for the QMS. As a reference, the team members who are expected to participate in this document and their roles in the approval process, as defined in Annex I Responsibility Matrix
of the GP-001
, are:
- Author: Team members involved
- Reviewer: JD-003, JD-004
- Approver: JD-001