Installing and Running CyPose
To install CyPose, first clone the repository from GitHub:
You will need to set up a virtual environment, using either virtualenv or conda (or another tool of your choosing). Then, install poetry and the project dependencies:This project is structured so that segmentation is easy if you have an input movie in TIF format. See the test_segmentation.sh file for an example of how to run segmentation using a provided model:
python run_segmentation.py \
--input_file "/path/to/tif" \
--output_file "/path/to/out_masks.tif" \
--model ./models/your_model --start_frame 0 --end_frame 224
Models are provided in one of two formats:
- Single channel movies, which are designed to be used against a brightfield image. These are the most versatile.
- Two channel movies, which are designed for movies with brightfield and chlorphyll images. In the case of some strains, we see better performance using the chlorphyll channel by allowing the model to more reliably learn the morphological differences between distinct celltypes.
By default, our best models are listed by the strain name. You can also choose to use a pre-built cellpose model (e.g. 'cyto2' or 'cyto3') if applying these tools to a celltype that a well performing fine-tuned model is not available for.