Add and use PREDICT_ONLY_ON_WHOLE_TRAINING_SET

This commit is contained in:
Benjamin Loison 2024-05-03 13:55:32 +02:00
parent 612f4119fd
commit f1495f2ba0
No known key found for this signature in database

View File

@ -18,6 +18,7 @@ IMAGES_CAMERAS_FOLDER = {
'Rafael 23/04/24': 'rafael/230424',
}
TRAINING_PORTION = 0.5
PREDICT_ONLY_ON_WHOLE_TRAINING_SET = False
setting = ','.join([escapeFilePath(imageCameraFolder) for imageCameraFolder in IMAGES_CAMERAS_FOLDER]) + f'_{DENOISER}'
@ -109,7 +110,7 @@ for computeExtremes in tqdm(([True] if minColor is None or maxColor is None else
cameraIterativeMean = camerasIterativeMean[camera]
cameraIterativeMean.add(imagePrnuEstimateNpArray)
if cameraIndex == numberOfCameras - 1:
if cameraIndex == numberOfCameras - 1 and (not PREDICT_ONLY_ON_WHOLE_TRAINING_SET or cameraTrainingImageIndex == numberOfTrainingImages - 1):
numberOfTrainingImagesAccuracy = 0
print(f'{numberOfTestingImages=} {numberOfCameras=}')
# Loop over each camera testing image folder.