Multi-label classification of protein types in biological microscopy images using deep learning.
This project applies transfer learning to classify different protein localizations in human cells. Multiple protein types can coexist in a single image, making this a multi-label classification problem.
Human Protein Atlas - Fluorescence microscopy images of human cells
- Total Samples: ~19,000 images
- Training Set: 17,335 images (90%)
- Validation Set: 1,901 images (10%)
- Image Size: 512 × 512 pixels
- Classes: 10 protein localization types
- Mitochondria
- Nuclear bodies
- Nucleoli
- Golgi apparatus
- Nucleoplasm
- Nucleoli fibrillar center
- Cytosol
- Plasma membrane
- Centrosome
- Nuclear speckles
Model: ResNet34 with Transfer Learning
- Base: Pre-trained ResNet34 (ImageNet weights)
- Modifications: Replace final FC layer (512 → 10 outputs)
- Activation: Sigmoid (for multi-label predictions)
- Loss: Binary Cross-Entropy
- Optimizer: Adam
Training Strategy:
- Phase 1: Freeze backbone, train final layer (5 epochs)
- Phase 2: Unfreeze and fine-tune all layers
Data Augmentation:
- Random crop
- Random horizontal flip
- Random rotation (±10°)
- Random erasing
| Epoch | Train Loss | Val Loss | F1 Score |
|---|---|---|---|
| 0 | 0.2891 | 0.3427 | 0.3954 |
| 4 | 0.2285 | 0.2160 | 0.6660 |
| Epoch | Train Loss | Val Loss | F1 Score |
|---|---|---|---|
| 0 | 0.2216 | 0.2225 | 0.6479 |
| 2 | 0.2145 | 0.2068 | 0.6930 |
Final Performance: F1 Score = 69.30%
- Python, PyTorch
- torchvision (pre-trained models, transforms)
- scikit-learn (metrics)
- Jupyter Notebook
├── Protein Multi-label classification.ipynb
├── README.md
└── LICENSE
# Install dependencies
pip install torch torchvision pandas numpy scikit-learn pillow tqdm
# Run the notebook
jupyter notebook "Protein Multi-label classification.ipynb"Haider Zainuddin Ali
GitHub | LinkedIn
MIT License