Md Farhad Zaman

Full-Stack Software & AI Engineer

INITIALIZING AVIONICS & TELEMETRY...
NEXT.JS 16 SSR • THREE.JS WEBGL • WEBSOCKET CORE
← Back to Projects
Manchester Metropolitan University•Jan 2026 – Aug 2026•vision

Cross-Domain Melanoma Detection via Unsupervised Domain Adaptation

MSc Dissertation research at Manchester Metropolitan University (Supervised by Dr. Taysir Dyhoum) establishing the first unified benchmark of 9 unsupervised domain adaptation (UDA) methods across adversarial, statistical, and distillation families on an EfficientNet-B2 backbone to overcome domain shift between dermoscopy and clinical photography for melanoma detection.

Executive Overview & Key Engineering Deliverables
  • Clinical Imaging Disparity: Addressed the diagnostic domain gap between controlled dermoscopic imaging and ordinary clinical photographs, enabling dermatological AI generalisation to non-specialist and smartphone settings.
  • 9 UDA Architectures Evaluated: Benchmarked DANN, CDAN, MCD, FFTAT-inspired (adversarial), Deep CORAL, MMD, JAN (statistical), and EKDA-inspired, CRPL-inspired (distillation/prototypes) under a unified evaluation framework.
  • Extensive 5-Seed Empirical Protocol: Evaluated across 3 cross-domain scenarios (Derm7pt, ISIC 2018 to PAD-UFES-20 with 34:1 imbalance, Milk10k) on 6 held-out test sets across AUROC, AUPRC, Melanoma Recall, and Expected Calibration Error (ECE).
  • Sensitivity vs. Calibration Discovery: Proved that high-recall methods (MCD recall 66.7%, CRPL recall 63.4%) incur severe calibration penalties (ECE > 24%), whereas EKDA distillation gains recall while achieving best-in-class calibration (ECE 10.88%).
PyTorchEfficientNet-B2Unsupervised Domain AdaptationGrad-CAMMedical Image AnalysisDeep CORALDANNEKDA DistillationCUDAPython
UDA Methods
9 Algorithms
Backbone
EfficientNet-B2
Top AUROC
71.8% (CRPL)
Top ECE
10.9% (EKDA)
LIVE SYSTEM SIMULATION & INTERACTIVE PREVIEW
STATUS: ACTIVE WEBGL/SIM
UNSUPERVISED DOMAIN ADAPTATION // MELANOMA DETECTION STUDIO
EFFICIENTNET-B2 • 9 UDA BENCHMARKS • GRAD-CAM EXPLAINABILITY (MMU 2026)
UNSUPERVISED DOMAIN ADAPTATION // MELANOMA STUDIO

EFFICIENTNET-B2 BACKBONE • 9 UDA BENCHMARKS • MMU RESEARCH

SCENARIO:
SAME-PATIENT PAIREDPure modality shift. Identical patient lesions photographed with polarized dermoscopy and clinical camera.
UDA METHOD SELECTOR (9 BENCHMARKED ARCHITECTURES):Backbone: EfficientNet-B2 (1,408-d features)
DISCRIMINATION (AUROC)
71.75%
95% CI: [69.8, 73.5]
MINORITY PRECISION (AUPRC)
31.21%
95% CI: [30.2, 34.6]
MELANOMA RECALL (0.5 THRESH)
63.40%
95% CI: [60.5, 66.2]
CALIBRATION ERROR (ECE)
24.86%
Lower is better (Reliability)
INFERENCE LATENCY
14.8ms
Single Image Forward Pass
Pause Loop
Reset Epoch
EPOCH: 75%
CONVERGED // DOMAIN INVARIANCE ACHIEVED
DUAL-STREAM UNIFIED ADAPTATION PIPELINE // EFFICIENTNET-B2 BACKBONE
Loss Schedule λ(p): 0.999•H-Divergence: 0.54
SOURCE DOMAIN (Ds)Polarized DermoscopyDerm7pt (D7D) • ISIC 2018TARGET DOMAIN (Dt)Clinical PhotographyD7C • PAD-UFES (Smartphone)SHARED BACKBONEEfficientNet-B2 (G_θ)MBConv1..2 (Low-Level Edge)MBConv3..5 (Lesion Textures)1,408-d Latent Features (f)ADAPTIVE ALIGNMENT ENGINEDISTILLATION // CRPL-InspiredPrototypes & Distillationμ_mel / μ_ben Centroid AnchorsCalibration ECE: 10.88% (Preserved)EMA Teacher → Student LogitsSOURCE CLASSIFIER (C_φ)Supervised Binary Cross-EntropyL_cls = BCE(C(f_s), y_s)Source AUROC: 88.4%TARGET PREDICTIONClinical Photography OutputAUROC: 70.83%Target ECE: 24.9%Recall: 63.4%
Mathematical Objective: L_total = L_bce + λ_proto · Σ_c ||z_target - μ_c||²
Domain Gap Reduction: 64%
ACTIVE UDA MECHANISM

Prototype clustering loss pulling target features toward class-conditional source centroid anchors.

distillation family
CLINICAL MOTIVATION

Deep neural networks trained on high-resolution dermoscopy experience severe generalization collapse on smartphone photography due to sensor noise, uneven ambient lighting, and patient skin tone variation.

EMPIRICAL BENCHMARK FINDING

CRPL-Inspired Prototypes achieves 71.8% AUROC and 63.4% recall on held-out target data without requiring any target training labels.

