Loading...
Degree
Bachelor of Science (Computer Science)
Department
Department of Computer Science
School
School of Mathematics and Computer Science (SMCS)
Advisor
Dr. Rizwan Ahmed Khan, Professor, Department of Computer Science
Co-Advisor
Dr. Muhammad Rizwan Alam (Industry Advisor)
Keywords
Cellular Morphological Explainability, Domain Adaptation, Annotated Hematology Dataset Curation
Abstract
Automated white blood cell classification and morphological analysis in peripheral blood smears sits at the intersection of two critical unmet needs in modern healthcare: the inaccessibility of conventional hematology analyzers in resource-constrained clinical environments due to their prohibitive cost, and the well-documented failure of deep learning models to generalize across clinical sites due to variations in staining protocols and imaging hardware , a phenomenon known as covariate shift. This project directly addresses both challenges through a comprehensive pipeline spanning data curation, morphometric analysis, domain adaptation, and vision-language modelling. First, in collaboration with Quaid-i-Azam University, Islamabad, we curated a novel, high-quality peripheral blood smear dataset from local Pakistani clinical sources, featuring precise cell-wall and nucleus polygon annotations, segmentation masks, and morphological diversity across multiple stimulation conditions, filling a significant gap in regional representation in public hematology datasets. Second, we developed an automated cell annotation and morphometric framework that computes instance-wise Nucleus-to-Cytoplasm ratios from annotated microscopy images, reducing what previously demanded months of expert manual effort to a matter of hours. Third, we propose SER-DA-MMD, a parameter-efficient unsupervised domain adaptation framework that inserts a lightweight Squeeze-Excitation Residual adapter into a frozen backbone guided by Maximum Mean Discrepancy alignment, achieving substantial accuracy gains over direct transfer with no target domain labels and no backbone retraining required. Finally, we fine-tuned a Vision-Language Model on cell morphology captions to enable natural language understanding of leukocyte structure, with a clinician-facing desktop application integrating all components currently under active development for point-of-care deployment.
Tools and Technologies Used
PyTorch, timm, Hugging Face Transformers, Gemma Vision-Language Model, scikit-image, tifffile, GradCAM, Squeeze-and-Excitation Networks, Maximum Mean Discrepancy with multi-kernel RBF kernels, Adaptive Batch Normalization, ResNet50, VGG16-BN, InceptionV3, Vision Transformer ViT-Base, AdamW optimiser, NVIDIA Tesla T4 GPU, Kaggle
Methodology
Our methodology follows a clear four‑stage pipeline designed for real clinical impact. First, we curated a novel peripheral blood smear dataset from local Pakistani sources in collaboration with Quaid‑i‑Azam University, Islamabad. We collected microscopy images across three separate experiments under both Control and stimulated conditions using PMA and FMLP at varying concentrations. Expert hematologists meticulously annotated each image by drawing polygon boundaries around cell walls and nuclei, providing perfect ground‑truth for training and evaluation. Second, building on these annotations, we built an automated cell annotation and NC‑ratio computation framework. What previously demanded months of manual effort is now completed in few days with the tool, or in a few hours when assisted by our AI model. Third, to overcome the devastating performance drop caused by covariate shift across different clinical sites, we developed SER‑DA‑MMD, a parameter‑efficient unsupervised domain adaptation framework. We keep the entire pre‑trained backbone frozen and insert a lightweight trainable Squeeze‑Excitation Residual adapter just before the classifier head. This adapter uses channel‑wise attention to suppress stain‑sensitive artefacts while amplifying morphologically informative structures. Training is guided by a hybrid loss that combines cross‑entropy on labelled source data with Maximum Mean Discrepancy (MMD) alignment on unlabelled target data. For CNN architectures, we additionally apply Adaptive Batch Normalisation (AdaBN) as a post‑training step. Fourth, we fine‑tuned a Florence‑style vision‑language model on haematology‑specific image‑caption pairs, enabling the system to generate natural language descriptions of cell morphology. A desktop application integrating all modules is currently under active development for direct clinical deployment
Document Type
Restricted Access
Submission Type
BSCS Final Year Project
Recommended Citation
Shaikh, M., & Haaris, M. (2026). Automated Morphological Analysis and Classification of Neutrophils in Blood Smears. Retrieved from https://ir.iba.edu.pk/fyp-bscs/63
Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License
COinS
