Skip to main content
QMSQMS
QMS
  • Welcome to your QMS
  • Quality Manual
  • Procedures
  • Records
  • Legit.Health Plus Version 1.1.0.0
    • Index of Technical Documentation or Product File
    • Summary of Technical Documentation (STED)
    • Description and specifications
    • R-TF-001-007 Declaration of conformity
    • GSPR
    • Artificial Intelligence
      • R-TF-028-001 AI/ML Description
      • R-TF-028-001 AI/ML Development Plan
      • R-TF-028-003 Data Collection Instructions - Prospective Data
      • R-TF-028-003 Data Collection Instructions - Retrospective Data
      • R-TF-028-004 Data Annotation Instructions - Visual Signs
      • R-TF-028-004 Data Annotation Instructions - Binary Indicator Mapping
      • R-TF-028-004 AI/ML Development Report
      • R-TF-028 AI/ML Release Report
      • R-TF-028 AI/ML Design Checks
    • Clinical
    • Cybersecurity
    • Design and development
    • Design History File
    • IFU and label
    • Post-Market Surveillance
    • Quality control
    • Risk Management
    • Usability and Human Factors Engineering
  • Legit.Health Plus Version 1.1.0.1
  • Licenses and accreditations
  • Applicable Standards and Regulations
  • Public tenders
  • Legit.Health Plus Version 1.1.0.0
  • Artificial Intelligence
  • R-TF-028 AI/ML Release Report

R-TF-028 AI/ML Release Report

Table of contents
  • Package Details
  • Algorithms Details & API Specifications
    • ICD Category Distribution Algorithm
      • Purpose
      • Input (for API call)
      • Output (from this module)
      • Preprocessing (to be implemented by integration team)
      • Post-processing (to be implemented by integration team)
      • Configuration File (icd_distribution_config.json)
    • Binary Indicator Algorithms
      • Purpose
      • Input (for this module)
      • Output (from this module)
      • Functioning (to be implemented by integration team)
    • Visual Sign Quantification Algorithms
      • Purpose
      • Input (for API call)
      • Output (from this module)
      • Functioning & Output Formats (to be implemented by integration team)
  • Technical Integration Details
    • Backend API Logic

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 be 1.0.

Preprocessing (to be implemented by integration team)​

The raw input image must be preprocessed before being passed to the ONNX model.

  1. Resize the image to the target_shape specified in the configuration file (e.g., [224, 224]).
  2. Normalize the pixel values to the range specified by normalization_range in the configuration file (e.g., [0, 1]).
  3. 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.

  1. Create N augmented versions of the preprocessed input image as defined by tta_augmentations in the config file.
  2. Run inference on the original image and each of the N augmented versions. This will produce N+1 probability vectors.
  3. 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)​

  1. The final probability vector (dimension [NUMBER OF CATEGORIES TO BE DEFINED]) from the ICD Category Distribution algorithm.
  2. 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:

  1. Load the list of ICD-11 codes associated with that indicator from the binary_indicator_matrix.json file.
  2. Sum the probabilities from the ICD distribution vector for only those specific ICD-11 codes.
  3. 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 by scale.
  • 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 in detections. box coordinates are [y_min, x_min, y_max, x_max] in pixels. confidence is a float between 0.0 and 1.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 value 1 (white) indicate the presence of the sign; pixels with value 0 (black) indicate absence.

Technical Integration Details​

Backend API Logic​

The backend service must orchestrate the calls to the models as follows:

  1. Receive a single image via an API endpoint.
  2. Execute the preprocessing pipeline on the image.
  3. Run inference on the ICD Category Distribution model, applying the mandatory TTA logic.
  4. Execute the Binary Indicator derivation logic using the result from the previous step.
  5. Concurrently, run inference on all relevant Visual Sign Quantification models.
  6. Aggregate all results into a single, structured JSON response according to the schema defined in the device's OpenAPI/Swagger specification.
  7. 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
Previous
R-TF-028-004 AI/ML Development Report
Next
R-TF-028 AI/ML Design Checks
  • Package Details
  • Algorithms Details & API Specifications
    • ICD Category Distribution Algorithm
      • Purpose
      • Input (for API call)
      • Output (from this module)
      • Preprocessing (to be implemented by integration team)
      • Post-processing (to be implemented by integration team)
      • Configuration File (icd_distribution_config.json)
    • Binary Indicator Algorithms
      • Purpose
      • Input (for this module)
      • Output (from this module)
      • Functioning (to be implemented by integration team)
    • Visual Sign Quantification Algorithms
      • Purpose
      • Input (for API call)
      • Output (from this module)
      • Functioning & Output Formats (to be implemented by integration team)
  • Technical Integration Details
    • Backend API Logic
All the information contained in this QMS is confidential. The recipient agrees not to transmit or reproduce the information, neither by himself nor by third parties, through whichever means, without obtaining the prior written permission of Legit.Health (AI LABS GROUP S.L.)