This document provides a detailed overview of the processes and resources utilized for performing 2D nucleus segmentation using Cellpose and StarDist on Xenium data.
Download weights and resources in a .zip file, decompress the folder and add the project folder inside the repo (same level as all the other folders eg;inputs, masks): https://drive.google.com/file/d/1CpCZ1GZamGl3kcfPDySYkWi4fgI56g3O/view?usp=sharing
This script is used for cross-validation of the StarDist model. It contains routines to systematically evaluate the model's performance across different subsets of the data.
This script is dedicated to visualizing the data in the context of the StarDist model. It provides functions to plot the data, model predictions, and potentially compare these with ground truth annotations.
This script includes the code for training the StarDist model. It sets up the model architecture, compiles it with the necessary configurations, and trains it on the provided dataset.
This Jupyter notebook serves as a comprehensive guide and demonstration of the entire workflow. It walks through cross-validation, data visualization, model training, and evaluation, providing a hands-on experience with the StarDist model. You can choose what you want to try by changing the global variable at the beginning of the notebook
Below is a comprehensive list of the key folders and files integral to the Cellpose training and evaluation:
CellposeTrainingArena.ipynb
: Contains code for training models and collecting data. It's pivotal for cross-validation across various learning rates and epochs.cellpose.ipynb
: Dedicated to the evaluation of our trained Cellpose model, this notebook includes several visualizations.
This directory encompasses all the necessary data for training and validating the Cellpose model.
-
cellposetraining/control/
:- Contains images and masks for validating the trained Cellpose model.
final_segmentation/
: Includes the Cellpose-produced masks formip_2.tif
.images/
: Contains themip_2.tif
image.masks/
: Houses manually segmented/ground truth masks formip_2.tif
.
-
Validation Data:
cellposetraining/{morphology}_validate_mask
andcellposetraining/{morphology}_validate
: These folders contain the validation data used during Cellpose training.
-
Human-in-the-Loop Training Data:
cellposetraining/traindataHIL
andcellposetraining/trainingdataHIL_mip
: Includes training data generated from our Human-in-the-Loop (HIL) iterations.