Skip to content

Commit 3f0dfd3

Browse files
Merge pull request #6564 from msakande/freshness-healthcare-models
review intro to healthcare models concept
2 parents 94aba30 + 1b50b17 commit 3f0dfd3

File tree

4 files changed

+80
-82
lines changed

4 files changed

+80
-82
lines changed

articles/ai-foundry/how-to/healthcare-ai/deploy-cxrreportgen.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure AI Foundry
44
description: Learn how to use CXRReportGen Healthcare AI Model with Azure AI Foundry.
55
ms.service: azure-ai-foundry
66
ms.topic: how-to
7-
ms.date: 04/24/2025
7+
ms.date: 08/13/2025
88
ms.reviewer: itarapov
99
reviewer: ivantarapov
1010
ms.author: mopeakande
@@ -22,40 +22,40 @@ In this article, you learn how to deploy CXRReportGen as an online endpoint for
2222

2323
* Deploy the model to a self-hosted managed compute.
2424
* Grant permissions to the endpoint.
25-
* Send test data to the model, receive, and interpret results
25+
* Send test data to the model, receive, and interpret results.
2626

2727
## CXRReportGen - grounded report generation model for chest X-rays
28-
Radiology reporting demands detailed image understanding, integration of multiple inputs (including comparisons with prior imaging), and precise language generation, making it an ideal candidate for generative multimodal models. CXRReportGen generates a list of findings from a chest X-ray study and also perform a _grounded report generation_ or _grounding_ task. That is, the CXRReportGen model also incorporates the localization of individual findings on the image. Grounding enhances the clarity of image interpretation and the transparency of AI-generated text, which end up improving the utility of automated report drafting.
28+
Radiology reporting demands detailed image understanding, integration of multiple inputs (including comparisons with prior imaging), and precise language generation. These requirements make it an ideal candidate for generative multimodal models. CXRReportGen generates a list of findings from a chest X-ray study and also performs a _grounded report generation_ or _grounding_ task. That task incorporates the localization of individual findings on the image. Grounding enhances the clarity of image interpretation and the transparency of AI-generated text, which ends up improving the utility of automated report drafting.
2929

3030
The following animation demonstrates the conceptual architecture of the CXRReportGen model, which consists of an embedding model paired with a general reasoner large language model (LLM).
3131

3232
:::image type="content" source="../../media/how-to/healthcare-ai/healthcare-reportgen.gif" alt-text="Animation of CXRReportGen architecture and data flow.":::
3333

34-
The CXRReportGen model combines a radiology-specific image encoder with a large language model and takes as inputs a more comprehensive set of data than many traditional approaches. The input data includes the current frontal image, the current lateral image, the prior frontal image, the prior report, and the indication, technique, and comparison sections of the current report. These additions significantly enhance report quality and reduce incorrect information, ultimately demonstrating the feasibility of grounded reporting as a novel and richer task in automated radiology.
34+
The CXRReportGen model combines a radiology-specific image encoder with a large language model and takes as inputs a more comprehensive set of data than many traditional approaches. The input data includes the current frontal image, the current lateral image, the prior frontal image, the prior report, and the indication, technique, and comparison sections of the current report. These additions significantly enhance report quality and reduce incorrect information. They ultimately demonstrate the feasibility of grounded reporting as a novel and richer task in automated radiology.
3535

3636
## Prerequisites
3737

