-
Notifications
You must be signed in to change notification settings - Fork 3
virtual staining instructions
This guide provides detailed instructions on how to train and run inference using the VisCy CLI or python scrips for the different virtual staining models: VSNeuromast, VSCyto2D, and VSCyto3D.
Ensure you have followed the installation instructions here
Note: for all the following tasks you will need to activate the environment:
conda activate viscy
Choose a directory to download the data
# Create the directory to download the dataset
download_dir= ... # TODO: Change to your choice of directory (i.e /path/to/download)
mkdir -p "$download_dir"
# Navigate to the download directory
cd "$download_dir" || exit
# Download the model weights, configurations, and OME-Zarr dataset
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_datasets/VSNeuromast"
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_models/VSNeuromast"
To train the VSNeuromast model, use the following command:
cd ./VSNeuromast/timelapse_finetine_1hr_dT_downsample_lr1e-4_45epoch_clahe_v5 #TODO: Navigate to the directory you downloaded the model
viscy fit -c config.yml
To run inference with the VSNeuromast model, use the following command:
cd ./VSNeuromast #TODO: Navigate to the directory you downloaded the model
viscy predict -c config.yml
Check out the example demo_vsneuromast.py
Choose a directory to download the data and run this shell script
# Create the directory to download the dataset
download_dir= ... # TODO: Change to your choice of directory (i.e /path/to/download)
mkdir -p "$download_dir"
# Navigate to the download directory
cd "$download_dir" || exit
# Download the model weights, configurations, and OME-Zarr dataset
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_datasets/VSCyto3D"
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_models/VSCyto3D"
To train the VSCyto3D model, use the following command:
cd ./VSCyto3D #TODO: Navigate to the directory you downloaded the model
viscy fit -c config.yml
To run inference with the VSCyto3d model, use the following command:
cd ./VSCyto3D #TODO: Navigate to the directory you downloaded the model
viscy predict -c config.yml
Checkout out the example demo_vscyto3d.py
Choose a directory to download the data
# Create the directory to download the dataset
download_dir= ... # TODO: Change to your choice of directory (i.e /path/to/download)
mkdir -p "$download_dir"
# Navigate to the download directory
cd "$download_dir" || exit
# Download the model weights, configurations, and OME-Zarr dataset
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_datasets/VSCyto2D"
wget -m -np -nH --cut-dirs=3 -R "index.html*" "https://public.czbiohub.org/comp.micro/viscy/VS_models/VSCyto2D"
cd ./VSCyto2D #TODO: Navigate to the directory you downloaded the model
python pretrain.py
cd ./VSCyto2D #TODO: Navigate to the directory you downloaded the model
python finetune.py
To run inference with the VSCyto3d model, use the following command:
viscy predict -c config.yml
Checkout the example demo_vscyto2d.py