Skip to main content

computer vision for image-based phenotyping of single cells

Project description

VisCy

VisCy is a deep learning pipeline for training and deploying computer vision models for image-based phenotyping at single-cell resolution.

The following methods are being developed:

  • Image translation
    • Robust virtual staining of landmark organelles
  • Image classification
    • Supervised learning of of cell state (e.g. state of infection)
  • Image representation learning
    • Self-supervised learning of the cell state and organelle phenotypes

VisCy is currently considered alpha software and is under active development. Frequent breaking changes are expected.

Virtual staining

A full illustration of the virtual staining pipeline can be found here. Below are some examples of virtually stained images (click to play videos). See the full gallery here.

VSCyto3D VSNeuromast VSCyto2D
HEK293T Neuromast A549

Reference

The virtual staining models and training protocols are reported in our recent preprint on robust virtual staining:

@article {Liu2024.05.31.596901,
    author = {Liu, Ziwen and Hirata-Miyasaki, Eduardo and Pradeep, Soorya and Rahm, Johanna and Foley, Christian and Chandler, Talon and Ivanov, Ivan and Woosley, Hunter and Lao, Tiger and Balasubramanian, Akilandeswari and Liu, Chad and Leonetti, Manu and Arias, Carolina and Jacobo, Adrian and Mehta, Shalin B.},
    title = {Robust virtual staining of landmark organelles},
    elocation-id = {2024.05.31.596901},
    year = {2024},
    doi = {10.1101/2024.05.31.596901},
    publisher = {Cold Spring Harbor Laboratory},
    URL = {https://www.biorxiv.org/content/early/2024/06/03/2024.05.31.596901},
    eprint = {https://www.biorxiv.org/content/early/2024/06/03/2024.05.31.596901.full.pdf},
    journal = {bioRxiv}
}

This package evolved from the TensorFlow version of virtual staining pipeline, which we reported in this paper in 2020:

@article {10.7554/eLife.55502,
article_type = {journal},
title = {Revealing architectural order with quantitative label-free imaging and deep learning},
author = {Guo, Syuan-Ming and Yeh, Li-Hao and Folkesson, Jenny and Ivanov, Ivan E and Krishnan, Anitha P and Keefe, Matthew G and Hashemi, Ezzat and Shin, David and Chhun, Bryant B and Cho, Nathan H and Leonetti, Manuel D and Han, May H and Nowakowski, Tomasz J and Mehta, Shalin B},
editor = {Forstmann, Birte and Malhotra, Vivek and Van Valen, David},
volume = 9,
year = 2020,
month = {jul},
pub_date = {2020-07-27},
pages = {e55502},
citation = {eLife 2020;9:e55502},
doi = {10.7554/eLife.55502},
url = {https://doi.org/10.7554/eLife.55502},
keywords = {label-free imaging, inverse algorithms, deep learning, human tissue, polarization, phase},
journal = {eLife},
issn = {2050-084X},
publisher = {eLife Sciences Publications, Ltd},
}

Installation

  1. We recommend using a new Conda/virtual environment.

    conda create --name viscy python=3.10
    # OR specify a custom path since the dependencies are large:
    # conda create --prefix /path/to/conda/envs/viscy python=3.10
    
  2. Clone this repository and install with pip:

    git clone https://github.com/mehta-lab/VisCy.git
    # change to project root directory (parent folder of pyproject.toml)
    cd VisCy
    pip install .
    

    If evaluating virtually stained images for segmentation tasks, install additional dependencies:

    pip install ".[metrics]"
    

    Visualizing the model architecture requires visual dependencies:

    pip install ".[visual]"
    
  3. Verify installation by accessing the CLI help message:

    viscy --help
    

For development installation, see the contributing guide.

The pipeline is built using the PyTorch Lightning framework. The iohub library is used for reading and writing data in OME-Zarr format.

The full functionality is tested on Linux x86_64 with NVIDIA Ampere GPUs (CUDA 12.4). Some features (e.g. mixed precision and distributed training) may not be available with other setups, see PyTorch documentation for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viscy-0.1.1.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

viscy-0.1.1-py3-none-any.whl (91.8 kB view details)

Uploaded Python 3

File details

Details for the file viscy-0.1.1.tar.gz.

File metadata

  • Download URL: viscy-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for viscy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 87865b9a4182c964bc81e6a1ac9148b107b93af6357395934b16411e9de48e25
MD5 f6f801484de03dee8df38b890ffbfe3a
BLAKE2b-256 331c02d9249d931fa5195076daff211e6c3177d4762f28a674eeae69e1da653a

See more details on using hashes here.

File details

Details for the file viscy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: viscy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 91.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for viscy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56b2452971c582c43d010e354f25d117a19e6d50edd51ddca5b201f155947af5
MD5 528464c8f4140a7afcb9cffbae390edb
BLAKE2b-256 cc3598e5cf488226aa762928801bca1889d66226d9416c2071d65537bf3510e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page