Skip to main content

DICOM Visualization with W&B Tables

How to interactively explore medical data, scans, and patient metadata contained in DICOM files through Tables
Created on June 23|Last edited on May 12

Visualize DICOM files with W&B Tables

With the explosion of machine learning applications in the medical space, there is a growing need to visualize data like the scans from medical imaging machines such as CT, MRI, X-ray, and ultrasound.
This data is often in specific formats such as DICOM. Through W&B Tables functionality, researchers and ML practitioners can interactively explore patient scans and metadata contained in DICOM files. This allows for a smooth, exploratory data analysis process where additional insights can be extracted from the data for downstream tasks.
Let's see how it works.

What are DICOM files?

First off, we need to define our data type here. Put simply: DICOM (.dcm) files store medical imaging data and related data. They are often used to store CT or x-ray scans of patients. DICOM files also contain related metadata such as patient ID, machine configuration, and image properties. Because of the large number of attributes, it can be difficult to visualize these files. We can, however, use the W&B tables functionality to get a better understanding of their contents.
Computed tomography (CT) is one example of imaging that can be stored in DICOM format

Dataset Analysis

The following table show a 300 CT scans subset taken from Kaggle's SIIM-FISABIO-RSNA COVID-19 Detection competition. Each of these CT scans is stored in DICOM format. The competition requires identifying and localizing COVID-19 related abnormalities on chest radiographs.
Each image will require bounding boxes and a class for each bounding box:
  • Negative for Pneumonia
  • Typical Appearance
  • Indeterminate Appearance
  • Atypical Appearance
We run a basic (not fully trained) YOLOv5 on our select 300 samples to create our bounding boxes and classifications. We display our original image data and predictions along with all the other contents of each DICOM file.

Visualizing DICOM in W&B Tables

You can play around with the filter and group by functionalities to modify the table however you want.


Run set
36

This short gif demonstrates some of the sorting you can do in Tables

Below, we'll show a few other quick examples. In the following table, we select all images that have a width larger than their height (rows >= columns).

Run set
36


In the next example, we use filter to select all samples that are from male patients with an average bounding box confidence score of over 0.5.

Run set
36

Those are just a few examples of how you can sort and filter your DICOM data with Tables to better understand the dataset you're working with, your model's predictions, and a whole lot more. To learn a little more about how Tables works, check out any of the reports below. Thanks!

Read More About Tables:


Iterate on AI agents and models faster. Try Weights & Biases today.