## 5 Conclusions  
This study makes a significant contribution to the application of neural networks for VF detection in AEDs by presenting a methodological workflow for the efficient deployment of pre-trained DNN models across diverse hardware platforms. This approach enables their practical use in OHCA scenarios where computational resources are inherently limited.  
A high-performance TensorFlow CNN model trained for VF detection on a GPU-based workstation was successfully converted into a LiteRT model with a compact size of 40 kB and deployed on a Raspberry Pi 4 microcontroller. The LiteRT model achieves the same high accuracy as the original TensorFlow DNN model on a very large cardiac arrest ECG test set (Se = 98.6% for VF, Sp = 99.5% for asystole, Sp = 99.6% for normal sinus rhythms, Sp = 98.9% for other non-shockable rhythms) while delivering a rapid and highly reproducible inference time of 1.064 \(\pm\) 0.025 ms--comparable to the GPU platform.  
Further optimization was achieved by quantizing and calibrating the LiteRT model using representative datasets with diverse sizes and content. This process included \(3\times 1300\) calibration tests, incorporating between 40 and 4000 cardiac arrest ECG signals, ensuring robust performance across varied scenarios. The optimization process resulted in two lightweight, integer-based models (IntQ and Full-IntQ) that are specifically tailored for resource-constrained hardware, such as the STM32F7 ARM Cortex-M7 microcontroller. These models, with sizes of 20 kB and 214 kB SRAM usage and inference times of \(615\pm 0.5\) ms, reproduce the accuracy of the original TensorFlow model (Se = 98.6%, Sp = 99.3-99.5%). Notably, quantization reduces the energy consumption of DNN model execution by approximately 7.85 times, significantly enhancing the longevity of edge-computing devices in real-world deployments.  
The demonstrated resource efficiency enables the deployment of these quantized LiteRT models on a wide range of edge devices with stringent flash memory and SRAM constraints. Moreover, their high accuracy supports reliable and real-time VF detection in AEDs, contributing to improved patient outcomes in critical OHCA scenarios. This study underscores the potential of optimized DNN models for advancing the functionality and accessibility of life-saving medical devices.  
Conceptualization, V.K., T.S. and I.J.; methodology, V.K., T.S. and I.J.; software, V.K. and T.S.; validation, V.K. and I.J.; formal analysis, V.K., T.S. and I.J.; investigation, V.K. and I.J.; resources, V.K., T.S. and I.J.; data curation, T.S.; writing--original draft, V.K. and I.J.; writing--review and editing, V.K., T.S. and I.J.; visualization, V.K., T.S. and I.J.; project administration, V.K.; funding acquisition, V.K. and I.J. All authors have read and agreed to the published version of the manuscript.  
This work was supported by the Bulgarian National Science Fund, grant number KIT-06-H42/3: \"Computer-aided diagnosis of cardiac arrhythmias based on machine learning and deep neural networks\".  
Not applicable.  
Restrictions apply to the availability of the data. Out-of-hospital cardiac arrest AED databases used in this study were obtained from a third party (Schiller Medical SAS, Wissembourg, France) and are available on request from the corresponding author with the permission of the third party.  
The authors would like to thank [PERSON] from Schiller AG, Baar, Switzerland for his valuable advice and discussions on the topic; [PERSON] and [PERSON] from Schiller Medical SAS, Wissembourg, France; and [PERSON], [PERSON], [PERSON], [PERSON] from the Brigade des Sapeurs-Pompiers de Paris (BSPP), who provided and annotated the OHCA ECG databases under evaluation in this study.  
The authors declare no conflicts of interest.