Back to Blog

Why Mosquito Identification Matters

Aedes aegypti and Aedes albopictus are the primary vectors of the Zika virus, which caused a major outbreak affecting over 1.5 million people across the Americas in 2015–2016. Early detection in surveillance traps is critical for outbreak prevention.

Traditional identification requires trained entomologists with microscopes — slow, expensive, not scalable. Deep learning offers automated, real-time species ID from a simple camera image.

IEEE Publication: Presented at ICIPTM 2026, IEEE Xplore — In-Press. Full citation

Dataset and Challenges

  • Class imbalance: Ae. aegypti dominated 60%+ of samples
  • Inter-species similarity: Ae. aegypti and Ae. albopictus wings look morphologically very close
  • Image quality variance: Motion blur, variable lighting, wing damage in field images
  • Intra-species variance: Same species from different regions can look different
Python
from tensorflow.keras.preprocessing.image import ImageDataGenerator

datagen = ImageDataGenerator(
    rotation_range=30,
    width_shift_range=0.2, height_shift_range=0.2,
    shear_range=0.15, zoom_range=0.2,
    horizontal_flip=True, vertical_flip=True,
    brightness_range=[0.7, 1.3],
    fill_mode='nearest',
    validation_split=0.2
)
train_gen = datagen.flow_from_directory(
    'dataset/', target_size=(224, 224),
    batch_size=32, subset='training',
    class_mode='categorical'
)

Ensemble Architecture

We trained three CNNs separately with ImageNet pre-trained weights, then combined via soft voting:

Python
from tensorflow.keras.applications import VGG16, ResNet50, EfficientNetB3
from tensorflow.keras.layers import GlobalAveragePooling2D, Dense, Dropout
from tensorflow.keras.models import Model
import numpy as np

def build_transfer_model(base_arch, num_classes=6):
    base = base_arch(weights='imagenet', include_top=False, input_shape=(224,224,3))
    base.trainable = False
    x = GlobalAveragePooling2D()(base.output)
    x = Dense(256, activation='relu')(x)
    x = Dropout(0.4)(x)
    out = Dense(num_classes, activation='softmax')(x)
    return Model(inputs=base.input, outputs=out)

vgg_model = build_transfer_model(VGG16)
res_model = build_transfer_model(ResNet50)
eff_model = build_transfer_model(EfficientNetB3)

# Soft voting ensemble
def ensemble_predict(models, X_input):
    probs = [m.predict(X_input) for m in models]
    return np.mean(probs, axis=0)

Fine-Tuning Strategy

  1. Stage 1 (5 epochs): Train top classification head only. LR = 1e-3.
  2. Stage 2 (10 epochs): Unfreeze last 20 base layers. LR = 1e-5.
  3. Stage 3 (15 epochs): Full end-to-end with cosine annealing + early stopping.

Results

89.3%VGG16 Accuracy
91.7%ResNet50 Accuracy
92.4%EfficientNetB3
94.8%Ensemble (Ours) ✓

Deployment Potential

Tested on Raspberry Pi 4 with 5MP camera — inference under 2 seconds per image. Viable for:

  • Automated mosquito trap monitoring in Zika-endemic regions
  • Drone-based surveillance with onboard edge inference
  • Low-cost field kits for health workers in rural areas

Full code + weights: github.com/06Neel

VGG16ResNet50EfficientNet Ensemble LearningTransfer Learning Zika VirusIEEE ICIPTM 2026