← back to projects

Weakly Supervised Cell Classification with Attention-MIL

5-stage weakly supervised deep learning pipeline combining cell-level CNNs and attention-based MIL, processing 10K+ single-cell crops from fluorescence images.

Macro-F1 0.45 · Weighted-F1 0.601 min readgithub ↗
PythonDeep LearningPyTorchComputer VisionHealthcare

Overview

Built a 5-stage weakly supervised deep learning pipeline combining cell-level CNNs and attention-based Multiple Instance Learning (MIL), processing 10K+ single-cell crops from 4-channel fluorescence images.

Problem

Cell classification from fluorescence microscopy images is expensive to label at the instance level. Weak supervision allows training with only slide-level labels, dramatically reducing annotation cost.

Approach

  • Cell-level CNNs for feature extraction from single-cell crops
  • Attention-based MIL for aggregating instance-level predictions
  • Pseudo-label refinement guided by attention weights
  • Per-class threshold tuning to handle class imbalance
  • 4-channel fluorescence image processing pipeline

Results

| Metric | Score | |--------|-------| | Macro-F1 | 0.45 | | Weighted-F1 | 0.60 | | Single-cell crops | 10,000+ |

Tech Stack

Python PyTorch CNN Attention-MIL OpenCV NumPy