STAGETOOL, a Novel Automated Approach for Mouse Testis Histological Analysis

Spermatogenesis is a complex differentiation process that takes place in the seminiferous tubules. A specific organization of spermatogenic cells within the seminiferous epithelium enables a synchronous progress of germ cells at certain steps of differentiation on the spermatogenic pathway. This can be observed in testis cross-sections where seminiferous tubules can be classified into distinct stages of constant cellular composition (12 stages in the mouse). For a detailed analysis of spermatogenesis, these stages have to be individually observed from testis cross-sections. However, the recognition of stages requires special training and expertise. Furthermore, the manual scoring is laborious considering the high number of tubule cross-sections that have to be analyzed. To facilitate the analysis of spermatogenesis, we have developed a convolutional deep neural network-based approach named “STAGETOOL.” STAGETOOL analyses histological images of 4 ′ ,6-diamidine-2 ′ -phenylindole dihydrochloride (DAPI)-stained mouse testis cross-sections at × 400 magnification, and very accurately classifies tubule cross-sections into 5 stage classes and cells into 9 categories. STAGETOOL classification accuracy for stage classes of seminiferous tubules of a whole-testis cross-section is 99.1%. For cellular level analysis the F1 score for 9 seminiferous epithelial cell types ranges from 0.80 to 0.98. Furthermore, we show that STAGETOOL can be applied for the analysis of knockout mouse models with spermatogenic defects, as well as for automated profiling of protein expression patterns. STAGETOOL is the first fluorescent labeling–based automated method for mouse testis histological analysis that enables both stage and cell-type recognition. While STAGETOOL qualitatively parallels an experienced human histologist, it outperforms humans time-wise, therefore representing a major advancement in male reproductive biology research.

