Authors’ overview
Deep learning models have shown strong performance in medical image analysis, but deploying them in low-resource clinical environments remains difficult due to computational, memory, and power constraints. This paper presents a multi-strategy compression framework for brain tumor classification from MRI, encompassing quantization-aware training, knowledge distillation from a DenseNet-101 teacher to a compact DenseNet-32 student with low-bit post-training quantization, and Float16 post-training quantization on a lightweight MobileNetV2 backbone. Using a multi-class brain tumor MRI dataset containing glioma, meningioma, pituitary tumors, and healthy controls, we provide full experimental validation of the MobileNetV2-based pipeline, training the classifier through a three-stage transfer learning process and applying Float16 quantization via TensorFlow Lite. The DenseNet-based distillation and quantization-aware training strategies are described as complementary compression approaches within the framework, with their complete empirical evaluation reserved for future work. Experimental results on the MobileNetV2 pipeline show that the quantized model achieves 82.37 percent validation accuracy compared to the 82.20 percent full-precision baseline, reducing model size from 35.34 MB to 5.76 MB, a 6.14x compression ratio with no meaningful accuracy loss. Per-class evaluation confirms that quantization preserves diagnostic performance uniformly across all four tumor categories. These findings demonstrate that lightweight quantized models can deliver clinically viable brain tumor screening in resource-constrained healthcare settings.
Introduction
Deep learning has rapidly transformed medical image analysis by enabling automated detection and classification of complex pathological patterns with accuracy approaching that of expert clinicians. Convolutional Neural Networks (CNNs), in particular, have demonstrated strong performance across a wide range of radiological tasks, including tumor detection, organ segmentation, and disease staging from MRI, CT, and X-ray images. In neuro-oncology, MRI-based brain tumor classification has benefited significantly from deep architectures such as DenseNet, ResNet, and MobileNet, which leverage deep feature reuse, residual connections, and efficient inverted bottleneck designs to capture subtle structural variations across tumor types. These advances promise faster screening, reduced diagnostic burden, and improved clinical decision support. However, most high-performing deep models are computationally intensive, requiring GPUs, large memory footprints, and stable power supply, assumptions that do not hold in many real-world healthcare environments. Rural clinics, mobile diagnostic units, and under-resourced hospitals often operate with limited hardware, low-power CPUs, or edge devices where deploying full-precision deep networks is impractical. As a result, there is a growing gap between algorithmic capability and deployable clinical utility. Bridging this gap requires not only accurate models but also efficient ones, models that preserve diagnostic performance while operating under strict compute and memory constraints.
Model compression and numerical efficiency techniques have therefore become central to the emerging field of edge medical AI. Among these, quantization, the reduction of numerical precision of model weights and activations, has emerged as one of the most practical and hardware-compatible approaches for accelerating inference and reducing model size. By converting floating-point parameters (typically 32-bit) into lower-bit representations such as Float16 or INT8, quantization can substantially decrease memory usage and increase throughput on commodity processors and specialized accelerators. Two major paradigms exist: post-training quantization (PTQ), which compresses a trained model after convergence, and quantization-aware training (QAT), which simulates low-precision arithmetic during training so that the network learns robustness to quantization noise. While PTQ is simpler to apply, QAT often yields better accuracy retention, especially for deeper architectures. Complementing numerical compression, structural compression methods such as knowledge distillation train smaller ”student” networks to mimic the outputs of larger ”teacher” models, transferring representational power while reducing architectural complexity. Together, quantization and distillation form a powerful toolkit for designing lightweight yet accurate models suitable for edge deployment. Despite substantial progress in efficient deep learning, relatively few studies systematically evaluate these strategies in the context of multi-class brain tumor MRI classification with explicit deployment goals for low-resource healthcare settings.
In this work, we present a multi-strategy compression framework for brain tumor image classification that encompasses Float16 post-training quantization, quantization-aware training, and knowledge distillation to produce deployment-ready models for low-resource environments. Using a curated multi-class MRI dataset containing glioma, meningioma, pituitary tumors, and non-tumor cases, we provide full experimental validation of a MobileNetV2-based pipeline, training the classifier through a three-stage transfer learning process, frozen-backbone head training, full-model fine-tuning, and extended low-learning-rate refinement, followed by Float16 post-training quantization via TensorFlow Lite. As complementary compression strategies within the framework, we additionally describe a quantization-aware training approach using the TensorFlow Model Optimization Toolkit with representative dataset calibration for INT8 conversion, and a knowledge distillation pipeline where a compact DenseNet-32 student model learns from a higher-capacity DenseNet-101 teacher, followed by low-bit post-training quantization. Complete empirical evaluation of these two complementary strategies is reserved for future work. Across all strategies, we evaluate not only classification accuracy but also model size and deployment feasibility, emphasizing practical edge performance rather than accuracy alone.
Problem Setting and Task Definition
This study focuses on efficient deep learning methods for multi-class brain tumor classification from magnetic resonance imaging (MRI) scans under low-resource deployment constraints. The primary objective is to design, train, compress, and evaluate convolutional neural network models that maintain high diagnostic accuracy while significantly reducing model size and inference cost. We frame the problem as a supervised multi-class image classification task with four output categories: glioma tumor, meningioma tumor, pituitary tumor, and no-tumor (healthy control). Given an input MRI slice image, the model predicts the tumor class label.
Unlike conventional medical imaging model development, which optimizes primarily for predictive performance, our methodology explicitly incorporates deployment efficiency constraints. We therefore evaluate not only classification accuracy but also model footprint, numerical precision, and inference efficiency. To support this objective, we present a multi-strategy compression framework encompassing three approaches: (1) Float16 post-training quantization on a MobileNetV2 backbone, which serves as the primary experimentally validated pipeline, (2) quantization-aware training (QAT) with full-integer deployment conversion using representative dataset calibration, and (3) knowledge distillation from a high-capacity DenseNet-101 teacher model to a compact DenseNet-32 student model followed by low-bit post-training quantization. A full-precision MobileNetV2 baseline trained through a three-stage transfer learning process is first established to provide an upper-bound performance reference. The QAT and DenseNet distillation strategies are described as complementary compression approaches within the framework; their complete empirical evaluation is reserved for future work.
Brain Tumor MRI Dataset
Each image represents a 2D MRI slice centered on the brain region, with tumors visible through intensity and texture differences relative to surrounding tissue. The dataset exhibits natural variability in tumor size, location, and shape, making it suitable for evaluating deep CNN feature learning and robustness.
Images are stored in RGB or grayscale format and vary slightly in resolution across sources. Prior to training, all images are standardized through resizing and normalization (described below). The dataset is pre-divided into training and testing folders, and we further derive a validation split from the training portion to support model selection and early stopping.
Data Splitting Strategy
To ensure fair and stable evaluation, we adopt a three-way split. The training set is used for model parameter learning, the validation set for hyperparameter tuning and early stopping, and the test set is held out for final performance reporting. The dataset contains 2,870 training images and 609 test images distributed across the four classes. For the MobileNetV2 pipeline, a 20% stratified validation split is drawn from the training data using Keras’s ImageDataGenerator, yielding 2,297 training and 573 validation images while preserving class balance. The proposed DenseNet-based distillation pipeline would adopt an identical splitting strategy to ensure comparable evaluation conditions across compression approaches. No subject-level overlap is introduced between training and test folders where such metadata is available, and all compression and quantization calibration procedures use only the training distribution, ensuring no test data leakage.
Data Augmentation
Missing regions introduced by spatial transforms are filled using nearest-neighbor interpolation. These transformations simulate realistic acquisition variability, including patient positioning differences, scanner intensity drift, and field-of-view variations, while preserving tumor semantics. The same augmentation configuration would be applied to the DenseNet teacher and student training phases to maintain consistency across the framework. Each epoch sees varied versions of the same underlying images, effectively expanding the training distribution without requiring additional labeled data.
Backbone Selection
We select MobileNetV2 as the primary backbone for the experimentally validated pipeline. MobileNetV2 was originally designed for mobile and edge applications, making it a natural fit for our deployment-constrained setting. The architecture relies on inverted residual blocks with linear bottlenecks, where each block first expands the channel dimension through a pointwise convolution, applies a depthwise separable convolution to capture spatial features, and then projects back to a lower-dimensional representation. This expansion-and-compression pattern allows the network to learn rich feature representations without the parameter overhead of standard convolutions. We load weights pretrained on the ImageNet dataset, which provides a strong initialization for visual feature extraction despite the domain gap between natural images and MRI scans. The backbone contributes approximately 2.2 million parameters, and the full model including the classification head totals 3,053,380 trainable parameters, roughly an order of magnitude smaller than architectures like ResNet-50 or DenseNet-121, which commonly appear in medical imaging work but are poorly suited to memory-limited deployment targets.
Training and Quantization Pipeline
For deployment, the trained Float32 model was converted to TensorFlow Lite format using Float16 post-training quantization, which reduces weight bit-width while preserving dynamic range. The proposed DenseNet-based distillation pipeline would follow a similar multi-stage training strategy, with the DenseNet-101 teacher trained first and the DenseNet-32 student learning from softened teacher outputs before undergoing low-bit post-training quantization. Similarly, the proposed QAT approach would insert simulated quantization nodes during training and convert to full-integer INT8 format using a representative dataset of 100 training images for activation range calibration. Complete implementation and empirical evaluation of these two complementary strategies is reserved for future work.
Metrics and Evaluation
For classification performance, we report overall accuracy on the held-out validation set (573 images, stratified across all four classes). In addition, we compute per-class precision, recall, and F1-score using scikit-learn’s classification report, providing a fine-grained view of how well the model distinguishes each tumor type and the healthy control class. Precision measures the fraction of predicted positives that are truly positive, which is critical in clinical screening to minimize unnecessary follow-up procedures caused by false alarms. Recall measures the fraction of actual positives that are correctly identified, which is equally important to ensure that true tumor cases are not missed during automated screening. The F1-score provides their harmonic mean, balancing both concerns into a single per-class measure. These per-class metrics are especially important in medical imaging, where misclassifying one tumor type as another can carry different clinical consequences than a simple aggregate accuracy number would suggest. For instance, misclassifying a glioma as a meningioma could lead to an inappropriate treatment plan, while a false negative on the no-tumor class could result in unnecessary patient anxiety and further invasive testing.
For compression efficiency, we compare the original full-precision model (Float32) and the Float16 quantized model along two primary axes: model size on disk (measured in megabytes) and the resulting compression ratio (original size divided by quantized size). These metrics directly indicate the feasibility of deploying the model on storage-constrained and memory-limited edge devices commonly found in low-resource clinical environments. A higher compression ratio implies a smaller memory footprint and, in practice, faster model loading times on devices with limited RAM and storage bandwidth.
Inference on the quantized model is performed using the TensorFlow Lite interpreter, and each validation image is processed individually to simulate realistic single-image inference conditions as would be expected on an edge device serving one patient scan at a time. The same evaluation protocol would be applied to the DenseNet distillation and QAT pipelines once implemented, ensuring comparable metrics across all compression strategies. All evaluation is performed exclusively on data not seen during training or quantization calibration, ensuring that reported metrics reflect genuine generalization rather than overfitting to the training distribution.
Compression Efficiency
At 5.76 MB, the quantized model is small enough to fit in the on-chip memory of many ARM-based microcontrollers and single-board computers used in portable diagnostic equipment. For context, a Raspberry Pi 4 with 1 GB of RAM could load this model alongside the operating system and inference runtime with memory to spare, whereas the 35.34 MB Float32 model would consume a much larger share of available resources and leave less room for concurrent processes such as image acquisition and user interface rendering.
Conclusion and Future Work
This study presented a multi-strategy compression framework for deploying deep learning-based brain tumor classifiers on resource-constrained hardware, encompassing Float16 post-training quantization, quantization-aware training, and knowledge distillation. As the primary experimentally validated pipeline, we trained a MobileNetV2-based multi-class classifier for four categories of brain MRI scans, glioma tumor, meningioma tumor, pituitary tumor, and no tumor, and applied Float16 post-training quantization via TensorFlow Lite to compress the model for edge deployment.
Despite these promising results, several limitations should be acknowledged. The dataset used in this study, while well-suited for multi-class benchmarking, is moderate in size and sourced from a limited number of acquisition sites. Performance on more heterogeneous, multi-institutional MRI collections remains to be validated. Additionally, while Float16 quantization provided an excellent balance between compression and accuracy retention, more aggressive quantization schemes such as full INT8 conversion may yield further size and latency improvements at the cost of some diagnostic accuracy, and deserve systematic investigation.
Several directions remain for future work. The most immediate priority is completing the empirical evaluation of the two complementary compression strategies described in this paper: quantization-aware training with INT8 conversion using representative dataset calibration, and knowledge distillation from a DenseNet-101 teacher to a DenseNet-32 student followed by low-bit post-training quantization. A side-by-side comparison of all three pipelines, MobileNetV2 with Float16 PTQ, QAT with INT8, and distillation with quantization, would provide a comprehensive picture of the accuracy-efficiency trade-offs available for edge deployment of brain tumor classifiers. Beyond completing the framework evaluation, future efforts should measure end-to-end inference latency on actual embedded hardware, including ARM Cortex-based microcontrollers and neural processing units, to complement the model size metrics reported here with real-world throughput measurements. Extending the framework to larger and more diverse MRI datasets, incorporating additional imaging modalities such as T2-weighted and FLAIR sequences, and validating against expert radiologist annotations in prospective clinical trials would further establish the reliability and generalizability of quantized models for real-world medical imaging diagnostics in under-resourced environments.


