Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 2.08 KB

howtotest.md

File metadata and controls

31 lines (18 loc) · 2.08 KB

Testing

Important: if you're interested in producing results based on a model, you will probably want to use the companion repository iNNfer, a GUI (for ESRGAN models, for video) or a smaller repo for inference (for ESRGAN, for video).

Otherwise, if you are interested in obtaining results that can automatically return evaluation metrics (to compare with papers' results), it is also possible to do inference of batches of images and also use some additional options (such as CEM, geometric self-ensemble or automatic cropping of images before upscale for VRAM limited environment) with the code in this repository as follow.

Test Super-Resolution models (ESRGAN, PPON, PAN, others)

  1. Modify the configuration file options/sr/test_sr.yml (or options/sr/test_sr.json)
  2. Run command: python test.py -opt options/sr/test_sr.yml (or python test.py -opt options/sr/test_sr.json)

Test SRFlow models

  1. Modify the configuration file options/srflow/test_srflow.yml
  2. Run command: python test_srflow.py -opt options/srflow/test_srflow.yml

Test SFTGAN models

  1. Obtain the segmentation probability maps: python test_seg.py
  2. Run command: python test_sftgan.py

Test VSR models

  1. Modify the configuration file options/video/test_video.yml
  2. Run command: python test_vsr.py -opt options/video/test_video.yml

Image to image translation

While it is possible to use the same steps as with the Super-Resolution models, it is recommended to use iNNfer for these cases.

In the case of pix2pix with the original configuration, since batch normalization using the statistics of the test batch is used (rather than aggregated statistics of the training batch, i.e., use model.train() mode), it will produce slightly different inference results every time. Try both with model.train() on and off to compare results.