38-
- An Azure subscription with a valid payment method. Free or trial Azure subscriptions won't work. If you don't have an Azure subscription, create a [paid Azure account](https://azure.microsoft.com/pricing/purchase-options/pay-as-you-go) to begin.
38+
- An Azure subscription with a valid payment method. Free or trial Azure subscriptions don't work. If you don't have an Azure subscription, create a [paid Azure account](https://azure.microsoft.com/pricing/purchase-options/pay-as-you-go) to begin.
3939

4040
- If you don't have one, [create a [!INCLUDE [hub](../../includes/hub-project-name.md)]](../create-projects.md?pivots=hub-project).
4141

42-
- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Foundry portal. To perform the steps in this article, your user account must be assigned the __Azure AI Developer role__ on the resource group. For more information on permissions, see [Role-based access control in Azure AI Foundry portal](../../concepts/rbac-ai-foundry.md).
42+
- Azure role-based access controls (Azure RBAC) to grant access to operations in Azure AI Foundry portal. To perform the steps in this article, your user account must be assigned the __Azure AI Developer role__ on the resource group. For more information on permissions, see [Role-based access control in Azure AI Foundry portal](../../concepts/rbac-ai-foundry.md).
4343

4444
## Deploy the model to a managed compute
4545

46-
Deployment to a self-hosted managed inference solution allows you to customize and control all the details about how the model is served. You can deploy the model from its model card in the catalog UI of [Azure AI Foundry](https://aka.ms/healthcaremodelstudio) or [Azure Machine Learning studio](https://ml.azure.com/model/catalog) or [deploy it programmatically](../deploy-models-managed.md).
46+
When you deploy to a self-hosted managed inference solution, you can customize and control all the details about how the model is served. You can deploy the model from its model card in the catalog UI of [Azure AI Foundry](https://aka.ms/healthcaremodelstudio), [Azure Machine Learning studio](https://ml.azure.com/model/catalog), or [deploy it programmatically](../deploy-models-managed.md).
4747

4848
To __deploy the model through the UI__:
4949

5050
1. Go to the model catalog.
5151
1. Search for the _CxrReportGen_ model and select its model card.
52-
1. On the model's overview page, select __Deploy__.
53-
1. If given the option to choose between serverless API deployment and deployment using a managed compute, select **Managed Compute**.
54-
1. Fill out the details in the deployment window.
55-
52+
1. On the model's overview page, select __Use this model__ to open the deployment window.
53+
5654
> [!NOTE]
5755
> For deployment to a self-hosted managed compute, you must have enough quota in your subscription. If you don't have enough quota available, you can use our temporary quota access by selecting the option **I want to use shared quota and I acknowledge that this endpoint will be deleted in 168 hours.**
58-
1. Select __Deploy__.
56+
57+
1. Select the checkbox in the deployment window to use the temporary shared quota.
58+
1. The deployment window displays settings that include a virtual machine selection, an endpoint name, and a deployment name. If you're satisfied with these settings, select **Deploy**.
5959

6060
To __deploy the model programmatically__, see [How to deploy and inference a managed compute deployment with code](../deploy-models-managed.md).
6161

@@ -77,11 +77,11 @@ credential = DefaultAzureCredential()
7777
ml_client_workspace = MLClient.from_config(credential)
7878
```
7979

80-
In the deployment configuration, you get to choose an authentication method. This example uses Azure Machine Learning token-based authentication. For more authentication options, see the [corresponding documentation page](../../../machine-learning/how-to-setup-authentication.md). Also, the client is created from a configuration file that is created automatically for Azure Machine Learning virtual machines (VMs). Learn more on the [corresponding API documentation page](/python/api/azure-ai-ml/azure.ai.ml.mlclient#azure-ai-ml-mlclient-from-config).
80+
In the deployment configuration, you choose an authentication method. This example uses Azure Machine Learning token-based authentication. For more authentication options, see the [corresponding documentation page](../../../machine-learning/how-to-setup-authentication.md). Also, the client is created from a configuration file that's created automatically for Azure Machine Learning virtual machines (VMs). Learn more on the [corresponding API documentation page](/python/api/azure-ai-ml/azure.ai.ml.mlclient#azure-ai-ml-mlclient-from-config).
8181

8282
### Make basic calls to the model
8383

84-
Once the model is deployed, use the following code to send data and retrieve a list of findings and corresponding bounding boxes.
84+
After deploying the model, use the following code to send data and get a list of findings and the corresponding bounding boxes.
8585

8686
```python
8787
input_data = {
@@ -116,23 +116,23 @@ input_data = {
116116
```
117117

118118
## Use CXRReportGen REST API
119-
CXRReportGen model assumes a simple single-turn interaction where one request produces one response.
119+
The CXRReportGen model works with a simple single-turn interaction where one request generates one response.
120120

121121
### Request schema
122122

123-
Request payload is a JSON formatted string containing the following parameters:
123+
The request payload is a JSON-formatted string with the following parameters:
124124

125125
| Key | Type | Required/Default | Description |
126126
| ------------- | -------------- | :-----------------:| ----------------- |
127127
| `input_data` | `[object]` | Y | An object containing the input data payload |
128128

129-
The `input_data` object contains the following fields:
129+
The `input_data` object has the following fields:
130130

131131
| Key | Type | Required/Default | Allowed values | Description |
132132
| ------------- | -------------- | :-----------------:| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
133-
| `columns` | `list[string]` | Y | `"frontal_image"`, `"lateral_image"`, `"prior_image"`,`"indication"`, `"technique"`, `"comparison"`, `"prior_report"` | An object containing the strings mapping data to inputs passed to the model.|
134-
| `index` | `integer` | Y | 0 - 10 | Count of inputs passed to the model. You're limited by how much GPU RAM you have on the VM where CxrReportGen is hosted, and by how much data can be passed in a single POST request—which depends on the size of your images. Therefore, it's reasonable to keep this number under 10. Check model logs if you're getting errors when passing multiple inputs. |
135-
| `data` | `list[list[string]]` | Y | "" | The list contains the list of items passed to the model. The length of the list is defined by the index parameter. Each item is a list of several strings. The order and meaning are defined by the `columns` parameter. The text strings contain text. The image strings are the image bytes encoded using base64 and decoded as utf-8 string |
133+
| `columns` | `list[string]` | Y | `"frontal_image"`, `"lateral_image"`, `"prior_image"`,`"indication"`, `"technique"`, `"comparison"`, `"prior_report"` | An object with strings mapping data to inputs you pass to the model.|
134+
| `index` | `integer` | Y | 0 - 10 | Count of inputs you pass to the model. You're limited by how much GPU RAM you have on the VM where CxrReportGen is hosted, and by how much data you can pass in a single POST request—which depends on the size of your images. Therefore, keep this number under 10. Check model logs if you're getting errors when passing multiple inputs. |
135+
| `data` | `list[list[string]]` | Y | "" | The list contains the list of items you pass to the model. The length of the list is defined by the index parameter. Each item is a list of several strings. The order and meaning are defined by the `columns` parameter. The text strings contain text. The image strings are the image bytes encoded using base64 and decoded as utf-8 string |
136136

137137

138138
### Request example
@@ -152,7 +152,7 @@ The `input_data` object contains the following fields:
152152
}
153153
```
154154

155-
**More complex request passing frontal, lateral, indication and technique**
155+
**More complex request passing frontal, lateral, indication, and technique**
156156
```JSON
157157
{
158158
"input_data": {
@@ -175,11 +175,11 @@ The `input_data` object contains the following fields:
175175

176176
### Response schema
177177

178-
Response payload is a JSON formatted string containing the following fields:
178+
The response payload is a JSON-formatted string containing the following fields:
179179

180180
| Key | Type | Description |
181181
| ------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182-
| `output` | `list[list[string, list[list[float]]]]` | The list of findings. Each finding is an item in a list represented by a list that contains a string with the text of finding and a list that contains bounding boxes. Each bounding box is represented by a list of four coordinates of the bounding box related to the finding in the following order: `x_min`, `y_min`, `x_max`, `y_max`. Each coordinate value is between 0 and 1, thus to obtain coordinates in the space of the image for rendering or processing these values need to be multiplied by image width or height accordingly|
182+
| `output` | `list[list[string, list[list[float]]]]` | The list of findings. Each finding is an item in a list represented by a list that contains a string with the text of finding and a list that contains bounding boxes. Each bounding box is represented by a list of four coordinates of the bounding box related to the finding in the following order: `x_min`, `y_min`, `x_max`, `y_max`. Each coordinate value is between 0 and 1, so to get coordinates in the space of the image for rendering or processing, multiply these values by image width or height accordingly. |
183183

184184
### Response example
185185
**A simple inference requesting embedding of a single string**
@@ -196,11 +196,11 @@ Response payload is a JSON formatted string containing the following fields:
196196

197197
### Supported image formats
198198

199-
The deployed model API supports images encoded in PNG or JPEG formats. For optimal results, we recommend using uncompressed/lossless PNGs with 8-bit monochromatic images.
199+
The deployed model API supports images encoded in PNG or JPEG formats. For optimal results, we recommend using uncompressed or lossless PNGs with 8-bit monochromatic images.
200200

201201
## Learn more from samples
202202

203-
CXRReportGen is a versatile model that can be applied to a wide range of tasks and imaging modalities. For more examples see the following interactive Python notebook:
203+
CXRReportGen is a versatile model that you can apply to a wide range of tasks and imaging modalities. For more examples, see the following interactive Python notebook:
204204

205205
* [Deploying and Using CXRReportGen](https://aka.ms/healthcare-ai-examples-cxr-deploy): Learn how to deploy the CXRReportGen model and integrate it into your workflow. This notebook also covers bounding-box parsing and visualization techniques.
206206

0 commit comments

Comments
 (0)