Tracking unlabeled cancer cells imaged with low resolution in wide migration chambers via U-NET class-1 probability (pseudofluorescence)

Cell migration is a pivotal biological process, whose dysregulation is found in many diseases including inflammation and cancer. Advances in microscopy technologies allow now to study cell migration in vitro, within engineered microenvironments that resemble in vivo conditions. However, to capture an entire 3D migration chamber for extended periods of time and with high temporal resolution, images are generally acquired with low resolution, which poses a challenge for data analysis. Indeed, cell detection and tracking are hampered due to the large pixel size (i.e., cell diameter down to 2 pixels), the possible low signal-to-noise ratio, and distortions in the cell shape due to changes in the z-axis position. Although fluorescent staining can be used to facilitate cell detection, it may alter cell behavior and it may suffer from fluorescence loss over time (photobleaching). Here we describe a protocol that employs an established deep learning method (U-NET), to specifically convert transmitted light (TL) signal from unlabeled cells imaged with low resolution to a fluorescent-like signal (class 1 probability). We demonstrate its application to study cancer cell migration, obtaining a significant improvement in tracking accuracy, while not suffering from photobleaching. This is reflected in the possibility of tracking cells for three-fold longer periods of time. To facilitate the application of the protocol we provide WID-U, an open-source plugin for FIJI and Imaris imaging software, the training dataset used in this paper, and the code to train the network for custom experimental settings. Supplementary Information The online version contains supplementary material available at 10.1186/s13036-022-00321-9.


Introduction
The regulation of many biological processes is mediated by the migration of cells from one anatomical location to another to exert their function. For example, primordial germ cell migration in zebrafish is essential to ensure the correct organ development [1]. Moreover, the correct development of proper immune responses requires a fine-tuned regulation of leukocyte trafficking and migration [2][3][4].
Amongst the mechanisms involved in cell migration, chemotaxis polarizes cells and controls the direction of migration toward favorable locations [5,6]. Hence, several studies focus on the knowledge of the molecular mechanisms and signaling pathways that regulate chemotaxis in vitro and in vivo. However, the directional movement of cells is regulated not only by the type of soluble cues diffused into and retained by the environment but also by the environment itself [7,8]. Therefore, engineered microenvironments are essential to study cell migration in vitro. Amongst these, 3D migration is a setting where cells are embedded in collagen-like fibers to mimic the extracellular matrix (ECM) in vitro [6,9] (Fig. 1A). Widefield Microscopy (WM) is an established technique to perform long-term imaging studies in large migration chambers. This technique can be applied by recording the fluorescence intensity or the intensity of the light transmitted through the sample, without necessarily requiring fluorescent staining. In this imaging modality, the acquired data consists of a series of 2D grayscale images captured over time.
However, when WM is applied to study the migration of motile cells in large 3D migration chambers, the analysis of the acquired series of images presents specific challenges. Indeed, the classical analysis pipeline involves three steps: cell detection, cell tracking, and computation of motility measures [10,11]. The application of such a pipeline is hampered at the first step, due to drastic changes in cell shape that introduce cell detection errors. These changes are associated with the frequent squeezing of the cytoskeleton while migrating through dense ECM [6], or introduced as an artifact during the migration along the z-axis. In the last case, cells are imaged outside the focal plane, leading to blurred and enlarged shapes in the acquired images.
Additionally, depending on the experimental settings, cells can require a long period to exert a directional movement. Hence, long acquisition times are needed. Long-time acquisitions may prevent the usage of fluorescent staining (used to facilitate cell detection) due to photobleaching or phototoxicity. Hence, imaging of unlabeled cells using transmitted light (TL) is necessary. Lastly, analysis of cells following long tracks (i.e., > 150 μm), demands a large field of acquisition and necessitates low magnification (i.e. 4X objective). Therefore, the resolution is another challenge for cell detection and subsequently compromises tracking (Fig. 1B). Recent advances in artificial intelligence methods applied to bioimage analysis remarkably improved the accuracy of cell detection and subsequently tracking [12][13][14]. Amongst these, end-to-end neuronal networks with convolutional layers such as the U-NET [15] and its variants that transform an input image into another image as output, improved the segmentation of complex structures with respect to single pixel classifiers [16], gaining application in both biomedical imaging for cell detection, counting, and morphological analysis [17,18]. The usage of U-NET was also demonstrated to improve cell and tracking due to the increased robustness of object detection on binary masks rather than on original images which may suffer from non-uniform illumination or poor signal to noise ratio [19][20][21][22].
Although U-NET was applied to many different imaging modalities and cell types, a pipeline to specifically analyze time-lapse images of unlabeled cells acquired with low magnification via brightfield microscopy in 3D migration chambers is still missing.
Therefore, we propose WID-U (U-NET for WIDe migration chambers), a plugin for common bioimaging software such as Imaris (Oxford instruments) and FIJI, that converts the TL signal from brightfield microscopy into a fluorescent like signal (pseudofluorescence) corresponding to the class 1 probability from the U-NET. The signal generated by WID-U yielded an efficient detection of the cells using standard spot-detection methods available in TrackMate [23,24] and Imaris, which subsequently improved cell tracking accuracy in images with low resolution from 3D in vitro environments.

