CELL-Diff is a unified diffusion model designed to enable bidirectional transformations between protein sequences and microscopy images. By using cell morphology images as conditional inputs, CELL-Diff can generate protein images based on protein sequences. Conversely, it can generate protein sequences from microscopy images.

To set up CELL-Diff, begin by creating a conda environment:
conda create --name cell_diff python=3.10Activate the environment and run the installation script:
conda activate cell_diff
bash install.shDownload pretrained models:
aws s3 sync s3://czi-celldiff-public/v2/checkpoints/ ./pretrained_models --no-sign-requestHuman Protein Atlas Model: Generating Fixed Immunofluorescence Microscopy Protein Images from a Protein Sequence
- Set
vae_loadcheck_pathandloadcheck_pathinrun_hpa_image_generation.sh(paths to the VAE model and CELL-Diff model). - Run:
bash run_hpa_image_generation.sh- Set
vae_loadcheck_pathandloadcheck_pathinrun_opencell_image_generation.sh(paths to the VAE model and CELL-Diff model). - Run:
bash run_opencell_image_generation.shDownload the processed dataset:
aws s3 sync s3://czi-celldiff-public/v2/training-data/ ./processed_datasets --no-sign-requestRun evaluation:
- Set
vae_loadcheck_path,loadcheck_path, anddata_pathinrun_hpa_evaluation.shorrun_opencell_evaluation.sh(paths to the VAE model, CELL-Diff model, and dataset). - Run:
bash run_hpa_evaluation.sh
bash run_opencell_evaluation.shTo generate a protein sequence:
- Set
vae_loadcheck_pathandloadcheck_pathinrun_sequence_generation.sh(paths to the VAE model and CELL-Diff model). - Run:
bash run_sequence_generation.shHPA pretraining:
- Set
vae_loadcheck_pathanddata_pathinrun_hpa_pretrain.sh(paths to the VAE model and dataset). - Run:
bash run_hpa_pretrain.shOpenCell finetuning:
- Set
vae_loadcheck_path,loadcheck_path, anddata_pathinrun_opencell_finetune.sh(paths to the VAE model, pretrained CELL-Diff model, and dataset). - Run:
bash run_opencell_finetune.shaws s3 sync s3://czi-celldiff-public/v2/ ./checkpoints_datasets --no-sign-request