QuantU-Net: Efficient Wearable Medical Imaging Using Bitwidth as a Trainable Parameter
Christiaan Boerkamp, Akhil John Thomas · 2025
Read QuantU-Net: Efficient Wearable Medical Imaging Using Bitwidth as a Trainable Parameter by Christiaan Boerkamp, Akhil John Thomas (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-08719.txt.
Introduction
Christiaan Boerkamp and Akhil Thomas introduced QuantU-Net in 2025, a compressed form of the U-Net image segmentation network for wearable medical devices. U-Net segments tumors well but is too heavy for low-power hardware. Their version treats bit width itself as a trainable parameter, learned during training with a quantization-aware library.
A custom loss blends segmentation error with a bit width penalty, so one training run finds a good size-accuracy balance instead of thousands of trials. The final model runs at about four bits of precision, keeps accuracy close to the full model, and shrinks about eightfold. Integer arithmetic suits field-programmable chips and other small accelerators.
Catalog record
| CREATOR | Christiaan Boerkamp, Akhil John Thomas |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 28 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-08719
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
QuantU-Net: Efficient Wearable Medical Imaging Using Bitwidth as a Trainable Parameter Christiaan Boerkamp, Akhil John Thomas Abstract Medical image segmentation, particularly tumor segmentation, is a critical task in medical imaging, with U-Net being a widely adopted convolutional neural network (CNN) architecture for this purpose. However, U-Net’s high computational and memory requirements pose challenges for deployment on resource-constrained devices such as wearable medical systems. This paper addresses these challenges by introducing QuantU-Net, a quantized version of U-Net optimized for efficient deployment on low-power devices like Field-Programmable Gate Arrays (FPGAs). Using Brevitas [ 7 ] , a PyTorch library for quantization-aware training, we quantize the U-Net model, reducing its precision to an average of 4.24 bits while maintaining a validation accuracy of 94.25%, only 1.89% lower than the floating-point baseline. The quantized model achieves an 8x reduction in size, making it suitable for real-time applications in wearable medical devices. We employ a custom loss function that combines Binary Cross-Entropy (BCE) Loss, Dice Loss, and a bitwidth Loss function to optimize both segmentation accuracy and the size of the model. Using this custom loss function we have significantly cut down on the training time to find an optimal combination of bitwidth of the model and accuracy from a hypothetical 6 23 6^{23} number of training sessions to a single training session by the aforementioned combination of loss functions. The model’s usage of integer arithmetic highlights its potential for deployment on FPGAs and other designated AI accelerator hardware. This work advances the field of medical image segmentation by enabling the deployment of deep learning models on resource-constrained devices, paving the way for real-time, low-power diagnostic solutions in wearable healthcare applications. 1 Introduction Medical image segmentation, particularly tumor segmentation, is a crucial task in the field of medical imaging. U-Net, a convolutional neural network (CNN) architecture, has been widely adopted for this purpose due to its effectiveness in handling biomedical images. However, the high computational and memory requirements of U-Net pose challenges for deployment on resource-constrained devices such as mobile phones or embedded systems. Quantization, the process of reducing the precision of the weights and activations of a neural network, offers a promising solution to this problem. By quantizing the model, we can significantly reduce its size and computational requirements, making it more suitable for deployment in real-world scenarios, particularly in wearable medical devices. Wearable medical devices are increasingly being used for continuous health monitoring, early diagnosis and therapeutics. [ 6 , 2 , 12 ] These devices often operate in environments where power usage is paramount, as a user’s life can depend on the device functioning reliably over extended periods. For instance, A wearable device capable of real-time cancer diagnosis, such as an AI-assisted ultrasound scanner for early tumor detection, could provide users with immediate insights that might otherwise require clinical imaging appointments. If such a device fails, it could delay critical diagnoses, potentially leading to worsened prognoses or missed treatment opportunities. However, the computational demands of deep learning models like U-Net can be a significant barrier to their effective deployment in such devices. The primary motivation for quantization in this study is to enable the deployment of the U-Net model on embedded devices, specifically Field-Programmable Gate Arrays (FPGAs) or other types of neural network accelerators. FPGAs are highly efficient for running quantized models due to their ability to perform integer arithmetic operations more efficiently than floating-point operations. According to studies, integer operations on FPGAs can be improved by an order of magnitude and require significantly less memory compared to floating-point operations [ 5 , 11 , 12 ] . This efficiency is crucial for wearable medical devices, where power consumption and battery life are critical factors. By quantizing the U-Net model, we aim to reduce its computational and memory footprint, making it feasible to run on low-power embedded systems without compromising the accuracy of tumor segmentation. This approach not only enhances the efficiency of the device but also extends its battery life, ensuring reliable operation over longer durations. The main contributions of this paper are as follows: • Baseline Floating-Point U-Net : We establish a baseline using a floating-point U-Net model for tumor segmentation. • Quantized U-Net with Brevitas : We quantize the entire U-Net model using Brevitas [ 7 ] , a PyTorch library for quantization-aware training. • Bitwidth Optimization : We make the bitwidth a trainable parameter and use gradient descent combined with a custom loss function to find the smallest possible bitwidth that retains the accuracy of the floating-point model. 2 Related Works Quantization-aware training (QAT) has been extensively studied as a method to mitigate the accuracy loss typically associated with quantization. QAT involves simulating the effects of quantization during the training process, allowing the model to adapt to the lower precision. Several studies have demonstrated the effectiveness of QAT in maintaining model accuracy while significantly reducing the model size and computational requirements. [ 4 ] Recent advances in QAT have explored the idea of treating bitwidth [ 3 , 8 ] as a trainable parameter, allowing the model to dynamically adjust the precision of its weights and activations during training. This approach can lead to more efficient models by optimizing the bitwidth for different layers or even individual neurons. Quantization has also been explored in the context of medical imaging, where the computational demands of deep learning models can be particularly challenging. 3 Dataset The dataset used in this study is the Breast Ultrasound Images Dataset [ 10 , 1 ] , a publicly available dataset. This dataset consists of breast ultrasound images categorized into three classes: normal, benign, and malignant. It is specifically designed for tasks such as tumor segmentation and classification, making it highly suitable for evaluating the performance of the U-Net architecture in medical image analysis. 3.1 Dataset Description The dataset contains a total of 780 images, distributed across the three classes as follows: • Normal : Images showing no signs of tumors or abnormalities. • Benign : Images containing benign tumors, which are non-cancerous and typically less aggressive. • Malignant : Images containing malignant tumors, which are cancerous and require immediate medical attention. Each image is provided in PNG format and is accompanied by a corresponding mask that outlines the region of interest (ROI), such as the tumor area. These masks are binary images where the tumor region is marked in white, and the background is black. The dataset also includes metadata, such as patient information and tumor characteristics, which can be used for further analysis. 3.2 Dataset Preprocessing The dataset is loaded from a structured directory, with images and their corresponding masks organized into subdirectories for each category: benign, malignant, and normal. The grayscale images are resized to a fixed resolution of 128\times 128 pixels, and their pixel values, along with those of the masks, are normalized to the range [0,1] by dividing by 255 to make them suitable for neural network input. For images without corresponding masks (e.g., normal cases), blank masks are generated to maintain consistency, and each image-mask pair is assigned a label (0 for benign, 1 for malignant, and 2 for normal). The dataset is then split into training (70%), validation (15%), and test (15%) subsets using a stratified approach