Skip to content

Commit

Permalink
Merge pull request #28 from EuanPyle/fix_sample_json
Browse files Browse the repository at this point in the history
Update sample jsons and README
  • Loading branch information
tibuch authored Oct 6, 2022
2 parents 30a0b4b + 25cb247 commit 20cd040
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand All @@ -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:
Expand All @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions predict_config.json
Original file line number Diff line number Diff line change
@@ -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
}
5 changes: 3 additions & 2 deletions train_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"unet_n_first": 16,
"learning_rate": 0.0004,
"model_name": "model_name",
"path": "./"
}
"path": "./",
"gpu_id": 0
}

0 comments on commit 20cd040

Please sign in to comment.