Skip to content

Commit fe80a06

Browse files
committed
Updated README.md
1 parent a9661df commit fe80a06

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

README.md

+17-27
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The network can train on both synthetic and real-life data.<br>
77
### Requirements
88
- A Linux machine with a GPU and CUDA
99
- Conda
10-
- Python 3.9
10+
- Python 3.9+
1111
- PyTorch
1212
- TomoPy
1313

@@ -20,31 +20,21 @@ First, set up the project environment:
2020
- Create the conda environment: `conda env create -f environment.yml`
2121
- Activate the conda environment: `conda activate nostripesnet`
2222

23-
#### Generate Data
24-
Next, generate some data to train/test on.<br>
25-
If you have access to an HDF5 or Nexus file, you can generate a dataset from real-life data.<br>
26-
Otherwise, you are limited to just synthetic data.<br>
27-
- Open the data generation script in a text editor: [run_scripts/data_generator.sh](run_scripts/data_generator.sh)
28-
- Change the parameters to suit your use case
29-
- Run the script: `./run_scripts/data_generator.sh`
3023

31-
For more information about the data created & the parameters, see [this description](simulator/README.md).
32-
33-
#### Train a Model
34-
Finally, train a model on the generated data.<br>
35-
Run the following to see information about the options you can specify:<br>
36-
`python -m network.training -h`<br>
37-
Then choose the values of the options you want to specify, and run the same command again (without `-h`).<br>
38-
For example, if training a masked model, you might run something like this:<br>
39-
`python -m network.training --model mask --epochs 10 --save-dir ./data --verbose`<br>
40-
41-
Follow the same procedure for testing:<br>
42-
`python -m network.testing -h`<br>
43-
Choose your parameters, then run again with those options.<br>
44-
45-
If you want to both train and test a model all at once, follow these steps:<br>
46-
- Open the [train/test script](run_scripts/train_test.sh) in a text editor
47-
- Specify the values of the parameters you want to train & test with
48-
- Run the script: `./run_scripts/train_test.sh`
24+
### The Repository
25+
- `network/` contains Python code to train and test a model, as well as the dataset and visualiser classes.
26+
- `run_scripts/` contains bash scripts to generate masks & datasets and train/test models.
27+
- `simulator` contains Python code to generate masks & datasets.
28+
- `utils/` - contains utility functions used throughout the codebase.
29+
- `TUTORIAL.md` is a walkthrough of how to generate a dataset, and train & apply a model.
30+
- `apply_model.py` is a program that applies a model to a given tomographic scan.
31+
- `graphs.ipynb` is a Jupyter Notebook used to create the graphs in the paper.
32+
- `residuals.ipynb` is a Jupyter Notebook used to create the residual images in the paper.
33+
- `rmse.ipynb` is a Jupyter Notebook used to calculate the RMSEs in the paper.
34+
- `submit.sh` is a bash script to train a model on multiple nodes, using multiple GPUs on each.
35+
- `visualize_results.ipynb` is a Jupyter Notebook used to visualize the results of a model.
36+
4937

50-
A graph of the training losses will be saved to `NoStripesNet/images`.<br>
38+
### Running the Code
39+
A full walkthrough of how to generate a dataset and train a model can be found [here](./TUTORIAL.md).<br>
40+
To apply a trained model to a tomographic scan, see [run_scripts/apply_model.sh](./run_scripts/apply_model.sh).

0 commit comments

Comments
 (0)