From 81b305bfc7e751b98a0aa519e16b80320564e14a Mon Sep 17 00:00:00 2001 From: Santiago Benoit Date: Fri, 10 Aug 2018 12:13:12 -0400 Subject: [PATCH] Update README.md --- README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a171359..b202ff5 100644 --- a/README.md +++ b/README.md @@ -13,27 +13,62 @@ Morphological profiling using deep learning ## Contents -This projects provide tools and APIs to manipulate high-throughput images for deep learning. The dataset tools are the only ones currently implemented. +This project provides tools and APIs to manipulate high-throughput images for deep learning. The dataset tools are the only ones currently implemented. This project only supports Python 3. -## Dataset Tools +## Tools -To prepare microscopy datasets for deep learning we have implemented the following steps that should be run sequentially: 1) Collect illumination statistics, 2) Compress images, and 3) Create cell location indices. Prior to these three steps, we need to create a metadata file with image locations and labels. +All of the following commands require the --root flag to be set to the root project directory. They also require a configuration file to be present (excluding the setup command). The commands use the following syntax: -Any of these three steps requires a configuration file written in JSON format. With this file available for a particular dataset, you can run the dataset tools as follows: +
+    python deepprofiler --root=[project root] [command] [command flags]
+
+ +Additionally, the --config flag can be used to manually specify a configuration file not in the config directory. See the project Wiki for documentation on configuration files. + +### Setting up the project directory + +The project directory can be set up automatically from a specified root directory:
-    python dataset --config=data.json metadata
-    python dataset --config=data.json illumination
-    python dataset --config=data.json compression
-    python dataset --config=data.json locations
+    python deepprofiler --root=[project root] setup
 
-These commands take some time to get your dataset ready. After that, you can launch the learning commands [under construction]. +A configuration file is not necessary for this step, but you can specify one with the --config flag after deepprofiler if you want to use existing directories. + +### Preparing the dataset -## Learning Tools +The dataset can be optionally preprocessed with illumination correction and compression, as specified in the configuration file, with one command: -Learn a convolutional network from single cell data using the following convention: +
+    python deepprofiler --root=[project root] prepare
+
+ +### Training the model + +To train your model on the dataset:
-    python learning --config=learn.json training
+    python deepprofiler --root=[project root] train
 
+ +You may optionally specify the --epoch and --seed flags after train, to set the current epoch or the random seed. + +### Extracting features + +To extract single-cell features for profiling: + +
+    python deepprofiler --root=[project root] profile
+
+ +You will need to specify the name of the model checkpoint to use in the configuration file. + +### Hyperparameter optimization + +Optionally, you may run DeepProfiler's hyperparameter optimization feature (which uses GPyOpt) to find optimal values for your model's hyperparameters: + +
+    python deepprofiler --root=[project root] optimize
+
+ +This may take a while as it will train a model for the number of epochs specified for each step in the process. It is recommended to decrease the epochs and steps to manageable values when running this command.