of spermatocytes and spermatogonia (Fig. 1). These cell associations are known as stages of the seminiferous epithelial cycle. In most mammalian species, including the mouse and human, 12 (I-XII) epithelial stages ( Fig. 1) can be identified (4)(5)(6)(7). The stages continuously cycle over time and form the wave of spermatogenesis along the seminiferous tubule. In the mouse, the stages are organized segmentally and can be identified easily, whereas in the human, the stages follow each other spirally, which complicates stage recognition in human testicular cross-sections.
Identification of the epithelial stage is essential for the analysis of spermatogenesis and male fertility. Most spermatogenesis-associated genes have a temporally restricted (i.e., stage-and cell-type dependent) pattern of expression because the proteins they encode are needed at (a) specific step(s) of spermatogenic differentiation. Furthermore, Sertoli cells also function in a stage-dependent manner, because the needs of different germ cell combinations are distinct (3). Combining the knowledge of the spermatogenic cell type and the epithelial stage, where a protein is expressed, are the prerequisites to bring individual findings into a broader perspective. Moreover, only a stage-oriented approach can provide the means to comprehend the histopathology of infertile mouse models and aid in the analysis of the underlying causes and mechanisms. Given the constant decline of semen quality globally, there is an increasing demand for knowledge about the contributing factors (8) that basic research is able to reveal.
Stage recognition is primarily based on characteristics of postmeiotic elongating spermatids in any particular crosssection: namely their nuclear morphology, intraepithelial localization, and bundling (2,6,7). Changes in the morphology of spermatogenic cells across stages are gradual and subtle; thus the identity of a germ cell may be very hard or impossible to know if it is taken out of its context, that is, outside the cross-section where it is found. Given the fact that the stages are constantly progressing, stage recognition can also sometimes be complicated by the occurrence of tubule crosssections in transition between 2 stages (9). Moreover, most staining techniques or sample quality do not allow visualization of subtle differences in cellular structures unique to a particular spermatogenic cell type; therefore, identification is based on association. More precisely, the presence of certain meiotic (spermatocytes) and premeiotic (spermatogonia) germ cell types is always associated with particular postmeiotic (spermatids) germ cell types, as illustrated in Fig. 1, thus the identity of any specific spermatogenic cell can be inferred by association.
Manual stage identification for an entire testicular crosssection that typically contains 100 to 200 seminiferous tubule Figure 1. Spermatogenic cell differentiation and stages of the mouse seminiferous epithelial cycle. A spermatogonium that enters spermatogenesis has to pass through all the depicted developmental phases (from left to right, bottom to top) plus 6 mitotic and 2 meiotic divisions to be released as mature elongated spermatids. As spermatogenesis proceeds, spermatogenic cells move from the basal towards the luminal compartment. The progress of 4 to 5 generations of spermatogenic cells (in rows) is synchronized, and certain spermatids (highlighted with red, gray, and purple) are always associated with particular types of spermatocytes (green and yellow) and spermatogonia (orange); these are the 12 (I-XII; columns) stages of the seminiferous epithelial cycle. Spermatogonia (Spg; orange) exist as type A-undifferentiated plus A1 to A4, Intermediate (In) and type B. Primary spermatocytes can be divided into prepachytene (Spc-prePach; yellow, including preleptotene, Pl; leptotene, L; zygotene, Z), and pachytene (Spc-Pach; green) (pachytene, P; plus diplotene, D) spermatocytes. Meiotic divisions (m2m; cyan) and secondary spermatocytes (Spc-sec, 2 o ; olive) can be found solely in stage XII. Postmeiotic germ cell differentiation, that is, spermiogenesis, can be further divided into 16 steps (1-16); encompassing round spermatids (RS; red), and 2 categories of elongating spermatids: early (elSpt-early; gray) and late (elSpt-late; purple). Sertoli cells (Sert; blue). cross-sections and more than 40 000 cells is laborious and time-consuming. Stage recognition also requires special expertise and a long training. Moreover, the lack of postmeiotic cells in a mutant or a toxicant-exposed mouse makes stage recognition complex and ambiguous for the human eye. For these reasons, we aimed at developing an automated tool for the analysis of mouse testicular histology with the prospect of facilitating reproductive science and the diagnostics of male infertility. Previously, pioneering work in the field developed a computer program to assist male germ cell tracking (10), and methods for automatic segmentation of tubules (11) and cells (12). Subsequently, an automated method for staging using a GATA4 immunostaining was proposed (13). More recent work has employed deep learning that has shown superior performance to other methods in several computer vision tasks (14)(15)(16). Similar to our work is an approach that modified ResNet models to segment seminiferous tubules on hematoxylin-eosin (H&E)-stained cross-sections followed by segmentation and classification of 3 cell types in stage VI to III tubules: RS, spermatocytes, and spermatogonia (17). Subsequently the same group published a computerized spermatogenesis staging system that was developed for H&E-stained adult mouse seminiferous tubule cross-sections (18). Computerized spermatogenesis staging consists of 3 modules for automated segmentation of seminiferous tubules followed by classification into 3 stage groups I to V, VI to VIII, and IX to XII, and later subclassification of stage group VI to VIII into VI, VII and VIII, and late VIII.
Here we describe the development and performance of "STAGETOOL." Besides automated stage recognition (stages I-V, VI-VIII, IX, X-XI, and XII), STAGETOOL can also identify and quantify 8 different categories of spermatogenic cells plus Sertoli cells. We further showcase the use of the tool for automated protein expression analysis. It offers a possibility for large-scale projects in the study of male germ cell differentiation, such as gene expression screening and testicular phenotyping of genetically modified or toxin-exposed mouse models. It operates on 1024 × 1024 pixel images of ×400 magnification containing optimal information for tissue and cellular content analysis, a cross-section of a single seminiferous tubule, and the cells therein. STAGETOOL can also be employed to analyze whole-testis cross-sections. For that, merged whole-testis scans are cut into overlaid smaller images that are iteratively passed to the STAGETOOL. STAGETOOL image predictions are then combined to determine each seminiferous tubule's segmentation, stage classification, and cell-type composition. STAGETOOL also provides other helpful information, for example, cell-type ratios in seminiferous tubule cross-sections for each stage of the seminiferous epithelial cycle.
Compared to previous studies, the work at hand has a few remarkable advantages that are primarily based on the use of DAPI (4′,6-diamidine-2′-phenylindole dihydrochloride) chromatin staining combined with immunofluorescence microscopy for cell and seminiferous epithelial stage recognition and identification. Compared to H&E staining, fluorescent DAPI staining has very little background and even minute differences in chromatin density (euchromatin vs heterochromatin) can be visualized. This allows highly accurate cell identification to be performed only on the basis of nuclear morphology. Moreover, the use of DAPI allows antigen expression profiling where signals from different fluorescent channels can be overlaid with cell and stage predictions.
Our DAPI-based approach also enables staging in infertile mouse models where spermatogenesis halts at the round spermatid stage.

Dataset Description
Wild-type mice of C57BL/6 and mixed backgrounds were maintained under controlled conditions (12 hours dark/12 hours light, temperature, humidity) in individually ventilated cages (Tecniplast) at the Central Animal Laboratory of University of Turku, Turku, Finland. The mice had free access to food and water. Animal husbandry and use were carried out according to Finnish law and following the guidelines of the Ethics of Animal Experimentation in University of Turku in accordance with the Guide for Care and Use of Laboratory Animals. The use of experimental animals in this study was approved by the University of Turku Ethics Committee for animal experiments.
Testis sections from Spef2 knockout (KO) mice (20) were processed and stained with DAPI as described earlier.
Original scans were produced from fluorescently labeled mouse whole-testis cross-sections using a Pannoramic MIDI scanner (3DHistech). A 40× objective lens with 10× ocular was used (×400). The files were converted to TIFF using dedicated software (https://www.3dhistech.com/caseviewer). Image size of mouse testis cross-sections was approximately 4 × 4 mm, which corresponds to 24832 × 24832 pixels (1 px = 0,161 μm). To test the robustness of our processing pipeline, we also used additional images of varying quality originating from collaborators (different sample processing, laboratory, and imaging device).

Generation of Ground-Truth Data for Seminiferous Tubules
Four whole-testis cross-sections, plus areas from additional 3 testis cross-sections with rare developmental stages, were selected to generate training and validation data for convolutional neural network models. All these cross-sections originated from different biological replicates. To assist the manual annotation of tubule borders, whole-testis crosssections were labeled with Alexa Fluor 488-conjugated anti-α smooth-muscle actin (αSMA) antibody. In the adult mouse testis, αSMA is predominantly expressed by peritubular myoid cells, which encase seminiferous tubules (21). Thus, αSMA staining reveals the actual biological tubule borders, which makes the segmentation data very accurate and significantly speeds up the work of manual annotators. Final segmentation data were generated by converting carefully revised tubule border images into a list of tubule contour coordinates, which could be overlaid with the original DAPI-stained images. The tubules that were previously segmented were manually annotated using a VGG Image Annotator tool (https://www.robots.ox.ac.uk/∼vgg/software/ via/). Specifically, the developmental stages of seminiferous tubules (I-XII; Fig. 1) were divided into 5 categories: I to V, VI to VIII, IX, X to XI, and XII (Fig. 2). The criteria for identification of the stages of the seminiferous epithelial cycle are described in Table 1 and in (2).
After annotations, DAPI-stained whole-testis cross-sections were sliced into images of 1024 × 1024 pixels. Additionally, the same cross-sections were shifted by 512 × 512 pixels and sliced again to avoid border effects. After slicing, tubule annotation masks that were smaller than 12 000 pixels (∼ 1% of the image area) were removed from the training data. Next, the resulting 3097 training images were augmented by applying random flips and rotations. To further enhance model robustness, blurring and brightness adjustment were introduced to a randomly chosen 20% of the images. As a result, an annotated data set of 27 873 images was created for training and testing the seminiferous tubule segmentation model.

Generation of Ground-Truth Data for Cell Types
To assist the manual annotation of cell types, DAPI-stained cross-sections were labeled with anti-SALL4 (Spalt-like transcription factor 4) antibody and lectin PNA (peanut agglutinin). SALL4 labels all types of spermatogonia (type A, type intermediate and type B) (22), whereas PNA produces specific labeling patterns for acrosomes in RS and elongating spermatids (2).
Before annotations, 1 DAPI-stained whole-testis crosssection was sliced into 349 images of 1024 × 1024 pixels. An additional 75 images, which contained rare stage XII tubules, were added from 3 other whole-testis cross-sections to balance the number of samples of all cell types in the data set.

Models
We adopted FAIR's (Facebook AI Research) Detectron 2 object detection and segmentation platform version 0.2.1 independently for a model of instance segmentation of seminiferous tubules and a second model for cell-type classification of mouse testis. The resulting 2 models were then combined into a tool that performed consecutive cell and tissue-level analyses on input images (a DAPI-stained mouse testis cross-section). To further increase the sensitivity of cell detection, we rotated the input image during prediction by multiples of 90° and merged the 4 results, discarding overlapping cell predictions (intersection over union [IOU] > 0.5). Also during prediction, 2 of the classes (early and late pachytene spermatocytes), were fused into 1 (pachytene and diplotene spermatocytes, Spc-Pach), as explained earlier.

STAGETOOL Model for Simultaneous Cell and Tissue-level Analysis
STAGETOOL is a combination of the cell and tubule models described earlier. Its broad pipeline is illustrated in Fig. 3. A whole-testis cross-section image is cropped to 1024 × 1024 pixels, 400× magnified mouse testis images, which were an appropriate input for the neural networks. To avoid losing information at the borders, the cross-section image was shifted by 512 × 512 pixels and sliced identically again, duplicating the number of input images. Every input image was passed to both cell and tubule models, and the outputs were merged into a combined report.
For cell-type predictions, each image was analyzed at every 90° rotation angle altogether 4 times, and the results were merged by weighted majority vote. When stitching together the mosaic of half-overlapping images, predictions for the same cells (IOU ≥ 0.4) were merged again by weighted majority vote. Second-best predictions for merged cells were also collected. Finally, the predictions of the cell and tubule models were combined. Because stage XII is often a mixture of stages XII and I, 2 merging rules were applied to the tubule and cell model predictions. First, if the cell model did not detect any metaphase plates or secondary spermatocytes in the tubule predicted to be stage XII by the tubule model, that tubule was instead stage I to V. Secondly, if metaphase plates or secondary spermatocytes were found in a tubule that was not predicted to be stage XII, their labels were replaced by the second-best predictions (if there were any) or deleted.
For the predictions of the developmental stages of whole tubules, all predicted tubule masks were mapped by many-to-one logic to each tubule (Fig. 4). Sometimes manual curation was required to remove unsuitable tubules, which may often occur in whole-testis cross-section images and cause segmentation errors. On average, a union of 8 predicted masks made 1 tubule. For each mask, the confidence value of   the predicted class was multiplied by the mask's percentage-area in the tubule. This increased the prediction weight of larger masks. These confidence values for the predicted classes were then multiplied among the masks to find the best label for the tubule. The final report contains an overlay of the input image with all detected objects (see Fig. 3).
Additionally, detailed information about the segmented seminiferous tubules can be provided in a tabular format (Table 2), including the developmental stages and their respective cell-type composition.

Wild-type Mouse DAPI-stained Testis Cross-section Image Analysis
We first evaluated individually the performance of the 2 models (cell and tubule model) that comprise STAGETOOL on test images from the DAPI-stained annotated data set. Subsequently we showcase STAGETOOL stage classification on a whole-testis cross-section. Examples of STAGETOOL outputs are provided in Fig. 5.

Cell Model Evaluation
The cell model was evaluated on 71 left out images from the DAPI-stained annotated data set. Some examples of the qualitative results are shown in Fig. 5B. Regarding quantitative results, first a metric typically employed on object detection tasks was calculated: mean average precision (AP), as defined in the COCO object detection challenge (23). The model obtained an AP50 of 78.99 and AP75 of 50.00 (24,25). Mean AP reflects how much the set of predicted boxes corresponds to the set of ground-truth boxes on average over all the classes. However, beyond exact box coordinates and size, it is essential to evaluate how well the model can detect and classify cells for each category. Therefore, the IOU (Jaccard Index) threshold was fixed to 0.5 to match predictions and ground truth to assess classification performance. Using these conditions, positive predictive value, sensitivity, and F1 score were measured for each cell class. Table 3 provides the summary statistics for each cell category. When averaged across classes, the positive predictive value is 0.9607, pointing out that the model could differentiate appropriately between classes. Sensitivity was in general high with an average across class of 0.8402, but lower than the positive predictive value. elSpt-late stood out by their lower sensitivity with around 69% of the ground labels detected. For elSpt-late the lower percentage of detection might have been due to their shape, ill suited to fit a box, their small size, and the fact that they are often bundled together, causing several prediction boxes to overlap. Thus, the neural network might have considered overlapping predictions from the same cell and eliminated some of them with the nonmaximum suppression algorithm. A confusion matrix (Fig. 6) shows the incidence of erroneous cell labels for any 9 particular seminiferous epithelial cell types. Understandably, the most common mistakes were between 1) Spc-prePach and Spg, which are occasionally very hard to discern without an antibody staining; and 2) elSpt-early and elSpt-late, where the former gradually convert to the latter.  Table 4. Although given the image size, the model typically receives only partial information about any given tubule, the model obtains a pixel accuracy of 0.918. The mean IOU metric of 0.74 was caused mainly by stage X to XI tubules predicted to be stage IX, which caused an IOU below 0.5 for the class.  In the next section the model is evaluated at the whole-testis level to obtain a better assessment of its performance.

Whole-testis Cross-section Evaluation
To perform the analysis at the whole-testis level, a testis crosssection was divided into 1024 × 1024 overlapping images for model input. The output predictions were merged and the whole-testis cross-section image was recompiled, with the annotated tubular and cellular objects. Fig. 7 illustrates a representative example of such an analysis at the tubular level, while a high-resolution image of whole-testis cross-section analysis with cellular and tubular labels is provided online (https:// dx.doi.org/10.21227/em1y-9j15). STAGETOOL output was compared to an assessment of an experienced human histologist (15 years of experience). The testis cross-section (Fig. 7A) consisted of 112 tubular cross-sections and in 107 cases (96%; Table 5) there was equivalence between the human and computer predictions, and discrepancy in 5 cases (4%). In particular, in 4 out of 5 five cases the discrepancy was between stages I to V vs VI to VIII and in 1 case XII vs I to V. Further in-depth analysis revealed that in 3 of the former cases (tubule 58 as an example; Figs. 4A and 7B) the disagreements concerned stages V and VI where either stage category I to V or VI to VIII were correct. In another case ( Fig. 7C; tubule 30) the computer prediction (I-V) was in conflict with the human annotation (XII). However, this was a longitudinal tubule cross-section that mostly presents stage I but with the right corner (dotted line in Fig. 7C) being in stage XII, as also revealed by image-level output (Fig. 4B). Thus, only in one case ( Fig. 7D; tubule 15) was the computer prediction biologically wrong, although image-level analysis (Fig. 4C) also revealed uncertainty in the model staging but the voting algorithm selected stage VI to VIII over I to V. Altogether, these data show that the accuracy of STAGETOOL in whole-testis tubular analysis is 99.1%.
To provide a numerical analysis of STAGETOOL performance, we studied the distribution of cell labels at different seminiferous epithelial stages (Fig. 8). STAGETOOL faithfully recognizes the 9 seminiferous epithelial cell types in 5 epithelial stage categories. The distributions are biologically correct and expected (see Fig. 1).

STAGETOOL Robustness and Knockout Testis Analysis
After measuring STAGETOOL performance in our annotated data set, we proceeded to test the robustness of STAGETOOL and determine its detection limits. To this end, the model was retrained with all the annotated data available, including the leftover test set images. Subsequently its performance was tested on several seminiferous tubule cross-section images from KO mice with a spermatogenic defect. The images originated from different laboratories and were generated by different instruments and at different mouse ages. Image quality was disparate, and the resolution differed from the training data in a few cases. All images were converted to grayscale since it is required by STAGETOOL.
STAGETOOL was applied to several good-quality seminiferous tubule cross-section confocal images from Miwi KO mice, which are characterized by spermatogenic arrest at the RS stage and a lack of elongating spermatids (26). Lack of elongating spermatids makes staging for Miwi KO testis challenging because it is primarily the presence and intraepithelial distribution of elongating spermatids that define the stages for a human histologist. Fig. 9A and 9B illustrate representative examples of STAGETOOL output. Although meaningful general statistics could not be extracted because of a low number of images, of the 856 cells predicted on Miwi KO mice, only 7 were incorrectly categorized as elongating spermatids (which do not exist in these mice). Overall, after visual inspection, cell categorization was in line with the results obtained in the annotated data set. More notably, tubule staging was correct in  the Miwi KO mouse line (see Fig. 9A and 9B), indicating that the model does not depend on the presence of elongating spermatids to determine seminiferous epithelial stages, like a human histologist typically does. We also tested several images of paraffin-embedded seminiferous tubule cross-sections from Spef2 KO mice (Fig. 9C). All these images were of low resolution and partially overexposed. Spef2 KO mice are characterized by elongating spermatids of abnormal head and short tail defects (20). STAGETOOL was nonetheless able to characterize cell types and tubule stages highly precisely.

STAGETOOL for Antibody Expression Profiling
Having evaluated the performance and robustness of STAGETOOL, we wanted to evaluate whether STAGETOOL could be used for automated profiling of antigen expression by combining DAPI staining with fluorescent antibody labeling. Many antigens have restricted expression in spermatogenic cells, and their expression is often limited to particular cell types and specific stages of the seminiferous epithelial cycle. Applying STAGETOOL for the assessment of cell type or stage-specific antigen expression would be a remarkable milestone because it would enable reliable analysis of antigen expression in the seminiferous tubules without prior experience in testicular histology or staging.
To evaluate the feasibility of such an analysis, we stained mouse testis cross-sections with DAPI and the following antibodies: SOX9 (SRY-box transcription factor 9), AR (androgen receptor), USF1 (upstream stimulatory factor 1), SALL4, SCP3 (synaptonemal complex protein 3), CREM (cAMP responsive element modulator), and PNA (Fig. 10). SOX9, AR, and USF1 are expressed in Sertoli cells, but while SOX9 (27) and USF1 (28) are expressed at an equally high level in all Sertoli cells independent of the epithelial stage, AR expression is seen at a high level in Sertoli cells at early-to-mid stages and lower in late stages (IX-XII) (29,30). USF1 is also expressed in undifferentiated and early differentiating spermatogonia (28), whereas SALL4 is a pan-spermatogonial marker (22). SCP3 is needed for synaptonemal complex assembly, and therefore expressed in spermatocytes (31,32). CREM is a transcription factor specifically expressed in RS (33)(34)(35), whereas PNA stains the acrosomes of RS and elongating spermatids (2).  To obtain the antigen expression profiles, STAGETOOL was first applied to the cross-section image containing only DAPI information. Subsequently, the predicted tubules and cells were overlaid with the immunofluorescent image from the antibody stainings and the luminosity threshold was fixed empirically for each fluorescent marker (see "Materials and Methods"). The predicted cells with mean luminosity above the threshold and 65% of the pixels above half threshold were considered positive for antibody expression. STAGETOOL-derived antigen expression data confirmed the anticipated cell type-specific expression pattern for SOX9 (in Sertoli cells; Fig. 10A), SALL4 (Spg; Fig. 10B), SCP3 (Spc; Fig. 10C), CREM (RS; Fig. 10D), and PNA (RS and elongating spermatids; Fig. 10E). STAGETOOL was also able to record stage-specific expression for AR ( Fig. 10F and 10G) in Sertoli cells of early-to-mid epithelial cycle and USF1 expression (Fig. 10H) in only a subset of spermatogonia but uniformly in all Sertoli cells independent of the stage of seminiferous epithelial cycle. These predictions were biologically accurate and in agreement with the literature. Fig. 11 summarizes the STAGETOOL-derived expression profile for the studied antigens.

Discussion
The aim of this study was to develop a machine learningbased tool for the automated staging of fluorescent-labeled  seminiferous tubules in mouse testis cross-sections and identification of seminiferous epithelial cell types. STAGETOOL provides adequate, quick, and scalable analysis of the microscopy images of DAPI-stained mouse testis cross-sections both at the cellular and tubular levels. To our knowledge, the present study is the first attempt for automated stage recognition of mammalian seminiferous epithelial cycle based on use of a fluorescent dye, DAPI, to stain the chromatin in cells within the testicular cross-sections. The cell and epithelial stage recognition relies heavily on nuclear size/morphology and chromatin organization in different cell types, emphasizing the importance of using a chromatin stain. Furthermore, the data do not suffer from background signal from cell cytoplasm and extracellular matrix, which further facilitates the analysis. The use of fluorescent chromatin dye also enables simultaneous co-immunofluorescent staining of several proteins to characterize their expression patterns by combining the immunofluorescence imaging with cell and stage-level data.
To assess spermatogenesis in detail, the analysis of both stage organization of the seminiferous epithelium and its cellular composition are required. A clear benefit of STAGETOOL is that it combines these 2 analyses. The accuracy for whole-testis tubular stage analysis is 99%, so it provides a very reliable tool for the recognition of the 5 stage pools (I-V, VI-VIII, X, X-XI, and XII). In the future, we aim to expand the model to recognize all 12 stages (I-XII) of the mouse seminiferous epithelial cycle, even though staging into these 5 categories is typically sufficient in a laboratory conducting male reproductive biology research. Our cell model obtains an average accuracy of 0.96 for 9 different seminiferous epithelial cell types. This high performance was achieved through tedious manual annotation of nearly 53 000 cells. We believe that the performance of STAGETOOL Figure 8. Distribution of cell labels in different epithelial stages as extracted from STAGETOOL output. As expected, Sertoli cells were evenly distributed across the stages, whereas secondary spermatocytes (Spc-sec) and metaphase plates (m2m) were seen in stage XII, and occasionally in stage I to V (see Fig. 7C for explanation). Distribution of cell types in stage categories were accurate and biologically correct. Figure 9. STAGETOOL output images for A and B, Miwi knockout (KO) and C, Spef2 KO mouse seminiferous tubule cross-sections. Two representative examples of STAGETOOL output for Miwi KO seminiferous tubules at stages A, I to V and XII, and B, X and XI. Despite the lack of elongating spermatids, STAGETOOL correctly recognized the stages and cell types therein. C, A representative example of STAGETOOL output for low-resolution and over-exposed Spef2 KO seminiferous tubules at stage IX.
can be pushed even further after retraining with the whole corpus of training, testing, and validation data, which will be performed during the continuous updating of the final version.
In addition to the wild-type spermatogenesis, we also showcase the functionality of STAGETOOL for analysis of genetically modified mouse models with a spermatogenic defect. Stage recognition in such mice may be challenging for human histologists because of the lack or reduced numbers of specific spermatogenic cell types. However, STAGETOOL was able to perform stage and cell-type recognition in Miwi and Spef2 KO mouse models very accurately despite the complete lack of elongating spermatids (Miwi KO) or disrupted spermatid elongation (Spef2 KO). We are not aware of the histomorphological features that the model uses to achieve this.
While STAGETOOL is fully automated, the whole-testis cross-section image analysis tool requires some manual curation to remove unsuitable seminiferous tubules from the segmentation output image. This is because the tubular arrangement of the whole testis often contains artifacts from sample preparation or longitudinally cut tubules, which may interfere with downstream analyses. Therefore, we can call the whole-testis approach only semiautomated, whereas on select 1024 × 1024 images STAGETOOL operates fully automatedly. Nonetheless, semiautomated whole-testis crosssection analysis offers a possibility for large-scale projects in male germ cell differentiation, such as gene expression screening and testicular phenotyping of genetically modified mouse models. When tested on Google Colab free GPU, it takes 1.5-5 seconds to fully analyze a 1024 × 1024 pixel image. A whole-testis cross-section, with approximately 600 images, takes then 15 to 50 minutes, accordingly. Manual curation of whole-testis cross-section analyses depends on the image quality and takes an additional 5 to 15 minutes. Antibody expression profiling for whole-testis cross-sections (selecting signal thresholds for the antibody-labeled image) takes 10 to 30 minutes.
In humans and some other primates, the stages are organized differently from rodents, and each seminiferous tubule cross-section can host more than one stage (36). Therefore, STAGETOOL cannot be directly applied to the analysis of human testis. However, the alarming adverse trends in male reproductive health and fertility (37) emphasize the importance of extending STAGETOOL to tackle human spermatogenesis. Although 10% to 15% of couples suffer from infertility (World Health Organization, 2017), the etiology of male factor infertility, contributing to half the cause, is unknown in 70% of cases (38). Therefore, there is a compelling need for better diagnostic tools for the study male infertility and subfertility. This study will pave the way for developing an automated analysis tool for characterizing spermatogenic failure in humans, which would facilitate counseling and selection of treatment strategies for male infertility and shed light on the underlying causes. Figure 10. Snapshots of STAGETOOL output for whole-testis automated antigen expression analysis. Signals from antibody stainings (red) are overlaid with 4′,6-diamidine-2′-phenylindole dihydrochloride (DAPI) staining (white) and STAGETOOL-derived cell type and stage predictions to acquire cell type and stage-specific expression pattern for different antigens. The DAPI signal from respective antigen-positive cells is highlighted with cyan. A, SOX9 (red) is expressed uniformly in Sertoli cells. B, SALL4 (red) is expressed in all spermatogonia. C, SCP3 (red) staining is seen in prepachytene and pachytene spermatocytes and a subset of spermatogonia. D, CREM localizes to round spermatids (RS). E, PNA (red) stains the acrosomes of round and elongating spermatids. In this stage (II-IV), the acrosomic vesicles of RS are small and therefore there are many RS that stain negatively for PNA (some indicated with yellow arrows). F and G, Androgen receptor (AR; red) is expressed in Sertoli cells in a stage-dependent manner. In stages I to V, F, AR signal is observed in all Sertoli cells, whereas in stages X to XI, G, AR signal is high enough to qualify as positive only in a subset of Sertoli cells, resulting in stage-specificity for AR expression as shown in Fig.11. Yellow arrows indicate Sertoli cells with subthreshold level of AR expression. H, USF1 (red) is expressed in Sertoli cells and a subset of spermatogonia. Yellow arrows indicate USF1-negative intermediate/type B spermatogonia.