| `--experiment_name` | Name of the µPIX experiment. |
| `--experiment_path` | Path where the µPIX experiment will be saved. |
| `--clean_data_path` | Path to the clean dataset (Train). |
| `--noisy_data_path` | Path to the noisy dataset (Train). |
| `--test_data_path`*(optional)* | Path to the test dataset (if available). |
In our case, as we want just to use the pre-trained µPIX ```metrology``` model in inference (no training), we don't need to provide the ```clean_data_path``` and ```noisy_data_path``` parameters so we left it empty.
Nevertheless, we have to indicate the path that contains the test data image we want to denoise using µPIX using the ```test_data_path``` parameter, and the ```experiment_name``` we want to create as well as the location where the experiment will be stored using the ```experiment_path``` parameter.
Once finished, the denoised images are stored inside ```./experiments/metrology_experiment/predictions/``` directory.
## Use case n°2 - Train a µPIX model from scratch using a custom dataset
Move to the `mupix` directory:
```bash
cd mupix
```
As an example, we will train a µPIX model from scratch using the Metrology dataset.
As an example, we will train a µPIX model from scratch using the ```metrology``` dataset.
### 2.1 - Download/Prepare the dataset
### 2.1 - Download the dataset
First download the dataset manually ([here](https://sync.lis-lab.fr/index.php/s/mYDRTeAQxMxNPPJ/download)), and unzip it.
Alternatively, if you have ```curl``` installed on your system, you can download and extract the dataset using:
...
...
@@ -224,11 +325,11 @@ Step>3, Generator loss : 1.941e+05
...
...
```
By default, the model is trained for 100 epochs (see ```hyperparameters.json```) but contains an ```EarlyStopping``` mechanisms (See the paper methods section pour details) governed by the ```patience``` parameters (see ```hyperparameters.json```). The number of steps per epochs is calculated by dividing the number of training tiles divided by the ```batch_size```.
By default, the model is trained for 100 epochs (see ```hyperparameters.json```) but contains an ```EarlyStopping``` mechanisms (See the paper methods section pour details) governed by the ```patience``` parameters (see ```hyperparameters.json```).
You can stop the training anytime. The best checkpoints of your model is available inside ```experiments/metrology_experiment/results/networks/```
If the training stops because it reached the maximum number of epochs defined inside the ```hyperparameters.json``` configuration file, nd you want to continue to train your model for more epochs, you can use the ```--retrain``` parameters to resume the training:
If the training stops because it reached the maximum number of epochs defined inside the ```hyperparameters.json``` configuration file, and you want to continue to train your model for more epochs, you can use the ```--retrain``` parameters to resume the training where it stops:
Once done you can see that the predictions has been stored inside ```./experiments/metrology_experiment/predictions/``` directory:
```
The model is now stored inside ```./metrology_model```
### 3.2 - Create a new experiment containing the image dataset
As we are using the model in inference only (no training), we can skip the ```---clean_data_path``` and ```--noisy_data_path``` parameters of the ```new_experiment.py``` script.
If you don't already have donwload the ```metrology``` dataset, please download it (section 2.1: Create a µPIX experiments)