Automating ultrasound muscle analysis with machine learning
Measuring muscle in ultrasound images used to mean tracing every frame by hand. I built a MATLAB deep-learning tool that finds the top and bottom muscle borders (aponeuroses) automatically — and that other labs can quickly retrain for their own studies.
Problem
Ultrasound is a cheap, non-invasive way to see muscles and tendons moving. But the images are noisy, results vary between researchers, and rules-based tools break when new data looks different. Even UltraTrack, the field's standard tool, needs manual correction and can't follow the long muscle fibers in the thigh.
Approach
I traced the top and bottom borders of the rectus femoris (a thigh muscle) in 490 images, then built two separate networks from Cronin's U-Net design. I imported the model into MATLAB, replaced its output with a pixel classification layer, and trained each network for 60 epochs on an RTX 2060 GPU using the Adam optimizer. Each took about an hour.
Broader lab work
- Wrote an award-winning undergraduate thesis on ML-enhanced post-processing for real-world biomechanical signals
- Combined IR motion capture data with ML to improve safety assessment accuracy by 42% in an exoskeleton study
| Border | Global acc. | Mean IoU | Weighted IoU | Mean BF |
|---|---|---|---|---|
| Top | 0.9952 | 0.9157 | 0.9907 | 0.9926 |
| Bottom | 0.9907 | 0.8465 | 0.9825 | 0.9447 |