-
Notifications
You must be signed in to change notification settings - Fork 129
Stardist
StarDist is a deep-learning method that can be used to segment cell nuclei in 2D (XY) single images or in stacks (XYT). This page contains information to help you train StarDist networks in google Colab using your own images.
The Myers laboratory-created StarDist, and you can access the original papers here:
- Cell Detection with Star-convex Polygons
- Star-convex Polyhedra for 3D Object Detection and Segmentation in Microscopy
Please also cite these original papers when using StarDist with our notebook.
-
StarDist original code and documentation are freely available in GitHub.
-
A starDist Q and A is available here.
-
A StarDist Webinar: Introduction to nuclei segmentation with StarDist
To train a StarDist network you need matching images of nuclei and of corresponding masks (see example bellow).
Nuclei can be stained using your method of choice (for instance, using DAPI for fixed samples or SIR-DNA for live samples), and images can be acquired on a wide variety of instruments. For instance, for the training dataset provided with our notebook, cells were incubated for 2h with 0.5 µM SiR-DNA (SiR-Hoechst) before being imaged live using a spinning-disk confocal microscope. The spinning-disk confocal microscope used was a Marianas spinning disk imaging system with a Yokogawa CSU-W1 scanning unit on an inverted Zeiss Axio Observer Z1 microscope (Intelligent Imaging Innovations, Inc.) equipped with a 20× (NA 0.8) air, Plan Apochromat objective (Zeiss).
Masks can be generated manually in Fiji by following the instructions below:
- Install Fiji
- Install the LOCI plugin
- Open your Nuclei image in Fiji
- Draw the outlines of the nuclei, one by one, using the freehands selection tool
- Add each outline to the ROI manager (key shortcut "t")
- Once all the nuclei have been outlined, use the LOCI plugin to create an ROI map (Plugins-> LOCI-> ROI map)
- Save the mask image
- Rename the mask image so that its name matches the corresponding nuclei image
To train StarDist (2D or 3D) in Google Colab:
Network | Link to example training and test dataset | Direct link to notebook in Colab |
---|---|---|
StarDist (2D) | here | |
StarDist (3D) | from Stardist github |
or:
-
Download our streamlined ZeroCostDL4Mic notebooks
-
Open google colab
-
Once the notebook is open, follow the instructions.
Once a StarDist model has been trained, it can be applied to detect nuclei (or other roundish objects) from microscopy images. One possible biological application is to identify nuclei over time from live-cell imaging data (cell migration experiments). Once detected, the Nuclei can be tracked. Bellow is a short protocol illustrating how StarDist and Trackmate can be connected to track and quantify cell migration automatically.
Trackmate is user-friendly and powerful software to perform tracking experiments. Trackmate is developed by Jean-Yves Tinevez and colleagues, and you can access the original paper here:
Please also cite this original paper when combining StarDist and Trackmate.
Step-by-step protocol
You can download a full step-by-step protocol here or check our paper here
Step 1: train a StarDist model using our ZeroCostDL4Mic StarDist 2D notebook
- For detailed instructions, see above
- Make sure to evaluate your StarDist model using our QC section.
Step 2: Use ZeroCostDL4Mic StarDist 2D notebook to generate tracking files
- Save all the video you want to analyze as .tif file in a folder and upload them to google drive
- Initiate the ZeroCostDL4Mic StarDist 2D notebook (Section 1 and 2)
- Go to section 6 of the ZeroCostDL4Mic StarDist 2D notebook
- Choose "stacks" as Data Types
- Enable the "Tracking file" option
- Make sure to load the correct StarDist model you want to use to make predictions
- Download the Tracking files
The "tracking files" are images where the centre of each detected nuclei is indicated as a spot. This can then easily be detected in Trackmate.
Step 3: Perform the tracking using Trackmate
Analysis of one file at the time:
- Open the previously generated tracking files in Fiji
- Open Trackmate (Plugin -> Tracking -> Trackmate)
- In Trackmate, choose the Downsample LoG detector
- Use the following parameters: Estimated blob diameter (1), Threshold (1), (downsampling factor (1). Use the preview to ensure that the detection is correct
- Choose the LAP tracker
- Choose an appropriate frame linking distance. Consider enabling Track segment splitting (cells can divide) and disable Track segment merging.
- For more information on how to use Trackmate, consider looking at this excellent tutorial.
Batch analyses
We created a Fiji macro to batch analyze a folder containing multiple "tracking files" generated by our StarDist notebook. You can download it here.
- Drag and drop the file on Fiji
- Click on "run."
- Follow the instructions
Step 4: Analysis of cell tracks
Once tracked using Trackmate, results can be further processed using Motility lab. In particular, our automated tracking script will save files that are optimized to be analyzed with this online tool. If you are using batch processing, you can use our R script to compile your results in a two .csv files. You can download the R script here here.
Main:
- Home
- Step by step "How to" guide
- How to contribute
- Tips, tricks and FAQs
- Data augmentation
- Quality control
- Running notebooks locally
- Running notebooks on FloydHub
- BioImage Modell Zoo user guide
- ZeroCostDL4Mic over time
Fully supported networks:
- U-Net
- StarDist
- Noise2Void
- CARE
- Label free prediction (fnet)
- Object Detection (YOLOv2)
- pix2pix
- CycleGAN
- Deep-STORM
Beta notebooks
Other resources: