Neuroimplants represent an emerging medical technology, offering new therapeutic approaches for severe neurological and psychiatric disorders. One of the key limitations to long-term neuroimplant performance is the foreign body response elicited by intracortical implantation. Among the contributing cell types, astrocytes play a central role in glial scar formation around the implant, which can compromise device functionality. Immunofluorescence of glial fibrillary acidic protein (GFAP) provides a well-established marker of astrogliosis (neuroinflammation), yet quantitative and reproducible assessment of astrocyte morphology remains challenging due to the complexity and variability of image analysis approaches. Here, we aimed to quantitatively assess implantation-induced astrogliosis and to determine how classifier training strategy influences segmentation outcomes and morphometric measurements. We present a machine learning-assisted pipeline based on the LabKit plugin in Fiji for segmentation and morphometric analysis of GFAP-positive astrocytes in peri-implant scar versus distant cortical regions. Using this approach, we demonstrate an increase in GFAP expression, cell area, and astrocytic process length as well as the redistribution of GFAP signal along astrocytic processes within scar regions. We show that different classifier training strategies produce systematically distinct segmentation outcomes, with rule-compliant annotation improving agreement with manually defined ground truth. These findings highlight the critical role of annotation strategy in shallow learning-based segmentation and provide a practical framework for improving reproducibility of astrocyte morphometry in studies of neuroinflammation and neuroimplant biocompatibility.
Collagen microarchitecture in bone marrow biopsies represents a largely underexplored source of candidate quantitative biomarkers for histopathological diagnostics and analysis of tissue remodeling. While second harmonic generation (SHG) microscopy has been increasingly applied to fibrosis assessment, the collagen organization of trabecular bone in bone marrow trephine biopsies remains poorly characterized. Here, we combined high-resolution SHG microscopy with shallow machine learning-assisted morphometry to compare collagen architecture in structured trabecular bone, unstructured trabecular bone, and fibrosis in bone marrow biopsies from patients with primary myelofibrosis. SHG image segmentation was performed using the LabKit plugin in Fiji. Several annotation strategies were evaluated to identify classifier configurations that preserved fibrillar structures. Quantitative morphometric analysis revealed marked differences in collagen organization between tissue types. Per-patient analysis consistently demonstrated thinner collagen fibers and reduced branching complexity in fibrosis than in structured trabecular bone. In contrast, unstructured trabecular bone showed extensive network branching accompanied by shorter skeleton branch length, consistent with remodeling-associated alterations of trabecular collagen architecture. Our results further demonstrate that annotation strategy substantially influences segmentation outcome and downstream morphometric measurements in SHG-based collagen analysis. Overall, this descriptive proof-of-concept study establishes a reproducible workflow for machine learning-assisted SHG morphometry that may prove useful for quantitative assessment of fibrosis, bone remodeling, and extracellular matrix organization in bone marrow pathology.