Pipeline to convert TL to pseudo-fluorescence
To convert the TL signal from unlabeled cells to pseudo-fluorescence, we developed an image processing pipeline based on deep learning. Such a pipeline is specifically developed to face the challenges arising when images of cells are acquired in large 3D migration chambers, at low magnification (4x) and large fields of view (2 mm × 2 mm). To account for such low magnification and large fields of view, images are processed with a sliding window of 56 × 56 pixels (~ 92 μm × 92 μm) ( Fig. 2A, red square). Subsequently, each window is upscaled by a factor of 4 to 224 × 224 pixels, and processed via a patch classifier based on the U-NET architecture [17]. (Fig. 2B). Such architecture receives as input the upscaled TL images (Fig. 2B, grayscale image), and generates as output an image where the intensity of each pixel is the class-1 probability, or pseudofluorescence (Fig. 2B, magenta-colored image). The output of the U-NET is then downscaled and reassembled as a new imaging channel of the original image (Fig. 2C). To train the network, datasets consisting of upscaled image pairs were manually created using a custom tool that virtually zooms-in on selected areas of different videos and at different time points. This allowed examples of cells lying at different focal planes, and in areas with different illumination, conferring to the trained network robustness to brightness/contrast changes (Fig. S1).

Enhanced cell detection and tracking of B cell lymphoma in 3d migration chambers
We applied the proposed pipeline to analyze videos of VAL cells (a Germinal Center-derived B cell lymphoma), acquired in 3D microenvironments. A dataset of 150 image pairs was used to train the network (Fig. 3A). Then, we compared the quality of the pseudofluorescence signal with respect to TL, or real fluorescence emitted by cyan fluorescent protein positive (CFP+) cells. The proposed pipeline yielded a significant improvement in the signal-to-noise ratio (SNR) with respect to TL images (Fig. 3B), and a higher but not significantly improvement in SNR with respect to real fluorescence (CFP). In contrast to CFP, the intensity of the pseudo-fluorescent signal did not suffer from photobleaching (Fig. 3C). Despite noise was introduced by the automatic adjustment of focal plane at each time point, the mean intensity of the pseudo-fluorescent cells never decreased below 80% of the intensity at the initial time point.
Moreover, the proposed pipeline increased the visibility of cells, which were out of focus or with deformed shapes (Fig. 3D). Altogether, these properties make pseudofluorescence similar to real fluorescence, but with increased stability over time.
To validate the effect of pseudofluorescence on the quality of cell tracking, we performed automatic cell tracking using TL, real fluorescence (CFP+ cells), or pseudofluorescence signals. Pseudofluorescence yielded significantly more accurate tracks than the original TL signal, with an average three-fold increase in the track duration (Fig. 3E). In comparison with real fluorescence, track duration was longer, especially in the late time points when the fluorescent signal was fading (Fig. 3B-E). In general, pseudofluorescence decreased the number of tracking errors, resulting in fewer interrupted tracks (Fig. 3F) and fewer glitches when cells were in close proximity (Fig. 3G), facilitating the automatic tracking of cells using pseudofluorescence in large 3D microenvironments (Fig. 3H, Fig. S2).
Additionally, we manually tracked 195 cells from three different experiments corresponding to 23,991 spots (all the cells in the field of view were tracked, respectively 40, 96, 59 tracks, and 5182, 10,117, 8692 spots) and compared these tracks with the ones obtained by applying the proposed pipeline (Fig. 3I). The true positive rate of spot detection was greater than 95%, while the false positive rate was lower than 17% and a false negative rate lower than 5%. To evaluate the accuracy of cell tracking instead (i.e. penalizing track switch errors), we performed a multi-object tracking analysis (MOTA) [25] obtaining a MOTP score greater than 0.74 (Fig. 3J).