FULL-STACK SYSTEM ARCHITECTURE SPECIFICATION
CLIENT & UI TIER
  • Interactive diagnostic visualizer with multi-scenario comparison across 6 held-out test sets (D7D, D7C, M10D, M10C, ISIC18, PAD).
  • Layer-wise Grad-CAM activation heatmap visualizer overlaying lesion boundaries and diagnosing clinical artifact vulnerabilities.
  • Reliability diagrams and calibration error plots evaluating Expected Calibration Error (ECE) across decision thresholds.
  • 2D latent feature space scatter visualizer projecting source vs target distribution alignment in full vs ablated modes.
API & REAL-TIME ENGINE
  • Shared EfficientNet-B2 feature extractor (G_theta) initialized with ImageNet pretraining, extracting 1408-dimensional feature representations.
  • Dual-loss objective function (L_total = L_cls + lambda * L_ada) with binary cross-entropy on source labels and unsupervised domain alignment on target samples.
  • Adversarial domain discriminators with Gradient Reversal Layers (GRL) and multilinear conditioning (CDAN).
  • Statistical second-order covariance alignment (Deep CORAL) and multi-kernel Maximum Mean Discrepancy (MMD / JAN).
  • Teacher-student exponential moving average knowledge distillation (EKDA) and cluster-preserving prototypes (CRPL).
DATA & INFRASTRUCTURE
  • ISIC 2018 benchmark dermoscopic archive (10,015 images collapsed into binary melanoma vs other).
  • PAD-UFES-20 clinical photography collection (2,298 smartphone photos with severe 34:1 class imbalance).
  • Derm7pt paired dataset (1,011 dermoscopic and clinical lesion pairs across identical patients).
  • Milk10k paired dataset (5,240 paired dermoscopic and clinical images).
  • PyTorch 2.x analytical runtime with CUDA acceleration and mixed-precision forward passes (~14.2ms GPU latency).
  • 2,000-iteration stratified image-clustered bootstrap uncertainty estimation pipeline.
  • Standardized 5-seed reproducibility harness with deterministic seeds and fixed hardware configurations.
ROLE-BASED WORKFLOW SPECIFICATION (RBAC)
Lead Deep Learning & Computer Vision ResearcherRESEARCH & ALGORITHM DESIGN
  • ▸Formulated the benchmarking research design evaluating 9 UDA algorithms on EfficientNet-B2 under unified training protocols
  • ▸Engineered custom PyTorch modules for GRL domain confusion, covariance alignment, MMD kernels, and distillation loss functions
  • ▸Designed the binary melanoma classification pipeline with class-balanced weighting and stratified data splitting
  • ▸Conducted 2,000-iteration stratified image-clustered bootstrap uncertainty estimation
Clinical AI & Diagnostic Evaluation SpecialistCLINICAL EVALUATION & METRICS
  • ▸Evaluated cross-modality diagnostic shifts between dermoscopy and clinical smartphone photography
  • ▸Analyzed the critical trade-off between melanoma sensitivity (recall) and clinical overconfidence (ECE)
  • ▸Investigated severe class imbalance challenges using PAD-UFES-20 (34:1 ratio) via minority-sensitive AUPRC
  • ▸Validated model generalisation across 6 held-out test datasets without target labels
Model Explainability & Grad-CAM AuditorEXPLAINABILITY & RELIABILITY
  • ▸Implemented Grad-CAM activation mapping to audit neural attention across lesion boundaries
  • ▸Identified spurious feature artifacts including hair follicles, skin folds, and clinical lighting variations
  • ▸Audited five-seed pooled confusion matrices to identify false negatives and low-confidence melanoma cases
  • ▸Conducted inference latency profiling (~14.2ms forward pass on GPU) for prospective point-of-care feasibility

Key Technical Achievements

  • 01First Unified UDA Cross-Family Benchmark: Compared adversarial (DANN, CDAN, MCD, FFTAT), statistical (Deep CORAL, MMD, JAN), and distillation (EKDA, CRPL) methods under a single identical evaluation protocol.
  • 02Discovery of Sensitivity vs. Calibration Trade-off: Revealed that methods pushing target decision confidence (MCD recall 66.74%, CRPL recall 63.40%) incur the highest calibration penalties (ECE 30.55% and 24.86%), while EKDA distillation preserves calibration (ECE 10.88%).
  • 03Severe Imbalance Robustness: Evaluated real-world smartphone photos from PAD-UFES-20 under 34:1 class imbalance, demonstrating Deep CORAL leads minority-class AUPRC (33.93%).
  • 04Qualitative Grad-CAM Feature Auditing: Visualized neural activation maps across lesion borders, discovering that successful adaptation refocuses attention from spurious lighting and skin wrinkles to pigmented lesion structures.

Measurable Impact & Production Verification

Successfully completed and defended MSc Dissertation in Data Science at Manchester Metropolitan University. Proved that unsupervised domain adaptation significantly mitigates cross-modality domain shift between dermoscopy and clinical photography, revealing crucial trade-offs between melanoma recall and calibration error, and providing the first unified benchmark of adversarial, statistical, and distillation UDA methods for dermatological AI.

Key Production Deliverables & Verification

Unified UDA Benchmark Protocol
9 adaptation algorithms evaluated across 3 cross-modality scenarios with 5 random seeds on 6 held-out test sets.
Multi-Metric Diagnostic Evaluation
Comprehensive assessment using AUROC, minority-class AUPRC, threshold-bound Melanoma Recall, and Expected Calibration Error (ECE).
Grad-CAM Explainability & Attention Auditing
Qualitative attention heatmaps auditing lesion boundary localization and diagnosing clinical artifact vulnerabilities.
Stratified Bootstrap Uncertainty
2,000 image-clustered bootstrap iterations establishing robust empirical confidence intervals for all macro-averages.
← Back to All Projects