You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/how-to/healthcare-ai/deploy-cxrreportgen.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure AI Foundry
4
4
description: Learn how to use CXRReportGen Healthcare AI Model with Azure AI Foundry.
5
5
ms.service: azure-ai-foundry
6
6
ms.topic: how-to
7
-
ms.date: 04/24/2025
7
+
ms.date: 08/13/2025
8
8
ms.reviewer: itarapov
9
9
reviewer: ivantarapov
10
10
ms.author: mopeakande
@@ -22,40 +22,40 @@ In this article, you learn how to deploy CXRReportGen as an online endpoint for
22
22
23
23
* Deploy the model to a self-hosted managed compute.
24
24
* 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.
26
26
27
27
## 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.
29
29
30
30
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).
31
31
32
32
:::image type="content" source="../../media/how-to/healthcare-ai/healthcare-reportgen.gif" alt-text="Animation of CXRReportGen architecture and data flow.":::
33
33
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.
35
35
36
36
## Prerequisites
37
37
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.
39
39
40
40
- If you don't have one, [create a [!INCLUDE [hub](../../includes/hub-project-name.md)]](../create-projects.md?pivots=hub-project).
41
41
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).
43
43
44
44
## Deploy the model to a managed compute
45
45
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).
47
47
48
48
To __deploy the model through the UI__:
49
49
50
50
1. Go to the model catalog.
51
51
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
+
56
54
> [!NOTE]
57
55
> 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**.
59
59
60
60
To __deploy the model programmatically__, see [How to deploy and inference a managed compute deployment with code](../deploy-models-managed.md).
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).
81
81
82
82
### Make basic calls to the model
83
83
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.
85
85
86
86
```python
87
87
input_data = {
@@ -116,23 +116,23 @@ input_data = {
116
116
```
117
117
118
118
## 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.
120
120
121
121
### Request schema
122
122
123
-
Request payload is a JSONformatted string containing the following parameters:
123
+
The request payload is a JSON-formatted string with the following parameters:
|`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 |
136
136
137
137
138
138
### Request example
@@ -152,7 +152,7 @@ The `input_data` object contains the following fields:
152
152
}
153
153
```
154
154
155
-
**More complex request passing frontal, lateral, indication and technique**
155
+
**More complex request passing frontal, lateral, indication, and technique**
156
156
```JSON
157
157
{
158
158
"input_data": {
@@ -175,11 +175,11 @@ The `input_data` object contains the following fields:
175
175
176
176
### Response schema
177
177
178
-
Response payload is a JSONformatted string containing the following fields:
178
+
The response payload is a JSON-formatted string containing the following fields:
|`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 processingthese 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. |
183
183
184
184
### Response example
185
185
**A simple inference requesting embedding of a single string**
@@ -196,11 +196,11 @@ Response payload is a JSON formatted string containing the following fields:
196
196
197
197
### Supported image formats
198
198
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.
200
200
201
201
## Learn more from samples
202
202
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:
204
204
205
205
*[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.
0 commit comments