Automated cell segmentation in FIJI® using the DRAQ5 nuclear dye
Image segmentation and quantification are essential steps in quantitative cellular analysis. In this work, we present a fast, customizable, and unsupervised cell segmentation method that is based solely on Fiji (is just ImageJ)®, one of the most commonly used open-source software packages for microscopy analysis. In our method, the “leaky” fluorescence from the DNA stain DRAQ5 is used for automated nucleus detection and 2D cell segmentation.
Based on an evaluation with HeLa cells compared to human counting, our algorithm reached accuracy levels above 92% and sensitivity levels of 94%. 86% of the evaluated cells were segmented correctly, and the average intersection over union score of detected segmentation frames to manually segmented cells was above 0.83. Using this approach, we quantified changes in the projected cell area, circularity, and aspect ratio of THP-1 cells differentiating from monocytes to macrophages, observing significant cell growth and a transition from circular to elongated form. In a second application, we quantified changes in the projected cell area of CHO cells upon lowering the incubation temperature, a common stimulus to increase protein production in biotechnology applications, and found a stark decrease in cell area.
Our method is straightforward and easily applicable using our staining protocol. We believe this method will help other non-image processing specialists use microscopy for quantitative image analysis.
KeywordsCell segmentation Image processing Batch processing Fiji ImageJ DRAQ5
Analysis of variance
Phorbol 12-myristate-13 acetate
Fluorescence microscopy is the method of choice to visualize specific cellular organelles, proteins, or nucleic acids with high sensitivity and selectivity. Importantly, fluorescence is, in principle, quantitative in that intensity of fluorescence from each position in a sample is proportional to the abundance of the fluorescent moiety in that region of the sample. Once fluorescence images are properly corrected, quantitative image processing can provide abundant information about the imaged species – most notably its spatial distribution within single cells [1, 2, 3]. The commercialization of automated microscopes, together with thousands of different fluorescent proteins, cell stains, and digital microscopy, has catalyzed the production of a staggering amount of high-quality imaging data. Thus, it is indispensable to automate the process of image quantification of which one essential step is image segmentation, i.e., the selection and compartmentalization of regions of interest (ROI) within the image. In mammalian cell culture experiments, which are the focus of this work, these ROIs are quite often single cells.
Proprietary image processing software from microscope manufacturers or software specialists such as Imaris or Metamorph offer potent and ready-to-use solutions for image segmentation and further processing. These programs are user-friendly and do not require deep knowledge of data processing nor any programming skills but require a monetary expenditure. CellProfiler is an open-source, alternative tool that offers a platform with a graphical user interface to customize a pipeline for cell detection and geometric quantification based on pre-programmed methods . The method presented in this work is an algorithm built within FIJI (is just ImageJ)® – hereafter called FIJI, a popular and effective alternative to CellProfiler, which is bundled with the open-source Micro-Manger microscopy control software [4, 5]. Because FIJI is widely used in the microscopy community, it offers a broad toolbox with several basic and (user-provided) advanced processing steps (via plugins) that can be combined to produce powerful image processing methods.
Automated fluorescence microscopy based cell segmentation algorithms from cytoplasmic stains can exhibit correct segmentation results above 89% . Modern computer vision algorithms for cell microscopy generate highly accurate segmentation lines with intersection over union (IoU) scores above 0.9, even for unstained samples (U-Net) . However, training computer vision algorithms requires large annotated datasets and can be challenging to adapt for additional imaging modalities when the training dataset does not sufficiently account for image diversity. In this contribution, we present a practical, automated algorithm for mammalian cell segmentation and geometric feature quantification in FIJI that can be extracted from fluorescent images using a single nuclear stain – in this case, DRAQ5, as opposed to more frequently used cell body stains. Because DRAQ5 does not exhibit fluorescence enhancement upon intercalating into DNA, as opposed to the almost omnipresent DAPI, it produces a moderate, “leaky”, cytosolic fluorescent DRAQ5 signal, which is still detectable within the dynamic range of our PMT in the confocal microscope. This “leaky” signal is crucial for our cell segmentation method. Our algorithm is based on appropriate background subtraction and the identification of the weak cytosolic DRAQ5 signals to properly identify cell bodies. Subsequent watershedding using the strong nuclear signal as the respective local maxima allows for efficient, and more importantly, accurate cell border detection. The modularity and delivery of our algorithm as an ImageJ macro should make it readily customizable to other end user’s needs. Moreover, it should be no problem to use this algorithm with other nuclear dyes so long as the dye exhibits sufficient cytosolic fluorescence along with strong nuclear fluorescence.
We start by describing the algorithm and demonstrating its quantitative accuracy by comparing automated analysis against human detection of HeLa cells. In two applications of our algorithm, we analyzed the cell growth of THP-1 cells during differentiation and the change in spreading area of Chinese hamster ovary (CHO) cells during low-temperature cultivation – a perturbation regularly used for biotechnology applications .
Combining the thresholded image (Scheme 1, IV) with the watershed lines (Scheme 1, V) via the logical (pixel-wise) “AND” operation produced a binary mask of the cell population in the image with juxtaposed cell borders of individual cells separated (Scheme 1, VI). A size filter was applied, detecting cells with sizes bigger than 200 μm2 to avoid detection of cell debris (Scheme 1, VII).
To analyze cell shape, we probed three parameters: projected cell area as a measure of cell spreading, circularity as a measure of cellular protrusions and aspect ratio as a measure of elongation. These quantities are exported in an automated fashion in a table format at the end of the analysis. An example of the Macro is given in the Additional file 1. All images used in this work and the example Macro is additionally available in .
Evaluation of the cell detection and segmentation method
Having established that our segmentation algorithm was accurate and specific compared to human evaluation and with respect to IoU scores compared to literature (see Discussion for details), we next focused on demonstrating the application of this method in different cell biology applications. We quantifed geometrical features of THP-1 cells during differentiation and spreading characteristics of CHO cells during low-temperature cultivation (often used to increase protein production yield in biotechnology applications – reviewed in ).
Quantifying projected area, aspect ratio, and circularity of HeLa and THP-1 from automated cell segmentation
To quantify the different shape characteristics, we measured the projected cell area, cell aspect ratio, and circularity. Briefly, the aspect ratio is defined as the ratio of the major to the minor axis of a fitted ellipse; circularity is defined as 4*(area/perimeter2). For example, objects having the shape of a perfect circle, have circularities and aspect ratios equal to 1. Higher aspect ratios are associated with elongation; lower circularity values are associated with cellular protrusions. Detailed information on these parameters is given in the Additional file 1 (Additional file 1 Figure S1).
We found that HeLa cells show a projected cell area of ~ 2600 μm2, a mean circularity of 0.58 and a mean aspect ratio of 2.2. In contrast, differentiated THP-1 showed a cell area of ~ 1650 μm2 and were almost perfectly round with a mean circularity of 0.82 and a mean aspect ratio of 1.27 (Fig. 2c - e). These findings are consistent with the elongated form of HeLa and the smaller round shape of differentiated THP-1 seen in the images of Fig. 2a and b, respectively.
Cell shape changes during THP-1 differentiation
Previous work has shown that THP-1 cells change their phenotype dramatically during differentiation, as they undergo a transition from suspension to adherent cells during differentiation into macrophage-like cells [13, 14]. Therefore, we analyzed cell morphology changes by monitoring cell area, circularity, and aspect ratio from dozens of confocal stacks that contained more than 90 (per day) THP-1 cells over a six-day differentiation and culture period.
Reduced temperature culture of CHO-cells causes cell shrinkage
As a second application of our cell segmentation algorithm, we analyzed the impact of temperature on projected cell area of CHO cells. Numerous studies have demonstrated how reduced temperature affects cellular growth (via arrest) and increases protein production in CHO cells [15, 16]. Higher rates of recombinant protein expression, coupled with extended production phases make temperature an interesting and easily tunable parameter in industrial biotechnological upstream processing.
In this study, we showed that it is possible to produce robust and accurate cell segmentation algorithms in FIJI with high accuracy and sensitivity using only a leaky signal from a nuclear stain. Because no additional cell body stain was necessary, this method frees a color for additional cell staining. Our algorithm produced better than 92% accuracy, 94% sensitivity, and 86% correctly segmented cells compared to human evaluation. This places our algorithm in similar segmentation performance as reported by Wählby et al. (above 89% correct segmentations)  and Buggenthin et al. (accuracies above 82% and sensitivities above 94%) . Additionally, we achieved an average IoU score of 0.83 when comparing our segmentation results to manual segmentation masks. This matches IoU scores of modern computer vision applications reported by Ronneberger et al. (0.77–0.92) .
We suspect that characteristics leading to incorrect counting from our algorithm include substantial cell clumping and a significant contribution from 3D cell growth. In these cases, several nuclei overlay, which ultimately hinders the watershedding process. For optimal quantitative analysis with our method, cells should not exhibit excessive clumping and should be preferably maintained in 2D culture. Additionally, fully confluent cell layers can be a hindrance, as they amplify the values in the subtraction mask and thereby lead to a reduction of “leaky” cytosolic signal in step III of the algorithm.
Compared to other algorithms that perform similar functions – automated segmentation and cell quantification, our algorithm offers both functions while using only a single nuclear dye that can also be used for binary cell counting, is conceptually straightforward, and built on an open-source (FIJI) platform. The comparison in terms of accuracy is on par with other approaches [18, 19] in terms of the specificity and error rate. Moreover, the general approach of thresholding combined with edge-detection to outline full cell bodies is in line with classical methods used for microscopy image segmentation . Similar methods have recently been used to evaluate bacterial segmentation [20, 21, 22] in the processing suites called MicrobeTracker, CellShape, and SuperSegger, respectively. Of these, MicrobeTracker was recently translated into a FIJI plugin called MicrobeJ .
The projected area of HeLa and differentiated THP-1 cells
Determination of cell area of HeLa cells using our algorithm resulted in larger cell areas than reported in literature. However, this can be traced back to different cell culture conditions: Puck et al. measured the cell area (1600 μm2) in 1956 using a self-made medium, and it is unclear if this contains similar supplements and additives as is common in today’s RPMI-based medium . Missirlis reported a cell area of 1400 μm2 for HeLas cultured on a “stiff” substrate, which was a hydrogel of ~ 85 kPa . As we examined cell area on glass with a Young’s modulus of order of GPa and because adherent cells tend to increase area with increasing stiffness , a bigger cell area in our experiments is not surprising. Lastly, Frank et al. reported a majority of HeLa cells analyzed show areas below 1100 μm2 . However, these measurements were performed only one hour after cell plating, which may still be during the initial spreading phase and is not comparable to our 24 h culture period. Taken together, and considering the accuracy of the cell outlines shown in our segmentation method, we surmise that our experiments give an accurate quantification of HeLa cell area under standard laboratory conditions after 2 days of seeding on glass bottom dishes.
Cell shape changes during THP-1 differentiation
Our results showed two growth periods of THP-1 from day 1 to 2 and from day 4 onwards, divided by a plateau phase with only minimal growth from day 2 to 4. Simultaneously, after day 4, we observed a trend to less circular, more elongated cell shape. This indicates the tendency to more pronounced cell spreading after a recovery phase of two days following PMA withdrawal. Our findings also potentially raise the question for several studies performed with THP-1 as to whether cell area was taken into consideration, as the increased membrane surface can influence cellular uptake of nutrients and the total number of membrane receptors. Many parameters such as cytokine expression, volume, and lysosomal numbers in THP-1 have been analyzed in detail ; however, to the best of our knowledge projected cell area during differentiation has not been correlated to these properties. It might be of further interest to analyze, e.g. cytokine excretion or lipid uptake – processes critical in immunology and pathogenesis – as a function of cell area to see how these parameters are linked to cell shape.
Changes in projected cell area with low-temperature culture
We found a 1.7-fold decreased projected area of CHO cells after 48 h of culture at 31 °C. Interestingly, Kaufmann et al. reported a 1.7-fold increased specific protein productivity in CHO after lowering the culture temperature from 37 °C to 30 °C . These higher production rates may be attributed to CHO cells adopting a quiescent reproduction phenotype, with fewer cell divisions and an accompanying smaller cell area. This could potentially free metabolic resources that could be directed toward protein production; however, this question certainly requires further exploration.
In this work, we demonstrated an automated process for mammalian cell image segmentation within the open-source scientific image analysis platform FIJI. Our method was developed to segment and identify cells from Z-projected images of the DRAQ5 nuclear dye and produced accuracy levels above 92%, sensitivity levels of 94, and 86% correctly segmented cells when compared to human evaluation. Using the precise IoU metric, our segmentation gave an IoU score of 0.83; all metrics which are very close to other published algorithms. Applying our algorithm, we measured cell spreading and elongation during THP-1 differentiation to macrophages and cell area reduction of CHO cells that arises in low-temperature cultures often used for protein production. At present, the majority of cell segmentation algorithms, including ours, are based on hard-coded detection of fluorescently-labeled image species. However, with emerging algorithms, especially in the field of computer vision and deep learning, future cell segmentation and analysis could transition to label-free (e.g. brightfield) imaging that enables unperturbed, label-free, and robust monitoring of cell shape as has already been demonstrated for phase contrast and differential interference contrast imaging [7, 28, 29].
Cell culture and staining
Unless stated otherwise, all cell culture experiments were performed at 37 °C and 90% relative humidity, with 10% fetal calf serum (Gibco) and 10 U/mL Penicillin/Streptomycin (Gibco) added to the respective medium, and with glass bottom culture vessels (MatTek).
HeLa cells (DSMZ no: ACC 57) were cultured in DMEM (Gibco) and THP-1 cells (DSMZ no: ACC 16) in RPMI 1640 medium (Sigma). To initiate differentiation, THP-1 culture medium was supplemented with 100 ng/mL phorbol 12-myristate-13 acetate (PMA) for 48 h as previously described . This procedure led to the adhesion of almost all cells within 24 h, which signals the onset of differentiation from monocytes to macrophages . For analysis of temporal changes in cell area during differentiation, THP-1 cells were incubated for an additional 96 h in full medium without PMA.
Chinese hamster ovary (CHO) cells (CHO-K1, DSMZ: ACC110) were cultured in Ham’s F12 medium. For cell density determination, CHOs were cultured in 6-well-plates (Greiner Bio-One) and counted in triplicate using a hemocytometer. For cell area determination, CHO cells were cultured in glass bottom μ-dishes (Ibidi).
After the indicated incubation times, all cells were fixed with 4% para-formaldehyde in PBS for 10 min. Cells were stained with 5 μM DRAQ5 (ThermoFisher) in phosphate-buffered saline (PBS) for 40 min at 37 °C and washed with PBS three times prior to microscopic analysis. Microscope measurements were performed within 24 h for all experiments.
Confocal microscopy (Leica TCS SP5 II, Leica) of cells was used to acquire axial cell volumes. More than 100 individual cells of each cell line were imaged using a 25X, 0.95 NA water immersion objective (Leica) with a 632.8 nm HeNe laser excitation. Emission was detected from 680 to 730 nm. Detector gain was set to minimize saturation within the nucleus, and the slice thickness within the Z-stack was set to 1.51 μm. The X-Y spacing was set to 0.6 μm per pixel, and the scanner speed was 400 Hz.
Three individuals, each having more than three years of cell culture experience, manually evaluated the segmentation results on a test image set. The following paragraph summarizes the measured observables, similarly defined by Buggenthin et al. .
“Manually counted cells” denotes all cells that are completely contained in the image. Cells found by the algorithm that have more than 90% of their area within the detected cell frame were counted in the category “correctly segmented cells”. “Missed cells” are cells in the image that were not detected by the algorithm. To account for segmentation quality, the two categories “under-segmented cells” and “over-segmented cells” were included. “Under-segmented cells” are multiple cells that are detected as a single instance such that the detected frame contains more than one cell or single cells that are detected by the algorithm where the frame is much larger than the actual cell. “Over-segmented cells” are instances where only a small section of the cell is detected, or one cell is split into multiple parts. Large cell debris in the image that could potentially be mistaken as a cell by a segmentation algorithm were counted in the “debris” category. For calculation of “accuracy” and “sensitivity”, detected instances were categorized as “true positives” (cells correctly identified by the algorithm, no information about segmentation), “false positives” (cell debris or any other objects that were falsely detected by the algorithm), and “false negatives” (any cells that were not detected by the algorithm in addition to those that were not counted in under-segmented instances). Accuracy was calculated as 100*(true positives)/(true positives + false positives + false negatives) and sensitivity as 100*(true positives)/(true positives + false negatives). “Percent correctly segmented” was calculated as 100*(correctly segmented cells) / (manually counted cells).
Additionally, to quantify the segmentation success, binary ground truth masks of cells in all test images were produced manually, and the intersection over union (IoU) score was calculated for the algorithm segmentation results using the FIJI plugin MorphoLibJ .
Statistical evaluation was performed using GraphPad Prism 7.0 (GraphPad Software). To test the statistical significance of differences in the cell area, circularity, and aspect ratio of THP-1 and HeLa cells, as well as cell area differences of CHO cells cultured at different temperatures, a two-tailed t-test with Welch’s correction, was applied. For time-dependent changes in cell area, circularity, and aspect ratio during THP-1 differentiation, data were evaluated using analysis of variance (ANOVA) with post-hoc analysis based on the Tukey test. Statistical significance was expressed as *, **,*** and ****, indicating p-values < 0.05, 0.01, 0.001 and 0.0001, respectively.
We gratefully acknowledge Sachin Kumar B, Ravi Dhiman, and Sabine Pütz for manual evaluation of HeLa cells, Frederik F. Fleissner for scientific discussions, Anika Keswani, Alexandra Paul and Hari Shroff for critical reading of the manuscript, and Anke Kaltbeitzel for the use of the laser scanning confocal microscope.
M.S. acknowledges generous support by a PhD Fellowship from the Max Planck Graduate Center. S.H.P. acknowledges funding from the DFG #PA 252611–1.
Availability of data and materials
The FIJI macro and the datasets analyzed during the current study are available in the Edmonds repository, https://edmond.mpdl.mpg.de/imeji/collection/quuxweXFiBEQnctM?q=
M.S. carried out the cell experiments, microscopic image acquisition, and code generation. R.E.U. and M.B. supervised the project. S.H.P. designed the study, conceived the algorithm with M.S., and supervised the project. M.S. and S.H.P. wrote the manuscript, and all authors edited the manuscript. All authors read and approved the final manuscript.
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
- 5.Edelstein A, Amodaj N, Hoover K, Vale R, Stuurman N. Computer control of microscopes using μManager. Current Protocols in Molecular Biology. 2010;92(1):14.20.11–7.Google Scholar
- 6.Wählby, Carolina, et al. "Algorithms for cytoplasm segmentation of fluorescence labelled cells." Analytical Cellular Pathology. 2002;24(2–3):101-11.Google Scholar
- 7.Ronneberger O, Fischer P, Brox T. U-net: convolutional networks for biomedical image segmentation. In: International Conference on Medical image computing and computer-assisted intervention: Springer; 2015. p. 234–41. https://link.springer.com/chapter/10.1007/978-3-319-24574-4_28
- 9.Raw data and processing files [https://edmond.mpdl.mpg.de/imeji/collection/quuxweXFiBEQnctM?q=]. Accessed 12 Jan 2019.
- 29.Kerrison N, Bulpitt A. Automated segmentation of cell structure in microscopy images. In: 2014 International Conference on Computer Vision Theory and Applications (VISAPP): 5–8 Jan 2014; 2014. p. 98–105.Google Scholar
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.