Precise purpose of a part of code

This commit is contained in:
Benjamin Loison 2024-05-13 03:13:58 +02:00
parent 3f7b6bf21a
commit 6ed57bc477
No known key found for this signature in database

View File

@ -96,8 +96,7 @@ returnSingleColorChannelImage = lambda singleColorChannelImage, _minColor, _maxC
# - the second one is about estimating better and better the PRNU of each camera, as consider more and more training images and measuring the resulting attribution of cameras
for computeExtremes in tqdm(([True] if minColor is None or maxColor is None else []) + [False], 'Compute extremes'):
rescaleIfNeeded = returnSingleColorChannelImage if computeExtremes else rescaleRawImageForDenoiser
# As the second loop firstly compute noises of testing images.
# What about `MEAN` denoiser condition?
# As the second loop firstly if the denoiser is not `MEAN` or if `MEAN` predicts only on the whole training set, then compute noises of testing images.
if not computeExtremes:
print(f'{minColor=} {maxColor=}')
if DENOISER != Denoiser.MEAN or PREDICT_ONLY_ON_WHOLE_TRAINING_SET: