Skip to content

shepherd-lab/portable-BUS

Repository files navigation

Edge AI for Portable Breast Ultrasound (BUS)

This repository contains AI model training and evaluation code, as well as labeled ultrasound phantom data used for experiments in Assessing the Feasibility of AI-Enhanced Portable Ultrasound for Improved Breast Cancer Early Detection in Remote Areas. Model timing code was developed on top of the open-source Clarius Cast API, and all logic for streaming images from Clarius devices can be found in that repository. We provide minimal examples which can be integrated into the Cast API, but do not reproduce their work here.

System Diagram

Installation and system requirements

Model training
  • Python version: 3.10.12
  • Torchvision=0.17.1
  • PIL=9.4.0
Model timing and prediction display during scanning
  • Tested on Windows 11 Pro 23H2
  • Python version: 3.11.5
  • Pyside6=6.6.1
  • Torchvision=0.17.1
  • Clarius Cast API=11.1.0
  • PIL=9.4.0

Demo

  • Notebook demonstrating model training and evaluation is provided in DemoModelTrainEval.ipynb.
  • Scripts which can be used with the Clarius Cast API are provided, pysidecaster.py (slight modifications from the version provided by the Cast API to allow for drawing of AI model prediction overlay) and ai_testing.py (for generating model predictions from finetuned architectures).
  • Helper functions referenced in provided demonstration notebook can be downloaded from Torchvision.
  • To validate code functionality, run sample code corresponding to desired functionality.

Dataset

All phantom data used for model training and evaluation in Assessing the Feasibility of AI-Enhanced Portable Ultrasound for Improved Breast Cancer Early Detection in Remote Areas can be accessed through the provided Google Drive link: Access Data.

In this Google Drive, you will find the following resources:

  • Weights: weights for FasterRCNN+MobileNetV3, FasterRCNN+ResNet50, RetinaNet+ResNet50, SSD+VGG16, and SSDLite+MobileNetV3 architectures inlcuded in our analysis and timing trials, pretrained on ultrasound phantom data.
  • Videos: video clips of ultrasound phantom scans used to generate training, validation and testing data for AI model development.
  • Labeled Video Data: json files containing lesion location annotations.
  • Frames: individual frames extracted from the video clips.

Predictive Modeling (Battery & Temperature)

In addition to AI model development, this repository also provides a predictive modeling tool (predictive_model_tool.py) for simulating probe battery discharge/charging and temperature rise/cooling during clinical workflows.

These models were used to evaluate probe sustainability under realistic operating conditions, ensuring safe temperatures (<45 °C) while maintaining throughput for daily screening.

Features:

  • Exponential battery discharge/charge models with saturation behavior.
  • Exponential temperature heating/cooling models, with hard thresholding for overheating.
  • Workday simulation with alternating discharge/charge cycles and a 1-hour lunch break.
  • Visualization of battery percentage and probe temperature over time.

Run example simulation: predictive_model_tool.py

Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •