DetecDiv, a deep-learning platform for automated cell division tracking and replicative lifespan analysis

Automating the extraction of meaningful temporal information from sequences of microscopy images represents a major challenge to characterize dynamical biological processes. So far, strong limitations in the ability to quantitatively analyze single-cell trajectories have prevented large-scale investigations to assess the dynamics of entry into replicative senescence in yeast. Here, we have developed DetecDiv, a microfluidic-based image acquisition platform combined with deep learning-based software for high-throughput single-cell division tracking. We show that DetecDiv can automatically reconstruct cellular replicative lifespans with an accuracy comparable to that of a trained human being. In addition, this methodology provides comprehensive temporal cellular metrics using time-series classification and image semantic segmentation. Hence, this methodology provides an all-in-one toolbox for high-throughput phenotyping of aging cells and further quantitative division tracking assays in other eucaryotic models.


Introduction
Epigenetic processes that span several division cycles are ubiquitous in biology and underlie essential biological functions, such as cellular memory phenomena 1-3 , differentiation, and aging 4,5 . In budding yeast, mother cells undergo about 20 to 30 asymmetric divisions before entering senescence and dying 6 . Over the last decades, this simple unicellular has become a reference model for understanding the fundamental mechanisms that control longevity 4,5 . Several independent mechanistic models have been proposed to explain entry into replicative senescence, including asymmetric accumulation of extrachromosomal rDNA circles (ERCs) 7 , protein aggregates 8 , signaling processes associated with loss of vacuole acidity 9 , or loss of chromatin silencing 10 . Classical replicative lifespan assays (RLS) by microdissection, combined with genetic perturbations, have been decisive in identifying and characterizing genetic factors and pathways that influence longevity in budding yeast 11 . Similarly, enrichment techniques of aged mother cells in a batch provided a better understanding of the physiology of cellular senescence in this model organism 12,13 .
However, how the appearance of markers of aging is coordinated temporally and causally remains poorly understood 14,15 . In part, this is due to the difficulty of directly characterizing the sequence of events that constitute the senescence entry scenario: RLS assays by microdissection generally give no information other than the replicative age upon cell death; old cells enrichment techniques ignore the well-known large cell-cell variability in the progression to senescence, which may blur the sequence of individual cellular events.
Based on pioneering work in yeast 16 and bacteria 17 , the development of microfluidics-based mother cell traps has partially alleviated these limitations by allowing continuous observation of individual cell divisions and relevant fluorescent cellular markers under the microscope from birth to death [18][19][20] . In these studies, monitoring individual cells over time in a microfluidic device has demonstrated the unique potential to quantitatively characterize the heterogeneity in cellular dynamics during aging. Recent years have seen a wide diversification of microfluidic devices aimed at improving both experimental throughput and cell retention rates 21,22 , 23 ). These new developments have helped to highlight the existence of independent trajectories leading to cell death [23][24][25] and to better understand the physiopathology of the senescent state 26 .
However, the hype surrounding these emerging microfluidic techniques has so far masked a key problem associated with high-throughput time-lapse imaging, namely the difficulty of extracting quantitative and standardized information in an automated and robust manner, similarly as with micro-dissection 27 . In theory, multiplying the number of individual cell traps and chambers on a microfluidic system makes it possible to test the effect of a large number of genetic and/or environmental perturbations on aging. Yet, in practice, this is out of reach since lifespan analyses require manual division counting and frequent corrections in cell segmentation. This problem has largely contributed to limiting the methodological interest of the "arms race" observed in recent years for the temporal tracking of individual cells during aging. This has also made it very difficult to cross-validate the results obtained by other laboratories, which is yet essential to advance our understanding of the mechanisms involved in aging.
Fortunately, the rapid development of powerful deep learning-based image processing methods in biology using convolutional neural networks (CNN) 28 suggests a way to overcome this important technical barrier. Recently, a study showed the potential of image classification by a CNN or a capsule network to classify the state of dividing yeast cells (i.e., budded, unbudded, etc.) trapped in a microfluidic device 29 . However, due to the limited accuracy of the model, it has not demonstrated its ability to perform an automated division counting, let alone determine the RLS of individual cells. This is likely due to the fact that the misclassification of a single frame during the lifespan can dramatically compromise the accuracy of the RLS measurement.
Here, we report the development of DetecDiv, an integrated platform that combines high-throughput observation of cell divisions using a microfluidic device, a simple benchtop image acquisition system, and a deep learning-based image processing software with several image classification frameworks. Using this methodology, one can accurately track successive cell divisions in an automated manner and reconstruct RLS without human intervention, saving between 2 and 3 orders of magnitude on the analysis time. By combining this pipeline with additional deep-learning models for time series classification and semantic segmentation, we provide a comprehensive toolset for an in-depth quantification of single-cell trajectories during entry into senescence.

Results
An images sequence classification model for automated division counting and lifespan reconstruction The primary scope of our present study was to overcome the current limitations inherent to the analysis of large-scale replicative lifespan assays by taking advantage of deep-learning image processing methods. Yet, we took this opportunity to provide improvements to individual mother cell trapping devices, in order to maximize the robustness of RLS data acquisition. Based on a design similar to that reported in previous studies 21,22,30 , we added small jaws on the top of the trap to better retain the mother cells in the traps (especially the old ones), see Fig. 1 and S1. In addition, we reduced the wall thickness of the traps to facilitate their deformation and thus avoid strong mechanical constraints when the cells become too big (see Fig S1E-G and supplementary text for details). Finally, we added a microfluidic barrier that filters cells coming from microcolonies located upstream of the trap matrix, which eventually clog the device and thus compromise the experiment after typically 24h of culture. Altogether, the microfluidic device features 16 independent chambers with 2000 traps each, eliciting multiple conditions and strains to be analyzed in parallel.
Next, we built a custom benchtop microscope using simple optical parts to demonstrate that high-throughput division counting and quantitative RLS assays do not require any expensive fully-automated or high-magnification commercial microscopy systems. For this, we used a simple rigid frame with inverted epifluorescence optics, a fixed dual-band GFP/mCherry filter set, a bright field illumination column, a camera, and a motorized stage, for a total cost of fewer than 40k euros (see Fig. S1A and B). Image acquisition, illumination, and stage control were all interfaced using the open-source Micromanager software (Edelstein et al. 2014). Using a 20x magnification objective, this "minimal" microscope allowed us to follow the successive divisions and the entry into senescence of typically 30000 individual cells in parallel with a 5-min resolution (knowing that there are~500 traps per field of view using the 20x objective). This image acquisition system generates a large amount of cell division data (on the Terabytes scale depending on the number of channels, frames, and fields of view), only a tiny part of which can be manually curated in a reasonable time. In particular, the determination of replicative lifespans requires counting successive cell divisions until death, hence, reviewing all images acquired for each cell in each field of view over time. In addition, automating the division counting process is complicated by the heterogeneity in cell fate (i.e. cell-cycle durations and cell shape), especially during the entry into senescence.
To overcome this major limitation, we have developed an image classification pipeline to count successive generations and reconstruct the entire lifespan of individual cells dividing in the traps (Fig. 2C). For this, we have trained a convolutional neural network (CNN) based on the "Inception" architecture 31 to predict the budding state of the trapped cells by assigning one of six possible classes (unbudded, small-budded, large-budded, dead, empty trap, and clogged trap) to each frame ( Fig. 2A, Top). In this framework, the alternation between the 'large budded' or 'unbudded' and the 'small budded' states reveals bud emergences. The cell cycle durations can be deduced by measuring the time interval between successive budding events, and the occurrence of the 'dead' class determines the end of the cell's lifespan ( Fig.  2A, Bottom). We selected this classification scheme -namely, the prediction of the budding state of the cell -over the direct assessment of cell division or budding (e.g., "division" versus "no division") because division and budding events can only be assessed by comparing successive frames, which is impossible using a classical CNN architecture that takes a single frame as input.
To train and evaluate the performance of the classifier, we generated a manually annotated dataset (referred to as "ground truth" in the following) by arbitrarily selecting 250 traps containing situations representative of all cellular states from different fields of view and independent experimental replicates. To do so, we created a graphical user interface (GUI) to automatically detect the traps (by image auto-correlation with a user-selected reference pattern) and extract a 4-dimensional matrix (x,y, channel, time) for each trap (referred to as a Region Of Interest, or ROI, in the following, see Fig. 1). Then, the GUI was designed to assist the users with rapid screening and assignment of successive individual frames using keyboard shortcuts. Using this tool, it took about 3-9min to annotate a series of 1000 frames for a single ROI. Hence, the entire ground truth dataset was generated within 15-20h of work. We then arbitrarily split the ground-truth into two independent datasets: a training dataset with 200 ROIs was used to train the model using classical stochastic gradient descent (see Methods for details) and a separate test dataset containing 50 ROIs was used to benchmark the performance of the classifier after training (as summarized in Fig. 1).
Benchmarking the classifier consisted of three steps: first, we computed the confusion matrices ( Fig. S3A) as well as the classical metrics of accuracy, recall, and F 1 -score. The F 1 -score was found to be higher than 85% for all classes ( Fig S3C). Next, the predictions of budding events were compared to the manually annotated data. Despite a good visual match between the ground-truth and the CNN predictions, the distribution of division times revealed that the model tends to predict "ghost" divisions of abnormally short duration (Fig.  2B). In addition, sporadic misclassification could falsely assign a cell to the "dead" state, thus decreasing the number of total divisions predicted based on the test dataset (N=1127 for the ground truth versus N=804 for the CNN model, see Fig. 2C). Last, by comparing the lifespan predictions to the corresponding ground-truth data, we observed a striking underestimate of the overall survival (Fig. 2D), due to sporadic misassignments in the "dead" class (see also Fig S2B). These problems could be partially alleviated by post-processing the predictions made by the CNN (see "CNN+PP" in Fig. 2B-D and supplementary text for details). Indeed, by ignoring isolated frames with a "dead" class, we could greatly reduce the number of cases with premature cell death prediction, yet we failed to efficiently remove ghost divisions, hence leading to an overestimate of the RLS and to a large number of short cell-cycles ( Fig. 2C-D).
An inherent limitation to this approach is that images are individually processed without taking the temporal context into account. Although a more complex post-processing routine could be designed to improve the robustness of the predictions, it would come at the expense of adding more ad hoc parameters, hence decreasing the generality of the method. Therefore, to circumvent this problem, we decided to combine the CNN image classification with a long short-term memory network (LSTM) 32,33 , to take into account the time-dependencies between images ( Fig. 2A, Middle). In this framework, the CNN was first trained on the individual images taken from the training set similarly as above. Then, the CNN network activations computed from the temporal sequences of images were used as input to train an LSTM network (see suppl. for details). Following this training procedure, the assembled CNN + LSTM network was then benchmarked similarly as described above. We obtained only a marginal increase in the classification metrics compared to the CNN network (about 90-95% precision and recall for all classes, see Fig. S3A-B). Yet, strikingly, the quantification of division times and cellular lifespan both revealed considerable improvements in the accuracy: "ghost" divisions were drastically reduced if not completely removed, the distribution of cell-cycle duration was indistinguishable from that of the ground truth (p=0.45, Fig. 2C), and the difference between the number of divisions predicted by the network and the actual number was less than 2% (N=1147 and N=1127, respectively, see left panel on Fig. 2C). In addition, the Pearson correlation coefficient for ground truth vs prediction was very high (R²=0.996, see right panel on Fig. 2C). This indicates that mild classification errors may be buffered and hence do not affect the accuracy in the measurements of cell cycle durations. Moreover, it suggests that the network was robust enough to ignore the budding status of the daughter cells surrounding the mother cell of interest (Fig. S4). Similarly, the predicted survival curve was almost identical to that computed from the ground truth (p=0.74, Fig. 2D and Movie M1) and the corresponding Pearson correlation reached 0.991 (vs 0.8 and 0.1 for the CNN+PP and CNN, respectively). Altogether, these benchmarks indicated that only the combined CNN+LSTM architecture provided the necessary robustness to provide an accurate prediction of individual cellular lifespan based on image sequence classification.
Following its validation, we deployed this model to classify all the ROIs from several fields of views extracted from 3 independent experiments. We were thus able to obtain a survival curve with N=1880 lifespans in a remarkably short time (see Fig. 2E): less than 3.5s were necessary to classify 1000 images using a Tesla K80 GPU (i.e. more than 100 times faster than manual annotation). Conversely, it would have taken 130 days working 24 hours a day for a human being to generate this plot by manual annotation. To further apply the classification model trained on images of wild-type (WT) cells, we measured the large-scale RLS in two classical longevity mutants. Remarkably, we recapitulated the increase (resp. decrease) in longevity observed in the fob1Δ (resp. sir2Δ) mutant 34,35 and we could compute the related death rate with a high-confidence interval thanks to this large-scale dataset ( Fig  2E) 24 . Therefore, despite a significant initial investment (i.e.~one week of work) to generate the training and test datasets (250 ROIs in this case), our study shows that the classification pipeline subsequently saves months of work compared to manual analysis of the data.
Automated quantification of cellular physiological decline upon entry into senescence Aging yeast cells have long been reported to undergo a cell division slowdown when approaching senescence 6 , a phenomenon that we have since quantified and referred to as the Senescence Entry Point or SEP 20 . More recently, we have demonstrated that this quite abrupt physiological decline in the cellular lifespan is concomitant with the accumulation of extrachromosomal rDNA circles (ERCs) 24 , a long described marker of aging in yeast 7 . Therefore, precise identification of the turning point from healthy to pathological state (named pre-SEP and post-SEP in the following, respectively) is essential to capture the dynamics of entry into senescence, and even more so since the large cell-cell variability in cell death makes trajectory alignment from cell birth irrelevant 20,24 . To achieve this analysis in an automated manner, we sought to develop an additional classification scheme as follows: we trained a simple LSTM sequence-to-sequence classifier to assign a 'pre-SEP' or 'post-SEP' label (before or after the SEP, respectively) to each frame, using the sequence of cellular state probabilities (i.e., the output of the CNN+LSTM image classifier described in Fig. 2A) as input (Fig. 3A). The ground truth was generated by visual inspection using a graphical user interface representing the budding status of a given cell over time. Same as above, we used 200 manually annotated ROIs for the training procedure and reserved 47 additional ones that were never "seen" by the network to evaluate the predictions. Comparing the predictions to the ground truth revealed that we could successfully identify the transition to a slow division mode (R²=0.93, see Fig. 3B and 3C). Hence, we could recapitulate the rapid increase in the average cell-cycle durations after aligning individual trajectories from that transition (Fig. 3D), as described before 20 . These results show that complementary classifiers can be used to process time series output by other classification models, allowing further exploitation of relevant dynamic information, such as here the entry into senescence.

Cell contour determination and fluorescence image quantification by semantic segmentation
Quantifying the dynamics of successive divisions is an indispensable prerequisite for capturing phenomena that span multiple divisions such as replicative aging. However, in order to make the most of the possibilities offered by fluorescent markers in microscopy, it is necessary to develop complementary cytometry tools. For this purpose, semantic segmentation (based on the classification of pixels according to a finite number of classes) has seen a growing interest recently to process biomedical images, from the pioneering development of the U-Net architecture 36 to more sophisticated versions allowing the segmentation of objects with low contrast and/or in dense environments 37 . In addition, specific implementations of U-Net have demonstrated the broad potential of this architecture for segmenting 38 and tracking 39,40 cells in various model organisms.
Here, we have implemented an encoder/decoder network based on a Resnet50 CNN 41 and the DeepLab v3+ architecture 42 , see Fig. S6, to segment brightfield images (see Fig 4A, Movie M2, and supplementary text). We have trained the model on~1400 manually segmented brightfield images using three output classes (i.e., 'background,' 'mother cell,' 'other cell') in order to discriminate between the mother cell of interest and the surrounding cellular objects. We have used a separate test dataset containing~500 labeled images to evaluate the performance of the classifier. To generate the ground truth data required to feed both the training and test datasets, we have developed a graphical user-interfaced routine to "paint" the input images, a process which took about 15-30 seconds per image depending on the number of cells in the 60x60 field of view. Our results revealed that mother cells contours could be determined accurately with a trained classifier (Fig. 4A-C and S7A-D). In addition, we used a cross-validation procedure based on random partitioning of training and test datasets that highlighted the robustness of the classification (see Fig. S7E). Overall, this segmentation procedure allowed us to quantify the dynamics of volume increase of the mother cell (4C and 4D), as previously reported 24 .
Last, a similar training procedure with~3000 fluorescence images with a nuclear marker (using a strain carrying a histone-Neongreen fusiony) yielded accurate nuclei contours (see Fig. 4E, 4F, and S8). It successfully recapitulated the sharp burst in nuclear fluorescence that follows the Senescence Entry Point (Fig. 4G, 4H) 24 .

Discussion
In this paper, we have developed a pipeline based on the combined use of two architectures, namely a CNN+LSTM network for the exploitation of temporal information and semantic segmentation (DeepLabV3+) for the quantification of spatial information. We demonstrate that it can successfully characterize the dynamics of multi-generational phenomena, using the example of the entry into replicative senescence in yeast as a study model, a difficult case study that has long resisted any automated analysis. We envision that this methodology will unleash the potential of microfluidic cell trapping devices to perform high-throughput cell cell-cycle duration measurements and replicative lifespan analyses.
The major novelty of this work lies in the development of a method to automatically obtain survival curves and cytometric measurements during the entry into senescence from raw image sequences. Nevertheless, we also focused our efforts on improving traps to increase the efficiency of RLS assays in microfluidics. Also, we have built a minimal optical system (yet with a motorized stage) assembled from simple optical components (i.e., no filter wheel, fixed objective), for a price of about one-third that of a commercial automated microscope, which can be made accessible to a larger community of researchers. Although many laboratories use common imaging platforms with shared equipment, it is important to note that the cost of an hour of microscopy is around 10-20 euros in an imaging facility. As an RLS assay typically lasts 60-80 hours, these experiments may not be affordable. Developing a simple system can therefore pay off quite quickly if the lab does not have its own microscope.
Using this experimental setup, we show that our analysis pipeline works perfectly despite a low optical resolution (i.e. the theoretical resolution of our imaging system with a 20x, N.A. 0.45 objective is~0.7microns) and without any contrast-enhancing method. Therefore, we speculate that a microscope with higher resolution (i.e., using a lens with higher numerical aperture) would better preserve spatial information hence might further improve image classification results. In practice, it might be desirable for some applications to use higher magnification to analyze the localization of fluorescent markers by widefield or even confocal microscopy. With the microfluidic device described here, a 60x objective would provide a field of view containing about 75 traps, and several tens of fields of view could be imaged within 5min. Conversely, by modifying the geometry of the microfluidic system to further increase the number of independent channels, a large field of view (as described in our study) could be useful to screen a large number of mutants, test the effect of different drugs or environmental conditions, and analyze in detail the cell-cell heterogeneity in a population.
Multigenerational tracking of dividing cells requires the use of a microfluidic device that efficiently retains the cells of interest but also ensures efficient removal of their progeny. We speculate that all microfluidic systems based on this principle should be able to benefit from our analysis method, although some may be limited by their lower retention rate than that reported here (see Fig. S2G). An important advantage of individual cell trapping is that it makes image analysis much simpler than using chambers filled with two-dimensional cell microcolonies. Indeed, individual traps behave as a "hardware-based cell tracking" method, thus alleviating the need to identify and track objects spatially, a procedure that provides an additional source of errors. Because the cells of interest are located in the middle of the traps, the learning process focuses the attention of the classifier on the state of the mother cell only (e.g. small-budded, large-budded, etc.), hence the specific state of the few cells surrounding it may not influence the reliability of the classification of the mother (see Fig. S4 for specific examples). In addition, a powerful feature of whole image classification is that it can easily be coupled to a recurrent neural network (such as an LSTM network), thus opening the door to more accurate analyses that exploit temporal dependencies between images, as demonstrated in our study.
Beyond the tracking of successive divisions, complementary methods are necessary to characterize the evolution of cell physiology over time. In our study, we used semantic segmentation to delineate the contours of cell bodies over time. Same as above, the ability to discriminate the mother cell of interest from the surrounding cells results is facilitated by the conserved position of the mother at the center of the trap. However, a limitation of our classification scheme is that the buds that arise from the mother cell can not be identified, and further work is necessary to assess the requirements (e.g. the size of the training set) to achieve a successful segmentation using a separate 'bud' class. Thus, it is currently impossible to measure the growth rate (in volume) of the mother cell over time (most of the biomass created during the budded period goes into the bud) and it precludes from analyzing fluorescent markers that would localize into the bud. Future work may explore how the use of additional segmentation classes or the use of tracking methods could complement our pipeline to alleviate this limitation. Alternatively, the development of an instance segmentation method 43 could also facilitate the identification and separation of different cell bodies in the image.
Unlike classical image analysis methods, which require complex parameterization and are highly dependent on the problem being addressed, the well-known advantage of machine learning is the versatility of the models, which can be used for a variety of tasks, provided that they are properly trained. We envision that DetecDiv could be applied in different contexts without further development. For example, it could be useful to develop a classifier able to identify different cell fates during aging based on image sequences (e.g. petite cells 20 , or mode 1 versus mode 2 aging trajectories 44 ), as well as during induced 45 or undergone 46 metabolic changes. More generally, the rationalization of division rate measurements in a system where there is no competition between cells offers a unique framework to study the heterogeneity of cell behaviors in response to environmental changes (stress, chemical drugs, etc.), as evidenced by the rise of high-throughput quantitative studies in bacteria 47 . Mechanistic studies of the cell cycle could also benefit from a precise and standardized phenotypic characterization of the division dynamics.
Along this line, beyond the classification models described in this study, we have integrated additional frameworks, such as image and image sequence regressions (Fig S9), which could be useful to score fluorescent markers quantitatively and over time (e.g. mitotic spindle length measurement, scoring of the mitochondrial network shape, etc.). Finally, an interesting perspective of this framework in the coming years will be to apply it to other unicellular or higher eukaryotic model organisms, especially in biological contexts where complex temporal patterns exist.

Strains
All strains used in this study are congenic to S288C (see Supplementary Table 1 for details). See supplementary methods for detailed protocols for cell culture.

Microfabrication and microfluidics
The designs were created on AutoCAD to produce chrome photomasks (jd-photodata, UK). The microfluidic master molds were then made by standard photolithography processes (see supplementary text for details).
The microfluidic device is composed of geometric microstructures that allow mother cells trapping and flushing of successive daughter cells (see Fig. S1 and supplementary text). The cell retention efficiency of the traps is 97% after the five first divisions. We designed a particle filter with a cutoff size of 15 µm to prevent dust particles or debris from clogging the chip. The microfluidic chips were fabricated with PDMS using standard photo-and soft-lithography methods (PDMS, Sylgard 184, Dow Chemical, USA, see supplementary text for detailed protocols). We connected the chip using PTFE tubing (1mm outer diameter), and we used a peristaltic pump to ensure media replenishment (Ismatec, Switzerland). We used standard rich media supplemented with 2% dextrose (YPD). See supplementary methods for additional details.

Microscopy
The microscope was built from a modular microscope system with a motorized stage (ASI, USA, see the supplementary text for the detailed list of components), a 20x objective 0.45 (Nikon, Japan) lens, and an sCMOS camera (ORCA flash 4.0, Hamamatsu, Japan). A dual-band filter (#59022, Chroma Technology, Germany) coupled with a two-channel LED system (DC4104 and LED4D067, Thorlabs, USA). Sample temperature was maintained at 30°C thanks to a heating system based on an Indium Thin Oxide coated glass and an infrared sensor coupled to an Arduino-based regulatory loop. Micromanager v2.0 48 was used to drive all hardware, including the camera, the light sources, and the stage and objective motors. We developed a custom autofocusing routine to minimize the autofocus time (https://github.com/TAspert/DetecDiv_Data). The interval between two frames for all the experiments was 5 min. We could image approximately 80 fields of view (0.65mmx0.65mm) in brightfield and fluorescence (using a dual-band GFP-mCherry filter) with this interval.

Image processing
We developed a Matlab software, DetecDiv, which provides different classification models: image classification, image sequence classification, time series classification, and pixel classification (semantic segmentation), see Fig. S9. DetecDiv was developed using Matlab, and additional toolboxes (TB), such as the Computer Vision TB, the Deep-learning TB, and the Image Processing TB. A graphical user interface was designed to facilitate the generation of the training sets. The DetecDiv software is available for download on GitHub: https://github.com/gcharvin/DetecDiv Image classification for division tracking and lifespan reconstruction DetecDiv was used to classify images into six classes after supervised training using a GoogleNet 31 network combined with an LSTM network 33 . See supplementary text for details.
Image segmentation from brightfield and fluorescent images DetecDiv was used to segment images using a pixel classification model called Deeplab v3+ 42 , after supervised training based on 1400 and 3000 manually annotated images (respectively). See supplementary text for details.
Senescence Entry Point detection DetecDiv was used to detect cell-cycle slowdown (Senescence Entry Point) from a temporal sequence of classes obtained using the division tracking network. The training was based on manual annotation of 200 lifespans. See supplementary text for details.

Statistics
All experiments have been replicated at least twice. Data are presented in Results and Figures as the mean ± SEM (curves) or median. Group means were compared using the Two-sample t-test. A P value of < 0.05 was considered significant.

Computing
Image processing was performed on a computing server with 8 Intel Xeon E5-2620 processors and 8 co-processing GPU units (Nvidia Tesla K80), each of them with 12Go RAM. Under these conditions, the image classification of a single trap (roughly 60x60pixels) with 1000 frames took 3.5s for the CNN/LSTM classifier. For image segmentation, it took about 20s to classify 1000 images. Figure 1 -DetecDiv workflow Left: Sketch of the hardware setup used to track divisions at the single-cell level. A microfluidic device, featuring 16 independent channels with 2000 individual cell traps in each (depicted with a zoom on the trap array (scale bar: 20µm) and a zoom on one trap containing a budding yeast (scale bar: 5µm)), is imaged using timelapse microscopy. Middle-left: Typical temporal sequence of brightfield field of views obtained with the setup (scale bar: 60µm). Regions Of Interest (ROI) representing the traps, are automatically detected using XY cross-correlation processing, and the temporal sequence of each ROI (trap) is extracted and saved. Top-right: Sketch of the training and validation pipeline of DetecDiv classifiers. A set of ROIs are picked from one (or several) experiments, and annotated to form a groundtruth dataset. It is then split into a trainingset, used to train the corresponding classifier, and a testset, used to validate the trained classifier. Bottom-right: Example of signals extracted from ROIs using DetecDiv classifiers. An image classifier can be used to extract oscillations of classes describing the size of the bud, from dividing cells, and thus the occurence of new cell-cycles (more details in Fig 2). A sequence classifier can be used to detect changes in cell-cycle frequency, such as a cell-cycle slowdown (Senescence Entry Point, SEP) (more details in Fig 3). A pixel classifier can be used to segment the mother cell from other cells, and from the background (more details in Fig 4). Using these classifiers on the same ROIs allows to extract quantitative metrics from dividing cells, at the single-cell and population level. The numbers in the legend indicate the median replicative lifespans. The p-value indicates the results from a statistical rank-sum test. Right: Scatter plot representing the correlation of the replicative lifespans of individual cells obtained from the groundtruth with that predicted by the CNN/LSTM architecture (N=50). Inset: same as the main plot, but for the CNN and CNN with post-processing pipelines. R 2 indicates the coefficient of correlation between the two datasets. E) Replicative lifespans obtained using the CNN/LSTM network for longevity mutants (solid colored lines, genotype indicated). The shading represents the 95% confidence interval calculated using the Greenwood method 49 . The median RLS and the number of cells analyzed are indicated in the legend. The dashed lines with shading represent the hazard rate and its standard deviation estimated with a bootstrap test (N=100). Results from log-rank tests (comparing WT and mutant distributions) are indicated on the left of the legend.