Enhanced cell detection and tracking of MDA-MB231 breast cancer cells with heterogeneous shapes
To validate the applicability of the pipeline to track cell types with substantially different morphologies, we performed chemotaxis assays using MDA-MB-231, a human breast cancer cell line established from a pleural effusion of a 51-year-old Caucasian female with metastatic mammary adenocarcinoma. These are epithelial adherent cancer cells with a heterogeneous morphology, either spindle-shaped (long and thin) or rounded. A dataset with 73 image pairs from 3 independent experiments depicting cells with both morphologies was generated (Fig. 4A). Then, the network was re-trained and applied to convert the TL signal to pseudofluorescence.
The computed class-1 probability was used as input to a tracking algorithm based on threshold detection and linking, obtaining significantly longer tracks with respect to the ones obtained using the raw TL signal (Fig. 4B-C).

WID-U plugin
To facilitate the execution of the pipeline for TL to fluorescence conversion, a plugin for the Imaris (Oxford instruments), and a plugin for FIJI bioimaging software have been developed. The protocol that makes use of the plugin to enhance cell tracking is summarized in (Fig. 5).
Briefly, it will be sufficient to load the image sequence in the preferred imaging software, then launch the WID-U plugin to transform the TL signal into a new channel with pseudofluorescence. Finally, automated cell tracking can be performed on the generated new channel. Regarding the installation, the software comes with three different parts: the plugin itself, the program to re-train, if needed, the network for custom cell types, and the program that performs the computations using deep learning. These last two programs can be either installed on the same machine where FIJI/Imaris is installed or configured on a remote machine dedicated to computation (a CUDAenabled machine is recommended to speed up the execution). To configure the connection to such a machine, it will be sufficient to configure the IP address in the plugin (Fig. S3). Instructions are included in the README file. Additionally, to use WID-U without a GPU-enabled machine, we made available a macro to export the images, process them on a remote machine (i.e. , a free online deep learning platform such as Google COLAB), and a macro to import the results in the desired software (Fig. S3).

Migration assays
3D migration of VAL cells was performed using the 3D chamber μ-Slide from Ibidi as described by Antonello et al. https:// doi. org/ 10. 3389/ fimmu. 2022. 10678 85. Briefly, cells were embedded in a collagen matrix formed by 1.6 mg/mL PureCol (Collagen, Sigma-Aldrich), 0.36% PBS supplemented with 0.36% FBS, 0.036% P/S, 1.5 μg/ mL recombinant human ICAM-1/CD54 Fc chimera (R&D systems) at 4 °C. The temperature was slowly raised over 45 min to 37 °C to induce a homogeneous collagen fiber polymerization. Complete medium was added to both side reservoirs. After 24 hours, 15 μL of 400 nM CXCL12 were added to one of the reservoirs and time-lapse video microscopy was performed for 6 hours at 20 seconds time intervals using an ImageXpress ® (Molecular Devices) high throughput microscope, equipped with an incubation system set to CO 2 5%, O 2 95%, 37 °C, with a Nikon Plan Apo 4x / NA 0.2 and 20 mm working distance objective. CFP was excited with a Lumencore LED lamp, excitation band 438/24, collection band 483/32. For brightfield imaging, the condenser was set to Koehler illumination. Collection was performed with an Andor Zyla sCMOS camera. Migration assays of MDA-MB-231 cells were performed using the μ-Slide chemotaxis chambers from Ibidi, according to the manufacturer's instructions. Briefly, cells were resuspended at 3 × 10 6 cells ml − 1 in Dulbecco's Modified Eagle Medium (DMEM) and glutaMAX (619650-026, GIBCO, ThermoFisher Scientific, Switzerland) supplemented with fetal bovine serum 1% (16000-044, GIBCO, ThermoFisher). The observation area of the chamber was filled with cells, and the chamber was placed in the incubator (CO 2 5%, O 2 95%, 37 °C) for 1 h to allow cell adherence. Time-lapse video microscopy images were recorded for 18 h with a time interval of 600 seconds using the ImageXpress as described above.

