From 25cb2478ba850ac2cfb3b22324eda62dc3149fb9 Mon Sep 17 00:00:00 2001 From: EuanPyle Date: Mon, 5 Sep 2022 16:10:58 +0100 Subject: [PATCH] Update sample jsons and README --- README.md | 23 ++++++++++++++--------- predict_config.json | 7 ++++--- train_config.json | 5 +++-- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0393e70..09fc35d 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,8 @@ Create an empty file called `train_config.json`, copy-paste the following templa "unet_n_first": 16, "learning_rate": 0.0004, "model_name": "model_name", - "path": "./" + "path": "./", + "gpu_id": 0 } ``` @@ -112,6 +113,7 @@ Create an empty file called `train_config.json`, copy-paste the following templa * `"learning_rate"`: Learning rate of the model training. * `"model_name"`: Name of the model. * `"path"`: Output path for the model. +* `"gpu_id"`: This is optional. Provide the GPU ID(s) of the GPUs you wish to use. #### Run Training: To run the training we run the following command: @@ -123,21 +125,24 @@ You will find a `.tar.gz` file in the directory you specified as `path`. This yo Create an empty file called `predict_config.json`, copy-paste the following template and fill it in. ``` { - "path": "path/to/your/model.tar.gz", - "even": "/path/to/even/tomos/", - "odd": "/path/to/odd/tomos/", - "n_tiles": [1, 1, 1], - "output": "/path/to/output/folder/", - "overwrite": false + "path": "path/to/your/model/model_name.tar.gz", + "even": "/path/to/even.rec", + "odd": "/path/to/odd.rec", + "n_tiles": [1,1,1], + "output": "denoised.rec", + "overwrite": False, + "gpu_id": 0 } ``` #### Parameters: * `"path"`: Path to your model file. -* `"even"`: Path to directory with even tomograms or a specific even tomogram. -* `"odd"`: Path to directory with odd tomograms or a specific odd tomogram. +* `"even"`: Path to directory with even tomograms or a specific even tomogram or a list of specific even tomograms. +* `"odd"`: Path to directory with odd tomograms or a specific odd tomogram or a list of specific odd tomograms in the same order as the even tomograms. * `"n_tiles"`: Initial tiles per dimension. Gets increased if the tiles do not fit on the GPU. * `"output"`: Path where the denoised tomograms will be written. +* `"overwrite"`: Allow previous files to be overwritten. +* `"gpu_id"`: This is optional. Provide the GPU ID(s) of the GPUs you wish to use. #### Run Prediction: To run the training we run the following command: diff --git a/predict_config.json b/predict_config.json index 65318fb..4449f73 100644 --- a/predict_config.json +++ b/predict_config.json @@ -1,8 +1,9 @@ { - "model_name": "model_name", - "path": "./", + "path": "path/to/your/model/model_name.tar.gz", "even": "/path/to/even.rec", "odd": "/path/to/odd.rec", "n_tiles": [1,1,1], - "output_name": "denoised.rec" + "output": "denoised.rec", + "overwrite": False, + "gpu_id": 0 } diff --git a/train_config.json b/train_config.json index ffe55c5..cbbfb4e 100644 --- a/train_config.json +++ b/train_config.json @@ -8,5 +8,6 @@ "unet_n_first": 16, "learning_rate": 0.0004, "model_name": "model_name", - "path": "./" -} \ No newline at end of file + "path": "./", + "gpu_id": 0 +}