Automated Detection and Segmentation of Astrocytes in GFAP-labeled Micrographs using YOLOv8

Sarah Syed, Md Rashedur Rahman, Manos Papadakis, Demetrio LabateResearch Square 2025

Abstract

Astrocytes, the most abundant subtype of glial cells, play a critical role in the central nervous system (CNS), including neural defense and metabolism, and are implicated in the pathophysiology of various psychiatric and neurological disorders. Since astrocytes manifest their function via a range of morphological alterations, there is a particular interest in quantifying such alterations accurately and efficiently. To facilitate this task, we introduce an improved deep learning framework for automated detection and segmentation of GFAP-labeled images of astrocytes based on YOLOv8, a recent version of the popular YOLO object detection deep learning platform. We conducted extensive numerical experiments showing that our approach yields state-of-the-art detection and segmentation performance over a wide range of images of astrocytes. We also show that the proposed model can be easily adapted to deal with images of other glial cells, such as microglia.

Introduction

Astrocytes are essential components of the central nervous system, involved in neural defense, metabolism, and synapse regulation. Their morphology is highly sensitive to the brain's physiological state, changing significantly in response to psychiatric and neurological disorders such as epilepsy and bipolar disorder. Quantifying these morphological changes is crucial for understanding disease progression. However, manual annotation of astrocytes in micrographs is labor-intensive and prone to subjectivity. Traditional automated methods, such as intensity thresholding, often fail in dense regions where cell processes overlap. While previous deep learning models have shown promise, they often lack the integrated capability to perform both high-precision detection and pixel-level segmentation efficiently.

Methods

The proposed framework utilizes YOLOv8 (You Only Look Once, version 8), a state-of-the-art object detection and instance segmentation architecture. The pipeline is structured into four primary stages: image preparation, astrocyte detection, astrocyte segmentation, and feature extraction.

Figure 1: Automated pipeline for astrocyte analysis, from image preparation to feature extraction.

The YOLOv8 architecture employs an anchor-free design and a decoupled head, which separately processes classification and regression tasks. This design is particularly advantageous for biological imaging, where cell structures are irregular and vary significantly in size.

Figure 2: The YOLOv8 architecture used for detection and segmentation, featuring Backbone, Neck, and Prediction modules.

The model was trained and validated using the Kruyer Dataset, which contains 211 GFAP-stained fluorescent images of rat brain tissue with approximately 4,200 manually annotated astrocytes. To test generalizability, the framework was also applied to a Microglia Dataset consisting of 78 images of IBA1-stained microglia. Transfer learning was employed, starting with weights pre-trained on the COCO dataset.

Results

The YOLOv8-based approach demonstrated superior performance across several metrics. In terms of speed, the model achieved an inference time of 15ms per image on standard hardware, significantly faster than traditional methods like the "Directional Ratio" approach, which required 1,000ms. For segmentation, the model reached a Dice Coefficient (DC) of 0.73, outperforming U-Net (0.53–0.65) and GESU-net (0.69–0.71).

A key finding was the robustness of the anchor-free approach in dense cell populations. Unlike thresholding methods, which degrade in "crowded" images, YOLOv8 maintained high precision. Furthermore, the model showed excellent generalizability; weights trained on astrocytes were effectively transferred to microglia detection with minimal additional training, suggesting the architecture is remarkably robust for biological research.

Conclusion

This study presents a robust, high-speed pipeline for the automated analysis of glial cells. By leveraging the anchor-free architecture of YOLOv8, the framework overcomes common challenges in biological image analysis, such as irregular cell morphology and high density. Future work will focus on extending the model to 3D image stacks and evaluating its performance across a broader range of staining techniques beyond GFAP and IBA1.

Summary updated

BibTeX
@inproceedings{syed2025automated,
  author = {Sarah Syed and Md Rashedur Rahman and Manos Papadakis and Demetrio Labate},
  title = {{Automated Detection and Segmentation of Astrocytes in GFAP-labeled Micrographs using YOLOv8}},
  booktitle = {Research Square},
  year = {2025},
  doi = {10.21203/rs.3.rs-7330566/v1},
}
Figure