Watch the demo
Try the interactive demo on Hugging Face
One of the most useful results from CTG-Escalate was a trace it should never have scored. The final 17 minutes of fetal heart-rate data were blank. The prototype still returned a score because its quality check counted missing samples across the whole hour, but ignored where they were missing.
That failure changed what I’d test next. Seventeen minutes scattered across a recording and seventeen minutes missing at the end can look identical to a percentage-based check. They are not the same input.
CTG-Escalate is a retrospective research prototype. It is not a medical device and is not for clinical use.
The prototype returned a score even though the final 17 minutes of fetal heart-rate signal were missing.
Give the model a way to say “I can’t read this”
Cardiotocography (CTG) records fetal heart rate alongside uterine contractions during labour. I wanted to test whether software could provide a second read of those signals without pretending every trace was readable.
I built the prototype in Python. It cleans the last hour of fetal heart-rate and contraction data, fills short gaps, and leaves longer gaps missing. It extracts 29 features, including heart-rate variability and the timing of decelerations relative to contractions. A calibrated logistic regression estimates the risk of low umbilical artery pH at birth. A separate signal-quality check can withhold that score.
The demo exposes three outcomes: flag for senior review, continue routine monitoring, or signal inadequate. “Continue” is the name of an output in the experiment, not reassurance. Keeping the quality check separate from the model makes it possible to see whether a trace was scored at all, and to test the quality check on its own.
Put the misses next to the score
I set aside 166 of the 552 recordings in the CTU-UHB dataset before developing the model. All 552 recordings came from one hospital. I used 386 to choose the model and its thresholds, then froze the configuration and evaluated the holdout. The repository records hashes for the frozen model and configuration so the evaluation can check it’s using the same inputs.
On that holdout, the prototype had an AUROC of 0.739 (95% CI 0.628–0.834), against 0.639 for my computerized approximation of a FIGO rule. That comparison was against software, not clinicians. A simpler logistic regression was close at 0.728, and gradient boosting scored 0.788; the paired comparisons with those models were inconclusive.
The decision counts tell a more useful story. Per 100 labours, the prototype flagged 18.1 for review versus 13.9 for the computerized rule. Of the 32 cases with umbilical artery pH below 7.15, the prototype returned “continue” for 15 and withheld a score for 4. The rule returned “continue” for 23. Overall, the prototype withheld a score for 7.8% of traces. The quality check didn’t demonstrably improve accuracy, and it still let that 17-minute trailing gap through.
A photo is a different input, not a second validation
I also built a paper-strip reader. It finds the printed grid, corrects small tilts, and traces the ink back into numbers. Those numbers go through the same pipeline as the original digital signal.
I tested that path on simulated strip images, not photos of real paper strips. That let me measure reconstruction error against a known digital trace, but it doesn’t establish that the reader works on folded paper, under poor lighting, or across different print formats.
What I’d test next
I’d compare a check that measures trailing gaps with one that only measures total loss, and decide how to evaluate it before looking at new data. I’d also test the pipeline on recordings from another hospital and compare it with clinician reads. A retrospective window ending at delivery is not the same as running a system live during labour, and low pH is a surrogate outcome, not a measure of whether the system helps patients.
If you’re building a model for time-series data, try moving the same missing interval from the middle of a recording to the end. Does your system notice? For this prototype, that is a more useful next test than swapping in a bigger model.
Source code and reproducible evaluation · Project write-up and demo video







Top comments (2)
If you’ve spent time on a labour ward—how often do paper strips, transducer dropouts, or 'borderline' traces slow down an escalation call?
I haven't worked clinically on a labour ward myself, so I'm speaking from talking to midwives and obstetricians rather than firsthand shift experience—which is actually why I'm asking. From those conversations, the pattern seems to be:
Transducer dropouts / loss of contact are the most frequent daily friction—people hesitate to call a registrar when half the strip is blank or maternal pulse is being picked up, so minutes get burned repositioning the probe first.
Paper strips create a physical bottleneck during an escalation call because the person on the phone can't see the trend, forcing verbal description of variability and decelerations before a senior even walks into the room.
'Borderline' (suspicious/pathological-border) traces cause the longest cognitive delay—nobody wants to cry wolf on an ambiguous trace, so teams often 'watch for another 15–20 minutes' while fatigue or shift handover blurs the baseline.