#62: Comment loading images to memory in favor of cropping

This commit is contained in:
Benjamin Loison
2024-05-15 19:57:04 +02:00
parent 6a9900df91
commit e3e3d44ca9

View File

@@ -111,6 +111,7 @@ returnSingleColorChannelImage = lambda singleColorChannelImage, _minColor, _maxC
# Assume to have `{min,max}Color` hardcoded.
# Can just load to memory `getSingleColorChannelImages`, see [Robust_image_source_identification_on_modern_smartphones/issues/62#issuecomment-1861](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/62#issuecomment-1861).
'''
rescaleIfNeeded = rescaleRawImageForDenoiser
cameraTrainingImages = {}
for cameraTrainingImageIndex in tqdm(range(numberOfTrainingImages), 'Load to memory camera training image'):
@@ -124,6 +125,7 @@ for camera in IMAGES_CAMERAS_FOLDER:
for cameraTestingImageIndex in tqdm(range(numberOfTestingImages), 'Load to memory camera testing image'):
singleColorChannelImages = getSingleColorChannelImages(camera, numberOfTrainingImages + cameraTestingImageIndex)
singleColorChannelTestingImages[camera] += [singleColorChannelImages]
'''
# 2 loops:
# - the first one is about computing `{min,max}Color`