{'fraction_non_alphanumeric': 0.025867849032118525, 'fraction_numerical': 0.014750729966475614, 'mean_word_length': 5.10779392338177, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 2, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fetal electrocardiograms, direct and abdominal with reference heartbeat annotations

Monitoring fetal heart rate (FHR) variability plays a fundamental role in fetal state assessment. Reliable FHR signal can be obtained from an invasive direct fetal electrocardiogram (FECG), but this is limited to labour. Alternative abdominal (indirect) FECG signals can be recorded during pregnancy and labour. Quality, however, is much lower and the maternal heart and uterine contractions provide sources of interference. Here, we present ten twenty-minute pregnancy signals and 12 five-minute labour signals. Abdominal FECG and reference direct FECG were recorded simultaneously during labour. Reference pregnancy signal data came from an automated detector and were corrected by clinical experts. The resulting dataset exhibits a large variety of interferences and clinically significant FHR patterns. We thus provide the scientific community with access to bioelectrical fetal heart activity signals that may enable the development of new methods for FECG signals analysis, and may ultimately advance the use and accuracy of abdominal electrocardiography methods.


Background & Summary
Cardiotocographic monitoring plays an essential role in the assessment of the fetus as it analyses fetal heart rate (FHR) changes against the background of uterine activity and fetal movements [1][2][3] . Instantaneous FHR values are expressed in beats per minute; they stem from periods between consecutive heartbeats (Fig. 1). The FHR signal is most frequently obtained with the use of the Doppler ultrasound method which serves to monitor mechanical heart activity 4 . If correlation techniques are applied to analyze the periodicity of the ultrasound wave, signal loss is reduced. As a result, FHR analysis is feasible both visually and with the use of computer-aided fetal monitoring systems 2,5 . However, since instantaneous FHR values are averaged, automated beat-to-beat variability evaluation 6 becomes less reliable, and so do the decisions regarding clinical interventions 7,8 .
For several years now, there has been an increasing interest in monitoring bioelectric activity of the fetal heart 9,10 because an analysis of the fetal electrocardiogram (FECG) makes it possible to determine FHR with high efficiency and accuracy (Fig. 1). The FECG signal can be recorded invasively -directly from the fetal head during labour 11 , and non-invasively -indirectly from the electrodes placed on the maternal abdominal wall both during pregnancy and labour 12,13 . In the abdominal signals, the amplitude of the fetal QRS complex (FQRS) hardly ever exceeds 20 μV and strongly depends on the maternal body mass index 14,15 . Apart from numerous muscles interferences 16,17 , the strongest one is the maternal electrocardiogram (MECG) of a relatively large amplitude [18][19][20] . Owing to incomplete MECG suppression [21][22][23][24] , the FECG signal becomes unsuitable for further analysis, thus preventing the detection of FQRS complexes, precise location of R waves and FHR determination [25][26][27] .
The main difficulty in the performance evaluation of various methods to analyze abdominal signals lies in a very limited number of publicly available testing signals with reference information. Our dedicated measurement instrumentation for recording bioelectrical fetal heart activity -the KOMPOREL System 28 -was deployed to gather pregnancy (antenatal) signals (B1 dataset) and labour (intrapartum) signals (B2 dataset). All signals were recorded in clinical conditions as part of official research projects. The research material presented in this paper contains 10 pregnancy signals (20 minutes each) and 12 labour signals (5 minutes each). Labour signals comprise the abdominal signals (indirect FECG) and the direct reference FECG, simultaneously recorded from the fetal head. For pregnancy signals, an automated multi-stage procedure to detect FQRS complexes was developed in order to provide reference data. The determined locations of all fetal heartbeats (R waves) were validated by clinical experts. For labour signals, the reference FHR signal was obtained on automatically detected FQRS complexes in the direct FECG. It is considered to be the gold standard in terms of the accuracy to determine intervals between subsequent heartbeats 29 . To assess the content and impact of various interferences in abdominal signals, dedicated measures are proposed to quantify amplitude relationships of maternal and fetal signals in relation to interferences. On the other hand, in order to assess the diversity of the material from the point of view of significant FHR variability patterns 30,31 (e.g. accelerations or decelerations), an automated analysis of the resulting FHR signals was carried out according to the standards applicable in modern obstetrics 2,3 .
Some of the collected signals have already been included in previous studies. The studies focused on developing the methods for MECG suppression in the abdominal signals [32][33][34][35] and on the algorithms to detect FQRS complexes [36][37][38] , which makes it possible to determine instantaneous FHR with an accuracy close to the direct FECG registration method. The resulting original MECG suppression method relies on precise centering and subtraction of the maternal signal pattern covering a full heart cycle. The algorithm to detect FQRS complexes is based on the detection function using standardized matched filtering and normalization, which significantly reduces sensitivity to muscle disturbances. FQRS complexes, even of an amplitude lower than that of interferences, are correctly detected owing to decision rules in which the cost function is minimized. Since those investigations used only a small part of the signals, the related papers do not describe all the details of the currently presented datasets . We provide open access to the bioelectrical fetal heart activity signal datasets recorded both during pregnancy and labour, with reference heartbeats annotations. As a result, other researchers may be able to develop more effective methods to extract and analyze the fetal electrocardiogram. We hope that the effectiveness of non-invasive methods for fetal distress assessment will be brought to a level so far achievable by invasive methods only.

Methods
Data collection. The developed instrumentation for recording signals was used to collect research material, including four-channel records of bioelectrical fetal heart activity obtained from electrodes placed on the maternal abdominal wall. Pregnancy signals were recorded between the 32nd and 42nd week of pregnancy. Labour signals were obtained in an advanced stage of labour. They consisted of four-channel records of bioelectrical fetal heart activity from abdominal electrodes. Additionally, a direct FECG signal was recorded simultaneously from the fetal head. Labour was monitored between the 38th and 42nd week of gestation, and all signals were collected in clinical conditions as part of research projects at the Department of Obstetrics and Gynecology of the Medical University of Silesia in Katowice, Poland. The research was approved by the competent University Bioethics Committee (Commission approval number NN-013-345/02), and by each of the hospitalized patients. heart was used for recordings. The system consists of a signal recorder module and a portable computer. The recorder module enables simultaneous acquisition of four signals from the maternal abdominal wall as well as one FECG signal directly from the fetal head (during advanced labour only). The recorder exhibits a low level of inherent noise (below 1 µV), a high value of common interference suppression factor (CMRR = 115 dB) and provides signal amplification from the level of several dozen microvolts to several volts 28 . The amplifiers and filters ensure that the FECG band is obtained in the range from 0.05 to 150 Hz. Optionally, power line interferences can be additionally suppressed. If strong low-frequency noise occurs, the cut-off frequency of the high-pass filter increases to 1 Hz. Moreover, the recorder module makes it possible to check the loss of electrode contact, mark fetal movements perceived by the mother, as well as control the charge level of the batteries. The recorded analog signals are digitized with a 16-bit resolution at 500 Hz sampling frequency for abdominal signals and 1 kHz for a direct FECG. The recorded data are archived, a preliminary analysis is performed and signals are visualized by a computer. Recordings along with all additional information are stored in files in the appropriate binary, text or graphic format.
The electrode configuration consists of four measuring electrodes A1 ÷ A4, evenly placed around the patient's navel line. As a result, signals are recorded relative to one common reference electrode V0 located above the pubic symphysis. Additionally, a common mode reference electrode N (with active-ground signal) is placed on the patient's left leg. The proposed number and arrangement of electrodes (Fig. 2) result from our investigations and are a compromise between simple application and the development of an effective MECG suppression method to obtain good FECG signal quality. Owing to the appropriate preparation of the abdominal skin (removal of the upper stratum corneum of the epidermis) in the place of application of the measuring electrodes, the level of muscle noise or slow-changing noise was significantly reduced. However, the recorded signals still exhibit low-frequency interferences caused by fetal and/or maternal movements, as well as by impedance changes between the measuring electrodes and maternal skin 16,19,39 .
Standard Ag/AgCl electrodes (3 M Red Dot 2271) were used in the monitoring process, and the top layer of the epidermis was gently wiped with a dedicated conductivity paste (3 M Red Dot Trace Prep 2236). The direct FECG signal was recorded with a sterile spiral electrode (CETRO AB 15133C) placed on the fetal head. All monitoring sessions were carried out by qualified and trained medical staff. Moreover, an experienced biomedical engineer was present (the first author of the presented paper), responsible for observing the recorded signals and selecting the appropriate filter cut-off frequency, as well as controlling the contact of electrodes. Each patient was assigned an identification number, and the gestational age was noted on the monitoring day. While pregnancy signals were being recorded, the patient most often took a position on the left side and a semi-sitting position in labour. The patient could talk freely and change her position if necessary.  The first cutoff frequency is equal to approximately 5 Hz, which assures effective suppression of low frequency noise. The top-band between 45 Hz and 55 Hz results in successful elimination of the powerline interference. In the case of a direct FECG signal, the initial noise suppression was carried out in a similar way, with the filter parameters adjusted to the sampling frequency of 1 kHz.
The results of preliminary automated detection of fetal QRS complexes were verified by clinical experts, who also corrected manually individual fetal heartbeat locations. The signals together with the interpretation provided by experts in the form of annotations about the locations of R waves are the main part of the developed datasets. Additionally, based on the annotated R-wave locations, the reference heart rate signals were determined and subsequently analyzed for a detailed quantitative assessment of clinically relevant FHR variability patterns. All pre-filtered signals were evaluated in terms of mutual amplitude relationships of the maternal and fetal signals and their relation to other interferences (mainly muscle) occurring in abdominal signals. The obtained results describe the research material and complement the information on particular abdominal signals. A detailed description of the proposed methodology for signal processing and analysis is presented below, separately for B1 and B2 datasets. pregnancy (antenatal) signals. The first stage of the abdominal signal analysis is the suppression of a dominant MECG signal. An innovative method was proposed, based on subtracting the maternal signal pattern covering the full heart cycle -PQRST complex. The pattern is created by averaging the relevant signal fragments and is constantly updated to keep up with small changes in the MECG shape. What matters most for the correct operation of the method is the precise determination of fiducial points, locating the maternal R waves, as well as the selection of coefficients that scale pattern amplitudes in the subtraction process 34,40 . After MECG suppression, each record in the dataset included four FECG components along with the remaining noise. Quite often, detection of FQRS complexes in a given signal was relatively simple due to their large amplitude, although equally often it was very difficult when the level of muscle interferences was comparable to the amplitude of fetal R waves. Therefore, the best quality FECG signal selected with dedicated measures was used to detect fetal QRS complexes. In order to determine the signal quality index based on the quasi-periodicity of the signal, the autocorrelation function was used, calculated in windows of width being adjusted to the fetal heart rate 41 . Automated pre-detection and manual correction of fetal R-wave positions were applied after selecting the best quality FECG signal. According to 37 , K different detection functions were implemented. Their amplitudes were compared with a continuously modified detection threshold and a simple decision rule. As a result, K numerical sequences {R k (i)} were provided to describe the locations of the detected function peaks. The RR k intervals were determined for each k series: k k k where: k = 1, 2,…, K means the k-th number series for a given k-th detection function, i = 1, 2, …, I k-1 denotes the i-th RR interval, and I k represents the number of peaks detected using the k-th detection function. Then, for each RR k (i) series, the value of the functional Δ k describing its length variability was calculated: For the second stage of the analysis, the results of the detection function for which the functional k opt had a minimum value were selected: The second stage involved manual correction of the FQRS locations. For that purpose, clinical experts were presented with a properly scaled FECG signal fragment together with the selected detection function. Additionally, the abdominal signal fragment along with maternal QRS markers were displayed to facilitate the task. Signal shifts in time caused by filtering were removed by appropriate correction delays. The expert's potential task was to remove an erroneous redundant detection, add a new, previously undetected FQRS complex or correct the position of the fiducial point determining the fetal R-wave. In accordance with this procedure, the fetal R-wave reference positions were determined for each record. Also, places were marked where detection of complexes was unreliable because the level of interferences was too high. For that purpose, an additional detection reliability flag was used, whose value 0 means unreliable detection and value 1 -a correct determination of the FQRS position. It is recommended that imprecisely detected heartbeat points should be omitted, for example when evaluating the detection efficiency. Moreover, it should be noted that the "reference" fetal heart rate signal in pregnancy records is accurate to a limited extent only, which is the result of numerous interferences significantly affecting the accuracy of individual R-wave locations. Nevertheless, the proposed approach is commonly used for analyzing FECG signals recorded during pregnancy if accurate reference data cannot be obtained 27,42-44 . www.nature.com/scientificdata www.nature.com/scientificdata/ Labour (intrapartum) signals. Records from labour monitoring include an indirect fetal electrocardiogram from four abdominal leads and a direct FECG signal recorded simultaneously from a fetal head. Direct FECG signal registration is the most reliable for the accurate determination of instantaneous FHR values 29 . Unfortunately, if recording takes place during active labour, it is extremely difficult to ensure good signal quality throughout the recording session due to frequent loss of contact between the electrode and the fetal head. This is caused by maternal movements or cyclical palpation to assess the progress of labour. On the other hand, it is during labour that the measurement environment is the most adverse when it comes to the quality of the FECG indirectly recorded from the abdominal wall 45 . The evaluation of how effective the detection of FQRS complexes is in these signals and in such conditions provides the most reliable information on the usefulness of abdominal electrocardiography. For intrapartum signals, the FHR reference signal was determined on the basis of the automated detection of R waves in a direct FECG signal and subsequently verified by clinical experts. For the detection of FQRS complexes, an algorithm using normalized matched filtering was applied to reduce sensitivity to interferences. The algorithm was accompanied by decision rules based on minimizing the cost function for predicting the length of consecutive fetal heart cycles. A detailed description of the fetal QRS detection algorithm is provided in 37 . The obtained data are the "gold standard", which is the precise FHR reference signal. The duration of each correctly verified signal was 5 minutes.
FHR signal characteristics. While visually interpreting the FHR signal a clinician tries to identify those signal features that indicate fetal well-being (e.g. accelerations being the rising heart rate relative to the FHR baseline that may be a response to fetal movement) and those that may be signs of fetal distress (e.g. decelerations being the lowering heart rate in relation to the FHR baseline that may be a result of uterine contraction). Based on the recognized episodes, the clinician interprets a given record as normal, abnormal or suspicious. This, in turn, implies further actions: prolonged monitoring, an additional ultrasound examination or even a decision on earlier pregnancy termination 46 . An automated signal analysis also includes the detection of acceleration/ deceleration episodes, tachycardia/bradycardia periods, as well as the estimation of the instantaneous FHR variability 47,48 that cannot be seen with the naked eye. The automated interpretation of the monitoring process using a reliable quantitative description of the FHR signal, which effectively assists the clinician in fetal state evaluation, is the main aspect of the clinical usefulness of modern fetal monitoring systems 3,8,30 . The reference pregnancy and labour FHR signals were subjected to the classic automated analysis using the computer-aided fetal monitoring MONAKO System. The analysis aimed to assess the diversity of the FHR signals in time domain given the type and number of recognized FHR variability patterns. The FHR signals represented in a form of time series of events were initially sampled at a frequency of 4 Hz (which is a standard in fetal monitoring based on the Doppler ultrasound method). The results of signal analysis were available both in numerical form and as graphic markers presented directly on FHR traces, e.g. duration and maxima/minima of the detected acceleration/deceleration patterns, respectively. amplitude relationships in abdominal signals. To analyze amplitude relationships of individual components in abdominal signals, dedicated measures based on Signal-to-Noise Ratio (SNR) were proposed, and the sum of low frequency, power line and muscle interferences was assumed as noise 33 . Muscle interferences are generated mainly by abdominal muscles, and they also result from the contraction activity of the uterus. Low-frequency and power line interferences are basically suppressed during preliminary signal filtering. However, muscle interferences are much more difficult to suppress because in a wide frequency range they coincide with the FECG signal. Based on the assumption that the amplitude of P and T waves is relatively small, a mean power of interferences PN was determined in the abdominal signal as a mean signal power outside the maternal and fetal QRS complexes. Further on, based on the assumption that there is no correlation between the useful signal and interferences, a mean MECG signal power PM was calculated as the difference between the signal power in places where only maternal QRS complexes (MQRS) occur (in the absence of coincidence with FQRS complexes) and the power of interferences. The mean FECG signal power PF was determined in an analogous way. The diversity of abdominal signals given the characteristics of particular components was described by two basic indices that allow relationships of amplitudes of MECG and FECG signals to be assessed in relation to interferences: • Index determining the MECG signal level in relation to interferences: • Index determining the FECG signal level in relation to interferences: F N Based on the difference between the indices, we can directly estimate the value of the WMF index, which indicates how many times the amplitude of the interfering maternal signal is higher than the useful FECG component.
In addition, a new index was proposed to describe energy changes of the MQRS and FQRS complexes in a given abdominal signal because lower QRS energy variation makes it possible to obtain a more uniform detection function and thus to increase the effectiveness of detecting subsequent heartbeats 14,19,[49][50][51] . After determining a mean QRS complex the coefficients of amplitude change for particular complexes, relative to a mean QRS, were determined according to the following formula: www.nature.com/scientificdata www.nature.com/scientificdata/ where: r i -is the amplitude change factor calculated for the i-th QRS complex, S -is the band width expressed in samples: MQRS = 100 ms, FQRS = 40 ms, QRS avg (k) and QRS i (k) -denote the k-th sample of the mean complex and the k-th sample of the i-th complex. On the basis of r i coefficients, calculated separately for MQRS and FQRS, indices characterizing energy changes of MQRS complexes in abdominal signals -WEM, and FQRS complexes -WEF were defined: where: J -is the number of MQRS complexes that do not overlap with FQRS complexes, I -denotes the number of FQRS complexes that do not overlap with MQRS complexes. Ideally, in the absence of changes in both the amplitude and shape of particular QRS complexes in a given signal the above indices are equal to zero. Index values are also affected by the level of interferences. If the amplitude of interference is comparable to a QRS amplitude, then index values take that into account. Unfortunately, in abdominal signals it is difficult to separate the FECG signal from muscle interferences, hence it is difficult to reliably estimate the energy changes of particular QRS complexes.

Data Records
The shared data were divided into two subsets marked B1_Pregnancy_dataset and B2_Labour_dataset. The subsets are stored on a server at the generalist repositories (figshare) integrated with Scientific Data 52 .
Until now, no record from the presented B1 pregnancy signal dataset has been made publicly available to scientists. As for the B2 dataset containing labour signals, the five records (r01, r04, r07, r08, r10) constituting only 9.6% of the duration of all currently presented abdominal signals, were used in previous publication 36 , and then made accessible through the PhysioNet 53 . In those records, the abdominal signals were resampled at 1 kHz for easier comparison with a direct FECG signal. The currently proposed B2 dataset contains 12 records accompanied by a detailed description of the amplitude relationships of individual components in abdominal signals, as well as the characteristics of clinically significant patterns in the FHR reference signal. Annotations indicating the location of fetal QRS complexes (developed on the basis of a direct FECG analysis) were extended by annotations indicating the location of maternal heartbeats. Each record was assigned numerical and graphic results of an automated analysis of the FHR signals important for fetal assessment.

B1_Pregnancy_dataset. The B1 pregnancy signal dataset consists of 10 records marked B1_Pregnancy_X
(where X is a record number), each containing four files (duration of signals: 20 minutes, sampling frequency: 500 Hz). In the binary file B1_abSignals_X.ecg saved in the LabView format there are four abdominal signals after preliminary filtering and four indirect FECG signals after the suppression of the interfering MECG by subtracting the maternal PQRST complex pattern and the first derivative of the QRS complex. Additionally, all signals were saved in the text file B1_abSignals_X.txt. The text file B1_Maternal_R_X.txt contains information (expressed as a sample number) on the fiducial points that indicate the locations of maternal QRS complexes (R-waves) in abdominal signals. The file B1_Fetal_R_X.txt contains information on the fiducial points for fetal QRS complexes in FECG signals. The fiducial points for FECG have been verified by clinical experts. Hence, each point has an attached reliability flag. If the flag equals 0, it means that the fetal R-wave position could not be verified by an expert due to a high level of interferences. On the other hand, 1 means that the R-wave position was correctly verified. A total of 18,936 MQRS and 28,405 FQRS complexes were found in the pregnancy dataset. The number of unverified FQRS complexes was 130 (0.46%). If the mean duration of the fetal heart cycle in B1 is assumed to be 421.1 ms (60000/142.5 bpm), this results in the FHR signal loss of less than 55 s in the entire 200-minute research material. For the value of 100 ms as the mean duration of the MQRS complex and 40 ms as the duration of FQRS, the number of maternal and fetal complexes for which coincidence did not occur was determined: 8,106 and 17,575 complexes, respectively.
The content of the B1 pregnancy signal dataset was analyzed in terms of the diversity of MECG and FECG amplitude relationships, as well as their relation to other interferences; mainly muscular as the analysis was performed on abdominal signals after suppression of low-frequency and power line interferences. Complete data are available in an online version only (Online-only Table 1), in the main subset of B1_Pregnancy_dataset. In this work, the discussed results relate only to mean values for all records. The values were obtained on the basis of the results from four particular abdominal channels (Table 1). It is clear that the amplitude of the dominant MECG in relation to interferences is more than five times higher -the mean value of the WM index is 14.3 dB. The WM value for particular records varies, but it always exceeds 10.9 dB. The mean value of the WF index describing the amplitude relationships of the FQRS to interferences is 3.4 dB. However, there are records for which WF is as high as 5 dB -the FQRS amplitude is almost twice as high as the interferences. For some recordings WF is negative, i.e. the FQRS level is below the interference amplitude. This provides proof for an unfavourable measuring environment, although such cases are very valuable in the process of validation of automated algorithms for the detection of FQRS complexes 18,36 . At the same time, the WMF index, whose mean value in this case is almost 11 dB, shows that the amplitude of MQRS complexes is about 3.5 times higher than FQRS (although the range is relatively wider: from 8.5 to 17.7 dB). It can be inferred from the analysis of the WEM and WEF indices describing changes in the amplitude of MQRS and FQRS complexes that the level of the MQRS amplitude is stable in all records -the www.nature.com/scientificdata www.nature.com/scientificdata/ B2_Labour_dataset. The B2 labour signal dataset consists of 12 records marked B2_Labour_X, where X is a record number with each record containing five data files. In the binary file B2_abSignals_X.ecg saved in the LabView format there are four abdominal signals after preliminary filtering and four FECG signals after the suppression of interfering MECG (signal duration: 5 minutes, sampling frequency: 500 Hz). The binary file B2_dFECG_X.ecg saved in the same format contains a direct FECG signal (raw and after preliminary filtering), registered simultaneously from a fetal head (signal duration: 5 minutes, sampling frequency: 1 kHz). All signals are also available in the text files marked as B2_abSignals_X.txt and B2_dFECG_X.txt, respectively. The text file   Table 3) recorded in pregnancy which includes six accelerations and two decelerations; the basal FHR is low -about 132 bpm.

technical Validation
Modern perinatal medicine is expected to enable the mother to give birth to a healthy and well-developed child. It is much more difficult to assess the condition of a fetus than to determine the health status of a child or an adult. The most common cause of perinatal morbidity and mortality is intrauterine hypoxia. The fetus responds to hypoxia with cardiovascular system changes, which results in fetal heart rate (FHR) variability. This indirectly affects oxygenation and functioning of the central nervous system 1,54 . Analysis of FHR variability, together with uterine muscle contractions and fetal movement activity, subject to cardiotocographic monitoring, currently play a fundamental role in fetal assessment 2,55 . The strength of cardiotocography lies in that normal ranges of the results of the FHR signal analysis almost always (>95%) confirm fetal wellbeing. Unfortunately, questionable or abnormal signal features may indicate both fetal distress and its absence 30,31 . The classic fetal heart rate variability analysis consists in determining the FHR baseline and then in identifying bradycardia/tachycardia, acceleration/ deceleration patterns as well as the type and amplitude of oscillations. A more advanced FHR analysis is aimed at evaluating instantaneous FHR variability, especially with beat-to-beat approach, which is very important in fetal    www.nature.com/scientificdata www.nature.com/scientificdata/ condition assessment 3,5 . The most common technique of recording the FHR signal is the Doppler ultrasound method, which makes it difficult to correctly estimate the instantaneous heart rate variability because the measurements are averaged. On the other hand, instantaneous heart rate variability plays a crucial role in the diagnosis of fetal condition 7,29 .
The above limitations inspired us to search for other, more effective ways to evaluate fetal condition. The increased interest in monitoring the fetal cardiac bioelectrical activity is due to the fact that the analysis of the fetal electrocardiogram ensures high efficiency and accuracy of the heart rate measurement even on a beat-to-beat level. The first fetal electrocardiogram was recorded as early as in the 1960-ies by means of a special spiral electrode enabling direct signal registration from a fetal head 11 . Due to the way the electrode is placed, its use is limited only to the advanced labour stage. The 1960-ies also saw the development of the first instrumentation that allowed FHR monitoring from the electrocardiogram, as well as of the set of dedicated parameters (used to date) to quantify FHR variability, supporting early recognition of fetal intrauterine hypoxia 7,47 . However, all the descriptive parameters require a highly accurate determination of instantaneous FHR values, and they, in turn, require a signal represented as time series of events 4,29 . Direct FECG registration, due to its invasiveness and application limited only to the advanced labour stage, has not been widely used.
An alternative method is to record the FECG indirectly -from electrodes placed on the surface of the maternal abdomen. This method is non-invasive and can be used both during pregnancy and labour. The method cannot be applied on a wider scale owing to the poor quality of the FECG signal recorded in the presence of numerous interferences 10,19 . Undoubtedly, the evaluation of its usefulness requires, above all, the effectiveness of the FQRS detection to be measured, which directly affects the continuity of FHR signal determination 18,26 . It depends on the entire abdominal signal processing channel: interference filtering, maternal electrocardiogram suppression and FQRS complexes detection 17,39,56 . The effectiveness estimates the usefulness of the FHR signal based on a non-invasive FECG for classic assessment of heart rate variability. In the literature 12,14,18,22,36,37 several different indicators have been defined to assess the effectiveness of the FQRS complex detection. The most objective ones are as follows: Performance Index (PI), Accuracy (Acc), Sensitivity (Se or S+), Positive Predictive Value (PPV or P+) and their harmonic mean F1 defined as follows:  (13) where: N -is the total number of the reference FQRS complexes, TP -is the number of true positive detections (correctly identified), FP -is the number of false positive detections (extra detected QRS complexes), FN -is the number of false negative detections (missed QRS complexes). However, in addition to analyzing data loss in an FHR signal, it is also necessary to assess the accuracy of FQRS complex detection, i.e. the accuracy of instantaneous FHR value measurement 7,25,29 . To assess the accuracy of RR cycles measurement, descriptive statistics of the differences ΔRR between the corresponding RR intervals were calculated by a given detection algorithm. Next, their reference values were determined. It seems to be of key importance to determine a mean absolute measurement error |ΔRR|, defined as the mean of absolute values of differences expressed in both milliseconds and in beats per minute. The value of this error estimates the usefulness of the FHR signal for assessing the clinically important fetal heart rate variability from beat to beat. The last step of the research should be the evaluation whether an FECG morphology analysis (assessment of the amplitude-time relationship between particular waves) is feasible as this provides completely new diagnostic information helpful for verifying the true fetal distress in cases of a recognized suspected or abnormal FHR signal 33,54,57,58 .
What makes it difficult to evaluate the effectiveness of various methods of the indirect FECG signal analysis is a limited number of publicly available testing signals of sufficient quality and duration with reference information provided 18 . For example, the available Daisy database (DDB) 59 comprises only single records registered in a patient in just 10 seconds, with a sampling frequency of only 250 Hz. The record consists of five abdominal and three thoracic leads and does not contain any expert annotations. The non-invasive fetal electrocardiogram database (NIFECGDB) 60 , available on PhysioNet, is larger and contains a series of 55 multichannel abdominal recordings (sampled with 1 kHz), acquired between the 21st and 40th week of pregnancy. Each record has three or four abdominal and two thoracic signals, but only annotations specifying the location of maternal R-waves are available. The Fetal ECG Synthetic Database (FECGSYNDB) 61 includes 1,750 five-minute simulations of 32 abdominal and two thoracic channels (in total 145.8 hours of data). The simulated data utilized the fecgsyn simulator 62 , which comprised seven varying physiological events, for ten different maternal and fetal heart dipole (2020) 7:200 | https://doi.org/10.1038/s41597-020-0538-z www.nature.com/scientificdata www.nature.com/scientificdata/ arrangements, at five noise levels. It should be noted that artificially modelled signals, even if the modelled parameters are changed in large ranges, will not fully reflect the nature of real abdominal signals, especially in the case of long-term pregnancy signals 10,14,18,42,43 .
The purpose of this publication is to provide an open access to the bioelectrical fetal heart activity signal datasets 52 recorded both during pregnancy (B1 dataset) and labour (B2 dataset) with reference heartbeats annotations. An important element of the research material is the reference time markers, verified by clinical experts, indicating the locations of maternal and fetal QRS complexes in signals. Such material seems to be necessary in the process of effective design, optimization or validation of various new methods of suppressing interferences in the abdominal signals, as well as methods of extraction and analysis of the fetal electrocardiogram that has been recorded indirectly.
As part of the work that our team has been conducting in this area for several years now, some of the currently presented data have already been used in our studies. Our initial investigations focused mainly on the methods to suppress the dominant maternal electrocardiogram in abdominal signals. The available literature contains various methods for MECG signal suppression. The methods are often referred to as FECG signal extraction methods because they were not only used to suppress the MECG, but also to reduce the influence of other interferences 12,25,[63][64][65][66] . In general, all methods for the MECG signal suppression can be divided into three main groups which deploy adaptive filtering, spatial filtering and techniques for subtracting the MECG pattern, as applicable. Different combinations of these methods are also commonly used 19,22,45,48,[67][68][69][70] . The selection of a given MECG suppression method depends on the electrode configuration. Our research team has made a basic assumption to focus only on methods that do not require additional chest electrodes. The operation of online algorithms, as well as their practical implementation in a small, mobile device for telemedical applications, was also considered to be a very important requirement 5,41 . In the works 35 we proposed a maternal electrocardiogram suppression method that was based on subtracting the maternal signal template covering the full heart cycle -a PQRST complex. Afterwards, the effectiveness of the method was shown only visually, on a small fragment of a single abdominal signal that had been recorded antenatally. The decisive factor was to precisely determine the fiducial points locating maternal R-waves, as well as to select coefficients for scaling the template during the subtraction process. In a series of experiments described in 40 , we noted a very significant negative impact of episodes with a coincidence of maternal and fetal QRS complexes. This led to the application of preliminary spatial filtering of abdominal signals to create an auxiliary, undisturbed MECG signal. Only the MECG signal was used to determine the locations of maternal R waves and to calculate the weighted coefficients of the maternal template during subtraction. Additionally, to minimize the influence of the sampling frequency of abdominal signals (500 Hz) on the determination of the fiducial points, we proposed an additional subtraction of the first derivative of the maternal QRS complex template. The effectiveness of the original MECG suppression methods with template subtraction was verified in 34 , with the use of dedicated measures and three records from the proposed B1 dataset.
In 37 , the complete abdominal signal processing channel was evaluated to ensure the highest continuity of fetal heart rate signal determination. In addition to the modified MECG suppression method based on the subtraction of the template created using Adaptive Impulse Correlated Filtering (AICF), a new approach with Projective Filtering of Time-Aligned Beats (PFTAB) was also used 20,32,71 . After suppressing the MECG component, the next step was the detection of FQRS complexes. In our research 37 , we examined the detection function based on matched filtering. We considered that way of FQRS feature extraction to be more effective than the classic time-constant bandpass filtering. On the other hand, the normalization of the matched filter output significantly reduced the sensitivity of the detection function to muscle interferences and enabled the selection of the correct peak of the detection function using decision rules based on the cost function minimization. In the above studies, the B1 pregnancy signal dataset, due to the lack of expert verification, was used only to optimize particular parameters for different MECG suppression and FQRS detection algorithms. In turn, the final performance evaluation of the examined methods was verified using three verified records from the presented B2 labour dataset. Among the best methods for processing abdominal signals, FQRS detection efficiency of PI = 81.4% was identified. However, the results were significantly different for each abdominal lead (70.4-99.8%). The detected FQRS complex was considered normal if it was no more distant than ± 40 ms from the reference marker determining the R-wave position. The limit value corresponds to the average of all fetal QRS widths in signals.
The next stage of our research concerned the evaluation of both the effectiveness and accuracy of the fetal R-wave location 36 . As many as 10 signals from the B2 dataset were used in these studies (with reference FHR determined based on the direct FECG). To suppress the MECG, the previously developed method for subtracting the maternal heart cycle template was applied. However, due to the fact that labour is an extreme measurement environment, two problems had to be solved: the prediction of the width of the maternal template for a particular lead and the construction of an additional template in cases of maternal heart arrhythmias. For the detection of FQRS complexes, a modified P&T algorithm was used, popular in adult electrocardiography 51,72,73 , where the detection function was based on a digital filter cascade with the frequency response magnitude adjusted to the spectrum of the FQRS in the analyzed signals. The detection threshold and additional validation criteria for periodicity prediction were selected adaptively. The obtained results confirmed the very high detection efficiency of FQRS complexes equal to Acc = 98% (Se = 98.97%, PPV = 98.99%, PI = 97.97%) and the accuracy of instantaneous FHR measuring -the mean absolute error of the measurement was equal to 2.14 ms (0.63 bpm). The obtained values were considered sufficient to analyze clinically relevant beat-to-beat FHR variability.
As a result of the work 36 , five selected records from the labour dataset were made available to the scientific community via the PhysioNet portal 53 as The abdominal and direct fetal electrocardiogram database (ADFECGDB). Additionally, in order to unify the sampling frequency, the abdominal signals were resampled to 1 kHz. In 2013, those signals were part of the research material in the "Noninvasive Fetal ECG: the PhysioNet/Computing in Cardiology Challenge" to develop effective methods for analyzing the abdominal fetal electrocardiogram. In total, over 50 different papers were submitted as part of the competition, mostly presenting already known methods (2020) 7:200 | https://doi.org/10.1038/s41597-020-0538-z www.nature.com/scientificdata www.nature.com/scientificdata/ for the abdominal FECG signal analysis 19,25,74 . The above investigations constitute a reliable validation of the data provided by our team. The technical quality of the data was thoroughly checked and confirmed during the competition, and it was never questioned by its participants in their subsequent publications 48,49,63,65,67,75-77 . Our last work concerned a comprehensive evaluation of non-adaptive FECG extraction methods based on the model of blind source separation by means of the Principal Component Analysis (PCA) and Independent Component Analysis (ICA) 33 . A comparative study was carried out using all records from the B2 dataset. For the first time, the proposed set of measures was used to quantitatively assess the diversity of the collected research material. The measures enabled the analysis of amplitude relationships of maternal and fetal signals, their relationship to interferences, as well as the assessment of the content of clinically important fetal heart rate patterns. The results obtained in the study confirmed the high usability of non-adaptive methods for fetal electrocardiogram extraction in terms of determining the fetal heart rate from abdominal signals. With the PCA method, the FQRS detection efficiency for the labour dataset (B2) was F1 = 98.56% (Se = 98.27%, PPV = 98.86%, Acc = 97.17%), while for ICA it amounted to F1 = 98.55% (Se = 98.23%, PPV = 98.87%, Acc = 97.13%).
To sum up, the abdominal fetal electrocardiography is currently at a stage of intensive development, and in the near future it may replace, to a large extent, the popular Doppler ultrasound method while ensuring that the accuracy of the fetal heart rate measurement will be similar to that of direct electrocardiography. Of great importance is also the economic aspect; the cost of recording bioelectrical signals is definitely lower. Moreover, it is a more convenient solution for telemedical home care, which is becoming increasingly popular in high risk pregnancy monitoring. We truly hope that the research material presented in detail in this article will translate into the international scientific community's increased interest in the topic of indirect fetal electrocardiography. The practical use of abdominal fetal electrocardiography in fetal condition monitoring, both in terms of the classic approach based on the analysis of heart rate variability and in terms of an additional analysis of changes in electrocardiogram morphology, is an extremely interesting scientific and research aspect to be studied as a possibility.