Transformation of TL images into pseudofluorescence
TL images were converted into pseudofluorescence by employing an end-to-end neural network with convolutional layers based on the U-NET architecture [17]. A dataset with pairs of TL and pseudofluorescence (binary masks) was created manually drawing the contour of cells. Such dataset included 150 images of 56 × 56 pixels (91 × 91 μm) from different experiments. These images were upscaled to 224 × 224 pixels to facilitate annotation then downscaled to 112 × 112 pixels for training and augmented to 15′000 images. The trained network was then applied to convert images of size > = 1000 × 500 pixels, to pseudofluorescence by classifying a moving window of 56 × 56 pixels. The class-1 probability computed by the U-NET was used as pseudofluorescence. Hyperparameters on training can be found in the code in Supplementary material. Briefly, Adam optimizer, loss = binary cross-entropy, initial learning rate = 10 − 4 , batch size = 2, epochs = 60. Data augmentation was performed using Keras image generators, with rotation range = 0.5, zoom range = 0.5, vertical and horizontal shift = 0.5, shear range = 0.2, horizontal and vertical flip, and zero filling.

Cell tracking
Initially, TL images were transformed into pseudofluorescence images. Then, cells were detected and tracked using the Spots tracking functionality of the Imaris software (Oxford Instruments, v.7.7.2) in the original TL channel, in the imaging channel capturing fluorescence, and in the pseudofluorescence channel. In all cases, an estimated spot diameter of 8 um was selected and background subtraction was enabled to account for nonuniform illumination. Tracking was performed using an autoregressive motion model, with a maximum distance of 20 μm, and a maximum gap size of 0. Tracks shorter than 300 seconds were excluded from the analysis. Tracks were divided into two classes (WT and CFP+ cells), based on the mean fluorescence intensity of the imaging channel centered on CFP. Finally, the duration of each track was computed. Tracks outside the migration channel were deleted manually. Automatic tracking was also performed using Track-Mate in FIJI [23] using the LoG spot detector or automatic thresholding, and Simple Lap tracker for spot tracking. The same threshold described before for the tracking in Imaris were used also for the tracking in TrackMate.

Image and tracking measures
Track measures were exported from Imaris or TrackMate and processed in Matlab to compute track duration, fluorescence decay and SNR. SNR was estimated as [avg (FG) -avg. (BG)] / std. (BG) where FG is the intensity of the pixels in the foreground and BG pixels in the background as previously described [12].

Discussion
The application of deep learning to in vitro time-lapse imaging improved the tracking accuracy of cancer cells in large 3D migration microenvironments. In this paper, this was achieved by training a U-NET architecture with a custom dataset for B cell lymphoma (globular shapes) and a custom dataset for breast cancer cells (heterogeneous shapes). To apply our pipeline to other cell types or other imaging modalities, the network can be re-trained. In the cases included in this paper, 70 to 150 image pairs with data augmentation were sufficient to improve tracking accuracy. However, to enhance the robustness of cell detection, image pairs included in the training set should be representative of cells in different areas of the microenvironment. The creation of the training set was facilitated by upscaling. This is associated with an increased precision during the manual annotation when cells had a small area (i.e., 4 pixels), and was completed by an imaging expert in less than 6 hours for both cases. However, to minimize the number of training examples required, we recommend the usage of transfer learning approaches [17].
The tracking was improved mainly as a consequence of more accurate spot detection. Several tools based on supervised machine learning are nowadays available for cell segmentation. However, to track cell centroids over time, accurate shape reconstruction may not be required. Indeed, the class-1 probability generated by