Inspiration

The inspiration is to make abdominal EGC recording more accurate and easier to understand. In an abdominal EGC recording, it contains multiple signals at once, including the maternal heartbeat, fetal activity, and unwanted outside noises. Due to these factors, fetal signals can be hidden by stronger maternal patterns. This allowed me to come up with an idea to solve this problem by creating a prototype that helps researchers see how a recording would look like when it is cleaned and separated, rather than showing the original mixture or final number.

What it does

FetalSignal AI processes abdominal ECG recordings uploaded as CSV or TXT files. It filters the recording, estimates and reduces the maternal heartbeat pattern, and looks for possible fetal beats in the remaining signal.

The dashboard shows the processing layers, an estimated candidate heart rate, and a rough signal-quality score. Users can upload matching reference beats to check the detections and download their results. A guided walkthrough and synthetic example help new users understand the app.

How I built it

I built FetalSignal AI with Python and Streamlit. NumPy and SciPy handle signal filtering, peak detection, maternal-pattern reduction, and analysis of the remaining signal. Pandas handles uploads and exports, Plotly creates interactive charts, and scikit-learn powers a small experimental model that helps select possible fetal beats.

When multiple abdominal ECG channels are available, the app can also check whether at least three channels agree on a beat’s timing. This is called multi-lead consensus.

For training and evaluation, I used five public, de-identified recordings from PhysioNet’s Abdominal and Direct Fetal ECG Database, version 1.0.0, under the Open Data Commons Attribution License v1.0. The dataset source, licence, evaluation method, results, and limitations are documented in the repository.

ChatGPT and OpenAI Codex assisted with implementation, debugging, tests, documentation, and explanations of the underlying methods.

Challenges I ran into

One challenge was separating a faint possible fetal signal from the stronger maternal ECG pattern. Noise and leftover maternal activity can resemble fetal beats, so not every detected peak is correct.

Another challenge was making the app understandable for non-technical users while explaining its limitations. I added simpler labels, a walkthrough, and explanations of the results. I also kept synthetic demo results separate from the public-data evaluation and made the research-only purpose visible throughout the app.

Accomplishments that Im proud of

I’m proud that users can follow the whole process, from uploading a recording to inspecting the signal, checking the detected beats, and downloading the results.

The multi-lead consensus method achieved a macro F1 score of 95.77% across five public recordings, with an average absolute candidate-rate error of approximately 0.60 BPM. The Evidence tab shows each recording’s results and explains the limitations. These are encouraging findings from a small research experiment, but they do not establish clinical reliability.

What I learned

This project taught me why validation matters as much as getting an algorithm to produce an output. A clean-looking chart, high quality score, or believable BPM estimate can still be misleading without reference data.

I also learned why synthetic demonstrations and real-data evaluations need to be clearly separated. Synthetic examples make the app easier to explore, while public research recordings provide evidence about how the method performs.

What's next for FetalSignal AI

I would like to evaluate the method on more public, properly licensed recordings and investigate cases where it misses beats or mistakes interference for a fetal signal. Comparing other separation methods would help identify where the current approach can improve.

FetalSignal AI is a research and education prototype. It is not a medical device or diagnostic tool and must not be used for patient monitoring or clinical decisions.

Built With

Share this project:

Updates

Submission history