Edit this page

NA-MIC Project Weeks

Back to Projects List

AI model development for lung ultrasound analysis

Key Investigators

Project Description

One of the primary indicators of acute heart failure is the presence of pulmonary congestion. To detect fluid build up quickly in the emergency room, lung ultrasound exams are taken of the patient. Clinicians look for hyperechoic artifacts (B-lines) that appear in the image, where the more they see the more congested the patient is.

Unfortunately, manual detection of these B-lines is difficult due to the image quality, which depends on the type of transducer and the expertise of the clinician. Therefore, AI models have started to be developed to quickly detect these B-lines. Our group, over the past few years, has developed multiple methods [1], [2], [3]. One of the drawbacks though, is that existing models do not compute the pleural percentage, the ratio of the B-line sectors to the pleural line sectors, which is strongly associated with extravascular lung water and consistent with other semi-quantitative clinical scores [4].

Therefore, we have started to develop detection models to automatically find pleural lines and B-lines and compute the percentage pleura. Our goal for this project week is to train and validate keypoint detection models such as ViTPose++, [5], and HRNet with UDP, [6], and talk to clinicians about the performance.

Objective

  1. Develop a dataloader to read in and pre-process US scans from different sites, patients, and probes.
  2. Train and validate keypoint detection models such as ViTPose++ and HRNet (with UDP) for pleural line and B-line (endpoint) detection.
  3. Show and discuss our results with clinicians.

Approach and Plan

  1. Develop a dataloader to efficiently handle pre-processing and different data distributions.
  2. Develop 1-2 models for pleural line and B-line keypoint detection.
  3. Make our model/code publicly available.
  4. Talk to clinicians.

Progress and Next Steps

  1. We have trained some preliminary YOLO models for bounding box detection. We trained one oriented bounding box YOLO model for pleural lines, and another axis-aligned box YOLO model for B-lines.
  2. We calculated the percent pleura and compared it to the experts.
  3. Implemented and validated a data preprocessing script: 1) parses data and formats into COCO-styled repository, 2) enables sector-to-scanline conversions, 3) enables filtering by metadata (site, annotator, lung zone, patients, before/after diuretic, transducer type, transducer manufacturer)
  4. Implemented a dataloader that allocates equal proportions of different metadata tags to train/vali/test datasets. Implemented k-fold validation and inclusion of data by various metadata tags.

Illustrations

Ground truth boxes in scanline space: oriented bounding box for the pleural line (left), and axis-aligned bounding box for the B-lines. Image

YOLO results after performing pleural line detection and B-line detection, and conversion back to the sector space, compared to the ground truth: Image

Percent pleura for one test lung zone - x = frame #, and y = percentage. We see that the AI predicted Image

Data Exploration (During Project Week)

Overview of different metadata of lung ultrasound dataset: LungUSDataOverview

Overview of original data structures:

+---Andrew/
|   +---Andrew-0561119268/
|   |       0561119268_08109698.andrew.json
|   |       0561119268_08109698.dcm
|   |       ...
|   +---Andrew-1835608883/
|   +---Andrew-3594442829/
|   +---Andrew-5476058456/
|   +---Andrew-5982622832/
|   ...
|   +---Andrew-CARVD_123_Day_0/
|   +---Andrew-CARVD_124_Day_0/
|   +---Andrew-CARVD_125_Day_0/
|   ...
|   +---Andrew-CARVD_134_Day_0/
|   +---Andrew-Lahey_001_T0_Transverse/
|   +---Andrew-Lahey_029_T0_Transverse/
|   +---Andrew-Lahey_032_T0_Transverse/
|   ...
+---Arjun/
|   ...
+---Frances/
|   ...
+---Lao/
|   ...
+---Nick/
|   ...
+---Nicole/
|   ...
+---Peter/
|   ...
+---Sandra/
|   ...
+---Sandra-old/
    ...

Overview of new data structure:

COCO_Data
+---annotations/
|   +---scanline/
|   |       <Annotator>_<clipid>.json
|   |       <Annotator>_<clipid>.json
|   |       ...
|   +---sector/
|           <Annotator>_<clipid>.json
|           <Annotator>_<clipid>.json
|           ...
+---images/
    +---scanline/
    |       <Annotator>_<clipid>_<framenum>.png
    |       <Annotator>_<clipid>_<framenum>.png
    |       ...
    +---sector/
            <Annotator>_<clipid>_<framenum>.png
            <Annotator>_<clipid>_<framenum>.png
            ...

Standardized JSON Metadata:

image

Background and References

Funding

This work is supported by NIH R01EB035679 and R21EB034075.