DeepCycle
This README outlines steps required to reproduce approach from DeepCycle manuscript.
Requirements
keras, UMAP, cv2, albumentations, classification_models
Install customized version of SOMPY
How ro run
-
Download data from EBI BioStudies repository and deep learning models from our EMBL hosting
-
Unzip to
data/Timelapse_2019
folder preserving directory structure. You will have:root| |-data| | |-Timelapse_2019| | |-BF/ | |-Cy3/ | |-DAPI/ | |-GFP/ | |-curated_tracks.csv | |- ... |-src/ |...
-
cd src
-
Prepare the data:
python data_prepare.py
- Cleans and removes unnecessary columns. Stores as
statistics_clean.csv
indata/Timelapse_2019
dir - Aligns ~1000 curated tracks based on division events, calculates mean intensities track/frame wise. Stores as
intensities.csv
- Calculates intensity statistics and adds virtual class
1-4
to each tracked cell. Resulting data to be stored instatistics_mean_std.csv
- Cleans and removes unnecessary columns. Stores as
-
Tran the model:
python model_train.py
Trains the model on curated tracks (less double division tracks) using double division tracks as validation set. Saves best models incheckpoints
dir -
Generate cell descriptors with
checkpoint.r34.sz48.03-0.73.hdf5
as default model:- from validation set (double division tracks) only:
python encode.py --mode encode_val
- from all available tracks:
python encode.py --mode encode_all
Descriptors are saved indescriptors.r34.sz48.pkl
anddescriptors_all.r34.sz48.pkl
indata/Timelapse_2019
dir.
- from validation set (double division tracks) only:
-
Generate embeddings for all dataset. Compute intense, consider using supplied
embeddings_preds_all_batch<i>.npz
instead:
python all_cells_prediction.py
-
cd ..
-
start
jupyter notebook
and opentimelapse_projection2019.ipynb