The healthcare AI models marked (preview) in this article are currently in limited preview. These models are intended and provided as-is for research and model development exploration. The healthcare AI models are not designed or intended to be deployed in clinical settings as-is. They are not intended for use in the diagnosis or treatment of any health or medical condition, and the individual models’ performances for such purposes have not been established.You bear sole responsibility and liability for any use of the healthcare AI models, including verification of outputs and incorporation into any product or service intended for a medical purpose or to inform clinical decision-making, compliance with applicable healthcare laws and regulations, and obtaining any necessary clearances or approvals.
What this model learns
Fine-tuning adapts MedImageInsight Premium’s image and text embeddings so that images and their assigned labels sit closer together in the shared embedding space for your label taxonomy. The model’s output remains an embedding vector, not a classification label or a generated report. To get classification-style results, add a downstream step that compares the fine-tuned embeddings against your label-text embeddings, for example with cosine similarity. In the job body, setmodel to MedImageInsight-Premium.
Training data format
For shared JSONL, file, and upload information, see Prepare your data. This article defines the model-specific MedImageInsight Premium record. MedImageInsight Premium training data uses JSON Lines (JSONL). Each physical line is one complete JSON object with its own top-levelmessages array in user then assistant order. This
classification shape doesn’t include a system message.
The formatted JSON in the following section shows the structure of one record. In the actual .jsonl file, write the
complete object on one physical line.
User message: image input
The requireduser message is the model input. Its content value is an array that contains
exactly one image part.
Assistant message: text input
The requiredassistant message supplies the text paired with the image during contrastive
embedding fine-tuning. For this documented classification shape, its content value is a
JSON-encoded string, not a nested JSON object.
The decoded string uses the following classification fields.
Use
class_id only to group classification records by class. Assign the same positive ID to every
record in a class and a different positive ID to each distinct class. Treat a combination of
findings as a separate composite class with its own ID. This format isn’t multilabel training.
Use caption or captions, not class_id: 0, for ungrouped image-text pairs.
The decoded inner object looks like this:
content string. The complete assistant message looks like this:
The general structured pattern is
<image modality> <anatomy> <exam parameters> <condition/pathology>. Choose one convention and use it consistently across training records and
evaluation or inference text inputs.
Caption records
A caption record uses eithercaption with one string or captions with a nonempty list of
alternative descriptions. Each record should use one target form. Don’t put classification and
caption fields in the same record.
You can mix classification records, singular caption records, one-item captions records, and
multi-item captions records in the same training and validation files. Values in captions are
alternative descriptions of the same image, not simultaneous labels. One value is selected each
time the record is used, including validation.
These JSONL examples each occupy one physical line:
Complete JSONL examples
The following two records each occupy one physical line. They represent the example classesNot_Effusion and Effusion, respectively.
Dataset requirements
Your training file needs at least 10 records. A file with fewer records uploads and preprocesses without error, but job creation rejects it.Image preprocessing and requirements
Image requirements
Training images must meet these requirements:Recommended DICOM preprocessing
To prepare a DICOM image for fine-tuning:- Decode the DICOM pixel data.
- Apply the applicable DICOM transforms, such as a lookup table (LUT) or the rescale slope and intercept values.
- Normalize the intensities to the 1st–99th or 5th–95th percentile range, and scale the result to 8-bit.
- Convert the image to RGB and resize it to 480 x 480 pixels.
- Save the image as PNG or JPEG, and then base64-encode it for the training record.
The training code downsizes images to 480 x 480 pixels. Larger images can pass file validation,
but they don’t provide extra training resolution. You can evaluate other DICOM preprocessing
methods, including different modality-specific windows or normalization ranges. MedImageInsight
Premium can learn from consistently processed images, and results can vary with the selected
method.
Hyperparameters
Use the shared hyperparameter request shape described in Create the fine-tuning job on the hub. When you omit all hyperparameters, the service applies these default values for MedImageInsight Premium:
For MedImageInsight Premium,
batch_size accepts values from 1 through 256. The managed fine-tuning
request exposes learning_rate_multiplier. The service-applied value of 0.2 sets the current
trainer learning rate to 2e-5.
Deploy the fine-tuned model
MedImageInsight Premium fine-tuned deployments use theAIServices.GlobalStandard.MedImageInsight-Premium-finetune quota. For
deployment instructions, see
Deploy the fine-tuned model
on the hub.
Interpret training metrics
Fine-tuning uses the UniCL symmetric image-to-text and text-to-image contrastive objective. The Foundry portal reports two loss metrics:train_lossis the UniCL loss for the current effective update.eval_lossis the sample-weighted aggregate over the complete validation file at each evaluation.
eval_loss, and the reported final value is the pre-training
baseline.
Downloaded result CSVs include a third field,
avg_train_loss. For MI2, it can duplicate periodic
train_loss and isn’t a reliable full-run average. Use train_loss for the training-loss curve.Evaluate the fine-tuned model
You’re responsible for evaluating whether the fine-tuned model meets your
application requirements. Evaluation data and methods are separate from the
service’s required training inputs. Loss curves alone don’t establish
improvement in task performance or clinical quality.
- Direct image-text alignment. This level measures how highly the correct candidate text ranks by cosine similarity for each image. Metrics can include top-k accuracy or recall, mean reciprocal rank, per-class AUC, and macro-F1, depending on the label structure.
- Downstream workflow. This level measures the task that consumes the embeddings. Examples include image retrieval, zero-shot classification, classification with a trained adapter, outlier detection, and multimodal prediction.