Researchers at University Medical Center Ho Chi Minh City employ a pretrained MobileNetV2 neural network to classify 3,164 microscopic vaginal discharge images into bacterial, fungal, or mixed-infection categories. They preprocess and augment images, then train and validate the model to achieve F1 scores above 0.75 and AUC-PR above 0.80, improving diagnostic consistency.

Key points

  • MobileNetV2 model classifies 3,164 wet-mount vaginal discharge images into bacterial (Group B), Gardnerella vaginalis (Group C), or fungal (Group F) infection categories.
  • Preprocessing pipeline includes 800×800px resizing, sharpening, rotations, and contrast adjustments to standardize and augment input data.
  • Model achieves F1 scores >0.75 and AUC-PR >0.80 across datasets, exceeding 0.90 performance for Gardnerella vaginalis detection, with 86.9% expert agreement.

Why it matters: By enabling rapid, standardized vaginitis screening with a mobile-friendly AI model, this approach can reduce diagnostic errors and expand access in resource-limited settings.

Q&A

  • What is MobileNetV2?
  • Why use F1 score and AUC-PR metrics?
  • How does image preprocessing improve classification?
  • What are clue cells and why are they important?
  • Can this model run on mobile devices?
Copy link
Facebook X LinkedIn WhatsApp
Share post via...


Read full article

MobileNetV2 Architecture

MobileNetV2 is a compact convolutional neural network designed for efficient on-device inference. It builds on depthwise separable convolutions, which split standard convolution into two stages: a depthwise convolution that applies a single filter per input channel, and a pointwise convolution (1×1) that combines channel outputs. This reduces computational cost and model size, making it ideal for mobile applications.

Key Components

  • Depthwise Separable Convolution: Decomposes standard convolution to reduce multiply-add operations dramatically without major loss of accuracy.
  • Inverted Residuals: Unlike standard residual blocks, MobileNetV2 uses inverted residuals that connect thin bottleneck layers and bypass wider intermediate layers. This preserves representational power with fewer parameters.
  • Linear Bottlenecks: Employ linear (non-ReLU) layers at low-dimensional embeddings to prevent information loss that can occur when applying activations after aggressive channel reduction.

Why MobileNetV2 Matters

Traditional deep networks like ResNet demand substantial memory and computation, limiting their use on smartphones or embedded devices. MobileNetV2’s architecture slashes both resource needs and latency, enabling real-time image classification for medical screening, augmented reality, and other on-device AI tasks.

Applications in Medical Imaging

In clinical contexts, MobileNetV2 can be embedded in portable diagnostic tools. For instance, as demonstrated in vaginitis screening, clinicians capture microscopic images of samples using a basic microscope and camera. The images are preprocessed and fed into MobileNetV2 running on a low-cost tablet or smartphone, providing immediate classification into infection categories and facilitating rapid treatment decisions.

Building Your Own MobileNetV2 Model

  1. Data Collection: Gather labeled images relevant to your application (e.g., medical slides, camera captures).
  2. Preprocessing: Resize images to a consistent size (commonly 224×224 or 320×320 pixels), normalize pixel values, and apply data augmentation (rotations, flips, color adjustments).
  3. Model Initialization: Load a pretrained MobileNetV2 on ImageNet to leverage transfer learning.
  4. Fine-Tuning: Replace the final classification layer to match your class count and train on your dataset with a lower learning rate.
  5. Deployment: Export the model using TensorFlow Lite or ONNX for mobile and edge devices.

Key Benefits for Longevity Enthusiasts

For those interested in aging and longevity, MobileNetV2 enables portable, low-cost health screening devices that detect age-related conditions—like early indicators of metabolic or vascular issues—outside clinical laboratories. By democratizing access to health data, individuals can monitor biomarkers linked to aging trajectories and intervene earlier to support healthy lifespan.

Applying machine learning with MobileNetV2 model for rapid screening of vaginal discharge samples in vaginitis diagnosis