TL;DR
When we train neural networks to measure human muscle from ultrasound images, we usually obsess over model architectures. Using a competitive Kaggle challenge as a real-world laboratory, this paper shows that mundane geometric oversights—like assuming image pixels are square or changing how we trace lines off-screen—shift measurements just as much as the choice of deep learning model. Along the way, it quantifies the exact perils of leaderboard overfitting and uncovers massive training-data overlap in a popular public benchmark.
What Problem Does This Paper Address?
Your muscles are packed with bundles of fibers called fascicles, sandwiched between connective tissue sheets called aponeuroses. How fast or forcefully a muscle contracts depends on three architectural numbers: muscle thickness (MT), fascicle length (FL), and pennation angle (PA—the angle at which fascicles attach to the tissue sheets).
Measuring these by hand on B-mode ultrasound scans is reliable, but painfully slow. Automated deep-learning tools are stepping in to help, yet three unglamorous problems lurk outside the neural network itself:
- Frame Geometry: Ultrasound exports are often display screenshots. Sometimes, horizontal and vertical pixels don't represent the same physical distance (non-square pixel aspect ratios). Treating rectangular pixels as square leaves vertical thickness untouched, while silently warping every angle and diagonal length.
- Extrapolation: In long muscles, fascicles rarely fit inside the camera's field of view. Estimating their full length requires extending visible fragments off-screen. When fibers lie flat, tiny angle errors explode into massive length errors via basic trigonometry ($\text{FL} = \text{MT} / \sin(\text{PA})$).
- Evaluation Traps: In machine learning competitions, repeatedly tuning parameters against a small public test set leads to adaptive overfitting—optimizing for quirks of the subset rather than the task. Meanwhile, field benchmarks are rarely audited to ensure their test images didn't leak into published training sets.
Methods
Instead of proposing a new neural network, author Soheil Kooklan treats his solo entry in the Kaggle UMUD Challenge as an empirical case study.
- Standard Foundations: Aponeuroses and visible fascicle fragments are segmented using standard U-Nets with ResNet-34 encoders. Final competition submissions blended angle and length predictions with three public competitor notebooks (relying entirely on public notebooks for thickness).
- Layout-Specific Geometry: A custom pre-processing module identifies six distinct scanner screen layouts. It infers vertical scale from on-screen rulers and deduces pixel aspect ratios from UI clues—like checking if a circular probe icon looks squished—before resampling images onto an isotropic (square-pixel) grid.
- Geometric Measurement & Heuristics: Rather than trusting raw trigonometry on flat fibers, the pipeline introduces a score-optimizing heuristic that shrinks volatile trigonometric length estimates toward a fixed prior (93 mm). It also tests different geometric conventions for extending visible fragments to the aponeurosis boundaries.
- Leaderboard & Tissue Audits: Because the challenge error metric is strictly additive, the author isolated 65 single-change experiments across 13 base submissions to see which public-split tweaks survived on the hidden private split. Finally, he audited a separate expert benchmark for data leakage using central-crop ORB keypoint matching and RANSAC homography—cleverly ignoring altered UI text and left-right image mirroring to match the underlying biological tissue.
Datasets
- UMUD Challenge Dataset (Kaggle): Training data included 2,761 frames with fascicle masks and 1,048 with aponeurosis masks (no numeric architectural labels). The 309 test frames (103 public, 206 private) spanned three scanners, three leg muscles, and included patients with cerebral palsy unseen during training.
- UMUD Expert Benchmark: An open dataset of 35 ultrasound frames annotated by up to seven human experts, alongside outputs from established tools (
DL_Track_USandSMA). No new datasets were collected, though the author's overlap audit fundamentally reframes how this benchmark must be used.
Key Insights and Ideas
- Check your pixels before blaming your U-Net: A pipeline validated on muscle thickness first will completely miss aspect-ratio bugs, because vertical distances don't change when horizontal pixels stretch. Yet on Philips Lumify scans, ignoring aspect ratio warps a 15° angle by 2.8° (nearly double the disagreement between human experts) and shrinks oblique lengths by 15%.
- How you draw lines matters as much as the weights: Extending fascicles to the center of the aponeurosis band versus its inner edge changed length readings by over 12 mm (the clinical minimal detectable change) on 48% of test frames. The convention requiring the least off-screen extrapolation matched human labels best.
- Small leaderboard gains are mostly mirages: Five-decimal-place leaderboard scores create an illusion of precision. On a 103-frame public split, micro-tuning offsets yielded selection bias (the "winner's curse"), where tiny gains were barely better than a coin flip on unseen data.
- Global image hashes miss biological data leakage: Standard duplicate checks failed to catch benchmark overlap because researchers re-exported frames with different interface text or horizontal flips. Matching keypoints strictly inside the central muscle belly revealed that nearly three-quarters of the "independent" expert benchmark was actually training tissue in disguise.
Key Results
(Note: Challenge scores measure normalized mean absolute error across PA, FL, and MT; lower is better.)
* Overall Performance: The primary blended entry scored 0.27608 on the private leaderboard (69th of 690 teams), outperforming the standalone pipeline (0.40716) and the best standalone public notebook (0.34042).
* Geometry Impact: Naive square-pixel reading worsened the score by 0.02888 (public) and 0.03688 (private). Layout corrections generalized cleanly for Philips Lumify and Siemens layouts, though not for one Telemed layout (where unshrunk trigonometric instability confounded the test).
* Leaderboard Replication: Across 65 isolated changes, 45 (69%) kept their sign on the private split ($r = 0.81$). However, among 20 late-stage parameter tweaks, only 9 of 20 kept their sign ($r = 0.11$). Their RMS dispersion scale (0.005 to 0.008) swamped their apparent public gains (0.002–0.004).
* Benchmark Leakage: 26 of 35 expert benchmark frames shared tissue with both DL_Track_US and challenge training sets (164–688 inlier keypoints vs. $\le 25$ for clean frames). On the 9 truly clean frames, the author's recipe scored 0.213, human experts vs. experts scored 0.218, and DL_Track_US scored 0.263—with confidence intervals too wide on 9 frames to declare a winner.
Limitations and Future Work
The author is admirably candid about the study's boundaries:
- Unverified Calibration: Pixel aspect ratios were reverse-engineered from UI elements (or assumed to be 1.0) rather than verified against physical imaging phantoms or DICOM metadata.
- No Anatomical Ground Truth: Fascicle lengths were compared against 2D human annotations, not full-length extended field-of-view scans, and training folds grouped near-duplicate images rather than distinct human participants.
- Tiny Clean Benchmark: Only 9 benchmark frames—all from a single screen layout—were free of training overlap, which is far too small to rank competing tools.
Recommendations for the field: Future ultrasound datasets and challenges should embed physical pixel spacing along both axes in every file, explicitly publish geometric extrapolation rules alongside labels, split leaderboards by patient/recording while reporting a noise floor, and audit benchmarks at the tissue level (in both orientations) before release.
Summary updated