12.13. Breast Pathology Image Classification Pipeline
The Breast Classification pipeline is one of the reference pipelines provided with Clara Deploy SDK. A pre-trained model for classification of the breast from a 256 x 256 PNG image is used in the pipeline. This pipeline depends on the Clara Deploy CLI to send a PNG image and trigger a job.
After an image is classified, the operator saves the output as a new image with the classification label burnt-in on top of the image. If the class category of a specific image is “cancerous”, the operator burns in the letter “T” to the upper left corner of the output image, otherwise, the letter “F” is written out.
The name of each output file has the pattern output-<original file name>.png
.
The output images can be downloaded by Clara CLI and viewed by any PNG image viewer such as GIMP.
The Breast Pathology Image Classification pipeline is defined in the Clara Deploy pipeline definition language. This pipeline utilizes built-in reference containers to construct the following operator:
The ai-app-breast operator performs AI inference against the NVIDIA Triton Inference server to generate breast classification images.
The following is the details of pipeline definition, with comments describing each operator’s functions as well as input and output.
api-version: 0.4.0
name: breast-pipeline
operators:
- name: ai-app-breast
description: Classifying Breast Pathology Images
container:
image: clara/ai-breast
tag: latest
requests:
gpu: 1
memory: 8192
input:
- path: /input
output:
- path: /output
services:
- name: trtis
container:
image: nvcr.io/nvidia/tritonserver
tag: 20.07-v1-py3
command: ["tritonserver", "--model-repository=$(NVIDIA_CLARA_SERVICE_DATA_PATH)/models"]
connections:
http:
- name: NVIDIA_CLARA_TRTISURI
port: 8000
Please refer to the Run Reference Pipelines using Local Input Files
in the How to run a Reference Pipeline section to learn how to register a pipeline and
execute the pipeline using local input files.