Skip to content

Commit 81b305b

Browse files
authored
Update README.md
1 parent 8557b40 commit 81b305b

File tree

1 file changed

+47
-12
lines changed

1 file changed

+47
-12
lines changed

README.md

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,62 @@ Morphological profiling using deep learning
1313

1414
## Contents
1515

16-
This projects provide tools and APIs to manipulate high-throughput images for deep learning. The dataset tools are the only ones currently implemented.
16+
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.
1717

18-
## Dataset Tools
18+
## Tools
1919

20-
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.
20+
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:
2121

22-
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:
22+
<pre>
23+
python deepprofiler --root=[project root] [command] [command flags]
24+
</pre>
25+
26+
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.
27+
28+
### Setting up the project directory
29+
30+
The project directory can be set up automatically from a specified root directory:
2331

2432
<pre>
25-
python dataset --config=data.json metadata
26-
python dataset --config=data.json illumination
27-
python dataset --config=data.json compression
28-
python dataset --config=data.json locations
33+
python deepprofiler --root=[project root] setup
2934
</pre>
3035

31-
These commands take some time to get your dataset ready. After that, you can launch the learning commands [under construction].
36+
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.
37+
38+
### Preparing the dataset
3239

33-
## Learning Tools
40+
The dataset can be optionally preprocessed with illumination correction and compression, as specified in the configuration file, with one command:
3441

35-
Learn a convolutional network from single cell data using the following convention:
42+
<pre>
43+
python deepprofiler --root=[project root] prepare
44+
</pre>
45+
46+
### Training the model
47+
48+
To train your model on the dataset:
3649

3750
<pre>
38-
python learning --config=learn.json training
51+
python deepprofiler --root=[project root] train
3952
</pre>
53+
54+
You may optionally specify the --epoch and --seed flags after train, to set the current epoch or the random seed.
55+
56+
### Extracting features
57+
58+
To extract single-cell features for profiling:
59+
60+
<pre>
61+
python deepprofiler --root=[project root] profile
62+
</pre>
63+
64+
You will need to specify the name of the model checkpoint to use in the configuration file.
65+
66+
### Hyperparameter optimization
67+
68+
Optionally, you may run DeepProfiler's hyperparameter optimization feature (which uses GPyOpt) to find optimal values for your model's hyperparameters:
69+
70+
<pre>
71+
python deepprofiler --root=[project root] optimize
72+
</pre>
73+
74+
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.

0 commit comments

Comments
 (0)