This directory includes a miscellaneous collection of useful helper functions.
-
image_pool.py
implements an image buffer that stores previously generated images. This buffer enables us to update discriminators using a history of generated images rather than the ones produced by the latest generators. The original idea was discussed in this paper. The size of the buffer is controlled by thepool_size
option. -
metrics.py
contains a metrics object building, which allows dynamic selection of the metrics to calculate (betweenpsnr
,ssim
andlpips
) and the output of the averaging call integrates with theReduceLROnPlateau
optimizer option. -
util.py
consists of simple helper functions that are repeatelly used in the code such as mkdirs (create multiple directories), scandir (scan a directory to find defined files), get_root_logger (create or fetch a root logger) and others. -
progress_bar.py
a convenient progress bar. Currently only used by thelmdb
dataset creation script.