@@ -232,145 +228,17 @@ By default, the model is trained for 100 epochs (see ```hyperparameters.json```)
...
@@ -232,145 +228,17 @@ By default, the model is trained for 100 epochs (see ```hyperparameters.json```)
You can stop the training anytime. The best checkpoints of your model is available inside ```experiments/metrology_experiment/results/networks/```
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:
For our example, here is the command you need to type to start the inference using the newly trained µPIX model best (checkpoint) for the ```metrology``` test dataset:
Feel free to adapt to your own dataset keeping in minds that, as µPIX use a supervised learnign apporach, for one images inside the clean_data_path and the noisy_data_path must have the same name: example `image0.tif` inside the `clean_data_path` must corresponds to the `image0.tif` image inside the `noisy_data_path`.
This command will create a new `metrology_exp` experiment directory containing:
-`hyperparameters.json`: default parameters used by µPIX
-`results` directory: will contains training logs (```logs.txt```), model checkpoints (```networks```), image generated during the training (```images```) using ```mupixtraining.py```.
-`predictions` directory: will contains the generated image on the test dataset using the script ```mupixinfer.py```
For information, here is the ```hyperparameters.json``` file created by default by µPIX for our example experiment that could be freely modifiable
For our example, here is the command you need to type to start the inference using the newly trained µPIX model best (checkpoint) for the ```metrology``` test dataset:
docker run -it--entrypoint bin/bash -v /path/to/your/file/mupix:/workspace gabrielbon/mupix:latest
unzip -qq metrology_model.zip -d metrology_model
```
```
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)
In case your data are located outside of the mupix folder, docker will need their location:
```bash
```bash
docker run -it--entrypoint bin/bash -v /path/to/your/file/mupix:/workspace -v /path/to/your/data:/workspace/data gabrielbon/mupix:latest
Given you are working in the container, you will have to specify the path do data differently
## 3 - License
This code repository is release under the [CC BY-NS-SA 4.0](https://gitlab.lis-lab.fr/sicomp/mupix/-/blob/main/LICENSE?ref_type=heads)
### b) Using the µPIX Docker container
If you don't have Docker already installed on your computer, please use our help to guide through the [installation of Docker on your machine](./docker_install.md).
We have developped a "ready-to-use" Docker image ([repo on dockerhub](https://hub.docker.com/r/gabrielbon/mupix)) containing a ready-to-use µPIX environment.
To get the image, open a Terminal and type:
## License
This code repository is release under the [CC BY-NS-SA 4.0](https://gitlab.lis-lab.fr/sicomp/mupix/-/blob/main/LICENSE?ref_type=heads)
```bash
docker pull gabrielbon/mupix:latest
```
Finally, you can clone this repository to install µPIX scripts and datasets: