How to do Medical Image Labeling with Label Studio

In the medical field, imaging is a quick way to see whatâs going on inside or outside the body. Training models to classify these images, or the structures inside them, is becoming increasingly popular. There are many groups out there that are using modeling to help improve treatment and diagnosis. Take BioticsAI for example â theyâre leveraging Label Studio to help them quickly and efficiently leverage their Subject Matter Experts to label their data, and greatly improving treatment and diagnostics for OB/GYNs.
Weâve put together a brief tutorial and template to help you get started with labeling and classifying your own medical images in Label Studio. This allows you to get data that you can be fully confident in, especially given the fact that in the medical field there is no margin for error. Expertise is expensive, so making sure that your SME time is used as efficiently as possible is critical. Take a look below for our tutorial, or find just the template here.
Getting Started
To begin, we downloaded this dataset from Kaggle, which contains breast ultrasound images. The dataset is grouped into 3 classes â normal, benign, and malignant. Weâll use this dataset to show what medical imaging might look like in Label Studio!
Letâs start by creating a new project in Label Studio. Click on the blue âcreateâ button on the upper right hand corner of your screen. Weâll give the project a name, and you could fill out the description with any additional information that youâd like to have on hand. Here, weâll leave it blank.
Upload Your Data
Uploading the data to this project is easy! Weâre just going to drag and drop the images from the Kaggle dataset into our project on the Data Import screen. When you unzip the dataset after you download it from Kaggle, youâll notice the 3 folders that correspond to the 3 classes. Within each folder, there is a mask and an image for each sample. Weâre going to ignore the mask files, and just drag and drop one of the regular images into the data import screen.

Configure Your Medical Image Labeling Project
For this task, we have two goals â draw a bounding box around the tumor, and classify it as benign, malignant, or normal. You can see the labeling config for this project below. Notice that we show the image first, using the âImageâ tag, and then have a RectangleLabels object for the bounding box around the tumor. You could easily swap this out with a BrushLabels tag if you wanted to draw a more precise shape around the tumor. Finally, we have the choices tag, which allows us to classify the image as benign, malignant, or normal. Click on the âcustom templateâ button on the bottom of the left hand column, and paste the code below into that screen.
<View>
<Image name="image" value="$image"/>
<RectangleLabels name="label" toName="image">
<Label value="Tumor" background="green"/>
</RectangleLabels>
<Choices name="classification" toName="image">
<Choice value="Benign"/>
<Choice value="Malignant"/>
<Choice value="Normal"/>
</Choices>
</View>
Time to Label!
Now, youâre ready to label! Click into any of the samples, or click the âLabel All Tasksâ button at the top of the Data Manager. Select the Tumor label below the image, and then draw your bounding box. Then, you can click on whichever label youâd like to apply. Finally, click submit.

And youâre done! Labeling medical images in Label Studio with bounding boxes is very straightforward, and will greatly reduce your time to a model or model evaluation.
Happy labeling! (Explore more ways to speed up medical image labelingâwithout sacrificing accuracy.)