This python notebook generates embeddings for microscopy images stained using cell painting assays.
This was used in papers:
- Applying Deep Neural Network Analysis to High-Content Image-Based Assays. (in SLAS Discovery)
- It's easy to fool yourself: Case studies on identifying bias and confounding in bio-medical datasets. (in NeurIPS 2019 workshops)
To run the accompanying colab, you need:
- A sample image (5 stains), and
- weights to the random projection matrix.
These files are available for download here. We use sample images from BBBC025 in this notebook.
Other data accompanying the paper are here
-
Run the cells in Install + Imports.
-
Download the weights and sample images here. You should be able to select "Add shortcut to drive" to run this notebook. Note that you can use your own images, but you'll likely need the weights to get an embedding identical to the ones in the paper.
-
Set the
DATA_DIR
variable to the location where the images and weights live, and make sure to run that cell to initialize the paths to the images and the model weights. -
Run the subsequent cells: Helper functions and Load Images (sorted by stain names). You should be able to see the sample images. Also run Build model and initialize weights.
-
Now run the cell under Get Embeddings section. It should give you a 320d vector and will plot it.
- Applying Deep Neural Network Analysis to High-Content Image-Based Assays. (in SLAS Discovery)
- It's easy to fool yourself: Case studies on identifying bias and confounding in bio-medical datasets. (in NeurIPS 2019 workshops)
- Link to download weights and sample image to run the notebook
- (TO COME SOON) Link to download full data accompanying the paper
This project is not an official Google product.