Skip to content

TrynkaLab/tglow-dino4cells

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TGLOW - DINO4Cells

This repo is an adaptation of the DINO4Cells method (https://github.com/broadinstitute/DINO4Cells_code) and allows to apply DINO4Cells to the TGLOW data. All the paths for train and inference of the models have to be specified in the config.yaml file. In particular, these data is required:

  • Folder containing cell images
  • Dataframe (csv format) - one row for each cell - reporting the information to load its image

Install requirements

pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116 pip install -r requirements.py

Training

python run_dino.py --config config.yaml The training script takes as input the cells dataframe and images and it stores model weights and training logs in a user-provided folder.

Inference

python run_get_features.py --config config.yaml The run_get_features script takes as input the cells dataframe and the model weights from the training and stores the cell features in a 3D matrix (N_cells x N_stains x N_features) ordered in the same way as the input dataframe.

About

Adaptation of DINO4Cells to produce embeddings per channel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages