spot_img
HomeResearch & DevelopmentAI Model for Anemia Detection: Balancing Performance and Efficiency...

AI Model for Anemia Detection: Balancing Performance and Efficiency on Portable Devices

TLDR: This research explores using a lightweight AI model (MobileNet) to detect anemia from images of conjunctival pallor, aiming for deployment on portable devices. The model achieved high accuracy (93.13%) without quantization. Post-training quantization was applied to reduce model size and improve speed. While half-precision (FP16) quantization maintained high accuracy (92.50%) and significantly improved efficiency, more aggressive integer quantizations (INT8 and INT4) led to substantial performance degradation, indicating a critical trade-off between compression and diagnostic accuracy for this application.

Anemia is a widespread global health concern, particularly affecting young children in low-resource settings. Traditional methods for detecting anemia often require expensive equipment and specialized knowledge, creating significant barriers to early and accurate diagnosis. To address these challenges, researchers have been exploring the use of deep learning models to detect anemia by examining conjunctival pallor, which is the paleness of the inner eyelid.

A recent study, titled “Performance Analysis of Post-Training Quantization for CNN-based Conjunctival Pallor Anemia Detection,” delves into this promising area. The research, conducted by Sebasti´an A. Cruz Romero and Wilfredo E. Lugo Beauchamp, focuses on optimizing these AI models for deployment on edge devices, such as smartphones or portable diagnostic tools, where computational resources are limited. You can read the full research paper here.

The CP-AnemiC Dataset: A Foundation for Detection

The study utilized the CP-AnemiC dataset, a large and publicly available collection specifically designed for anemia detection through conjunctival pallor analysis. This dataset comprises 710 conjunctival images from children aged 6 to 59 months, gathered from healthcare facilities in Ghana. The images are carefully annotated with crucial information, including hemoglobin levels, age, gender, and collection site, providing a robust foundation for training machine learning models.

MobileNet Architecture and Training

The researchers employed the MobileNet architecture as the backbone for their anemia classification model. MobileNet is well-known for its efficiency in mobile and embedded vision applications, making it an ideal choice for this project. The model was fine-tuned using data augmentation techniques, such as random horizontal flips, rotations, and scaling, to enhance its ability to generalize to new, unseen images. A 5-fold cross-validation strategy was implemented, ensuring the model’s performance was consistently evaluated across different subsets of the data. The training was conducted on a powerful NVIDIA GPU, with the model learning to classify images as either anemic or non-anemic.

Optimizing for Edge Devices: Post-Training Quantization

A key aspect of this research was the exploration of post-training quantization (PTQ). Quantization is a technique used to reduce the size and computational requirements of neural networks by lowering the numerical precision of their weights and activations, typically from 32-bit floating-point (FP32) to lower bit-widths like 8-bit integer (INT8). This process makes models more suitable for deployment on resource-constrained edge devices.

The study evaluated the impact of different bit-widths on model performance: FP32 (full precision), FP16 (half precision), INT8, and INT4. The model was converted into the Open Neural Network Exchange (ONNX) format, a universal representation that ensures compatibility across various frameworks and optimization tools. NVIDIA’s ModelOpt and TensorRT were used to apply the quantization, with different algorithms employed for INT8 and INT4 to determine optimal scaling factors.

Performance Insights: Accuracy vs. Efficiency

The initial MobileNet model, without quantization, achieved impressive results, with an F1 score of 0.9428 and an accuracy of 93.13% during inference. When post-training quantization was applied, the researchers observed a nuanced trade-off between computational efficiency and predictive accuracy.

FP16 quantization proved to be highly effective, maintaining strong performance with only minimal reductions in accuracy (92.50%) and F1 score (0.9377). This level of quantization also significantly reduced the model size (from 9.13 MB to 4.61 MB) and achieved the fastest execution time (37.4 milliseconds), making it an excellent candidate for edge deployment.

However, more aggressive quantization techniques, such as INT8 and INT4, led to significant performance degradation. INT8 quantization resulted in a substantial decrease in accuracy to 71.25%, and surprisingly, an increase in model size and latency, likely due to overhead from quantization parameters. INT4 quantization caused a drastic performance drop, with accuracy falling to just 43.13%, and also resulted in the largest model size, indicating inefficiencies at such ultra-low precision.

Also Read:

Conclusion and Future Directions

This study highlights the potential of lightweight architectures like MobileNet for accurate anemia detection using conjunctival pallor analysis. While FP16 quantization offers a promising balance between performance and efficiency for edge devices, the results suggest that more aggressive quantization levels may severely compromise diagnostic accuracy. Future work will focus on achieving full integer arithmetic within the models and further studying inference latency on specific edge devices like the NVIDIA Jetson Xavier NX and TX2 NX, aiming to leverage mixed-precision arithmetic for enhanced execution speed while maintaining diagnostic integrity.

Meera Iyer
Meera Iyerhttps://blogs.edgentiq.com
Meera Iyer is an AI news editor who blends journalistic rigor with storytelling elegance. Formerly a content strategist in a leading tech firm, Meera now tracks the pulse of India's Generative AI scene, from policy updates to academic breakthroughs. She's particularly focused on bringing nuanced, balanced perspectives to the fast-evolving world of AI-powered tools and media. You can reach her out at: [email protected]

- Advertisement -

spot_img

Gen AI News and Updates

spot_img

- Advertisement -