Skip to content

Reassembled and tested code for feature extraction with SubCell model. Contains parts of the code from the original authors of SubCell.

Notifications You must be signed in to change notification settings

CaicedoLab/SubCell_CellPainting

Repository files navigation

SubCell_CellPainting

Reassembled and tested code for feature extraction with SubCell model. Contains parts of the code from the original authors of SubCell.

Model files were fixed and now the pipelines runs for CPJUMP1 and LINCS datasets. Most of the code in this repository is from original Gupta et al. SubCell paper.

Model files to be used and put into weights folder:

  • ER-DNA-Protein_MAE_MLP_classifier_seed_0.pth
  • ER-DNA-Protein_MAE-CellS-ProtS-Pool.pth

Models can be downloaded from S3:

  • s3://czi-subcell-public/models/ER-DNA-Protein_MAE_MLP_classifier/ER-DNA-Protein_MAE_MLP_classifier_seed_0.pth
  • s3://czi-subcell-public/models/ER-DNA-Protein_MAE-CellS-ProtS-Pool.pth

Given that not all details were provided in the manuscript (i.e. original crop size), further cropping if any and specific normalization (was it per channel or per image), the pipeline in general was the following:

  1. center crop 128x128
  2. resize (see below)
  3. per channel normaliztion (code from the paper)

Test downstream resuls for CPJUMP1 dataset (7 plates as in the original paper). The evaluation code was from the original paper.

Resize to 512x512, very long runtime (6h per plate per GPU):

fov_agg feature_select normalize step1 normalize step2 Compound mAP MoA mAP Compound NN-acc MoA NN-acc
mean FALSE ZCA-cor mad_robustize 0.380 0.177 0.521 0.172
median FALSE PCA-cor mad_robustize 0.348 0.175 0.463 0.156

Resize to 256x256, acceptable runtime (40min per plate per GPU):

fov_agg feature_select normalize step1 normalize step2 Compound mAP MoA mAP Compound NN-acc MoA NN-acc
mean FALSE ZCA-cor mad_robustize 0.380 0.171 0.520 0.156
median FALSE PCA-cor mad_robustize 0.351 0.174 0.471 0.161

Original paper results:

fov_agg feature_select normalize step1 normalize step2 Compound mAP MoA mAP Compound NN-acc MoA NN-acc
mean FALSE ZCA-cor mad_robustize 0.387 0.167 0.522 0.161
median FALSE PCA-cor mad_robustize 0.351 0.175 0.461 0.167

Keeping crops 128x128, fast runtime (10min per plate per GPU), though results drop quite a lot:

fov_agg feature_select normalize step1 normalize step2 Compound mAP MoA mAP Compound NN-acc MoA NN-acc
mean FALSE ZCA-cor mad_robustize 0.328 0.161 0.450 0.130
median FALSE PCA-cor mad_robustize 0.305 0.164 0.415 0.161

About

Reassembled and tested code for feature extraction with SubCell model. Contains parts of the code from the original authors of SubCell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages