Fix random seed to improve reproducibility
This commit is contained in:
parent
22fc4ce46b
commit
aa9f73e8a0
@ -6,7 +6,7 @@ from tqdm import tqdm
|
||||
from utils import denoise, iterativeMean, getColorChannel, escapeFilePath, Color, mergeSingleColorChannelImagesAccordingToBayerFilter, rescaleRawImageForDenoiser, updateExtremes, saveNpArray
|
||||
import sys
|
||||
import os
|
||||
from random import shuffle
|
||||
import random
|
||||
|
||||
sys.path.insert(0, '../../algorithms/distance/')
|
||||
|
||||
@ -19,8 +19,9 @@ IMAGES_FOLDER = 'flat-field/NEF'
|
||||
setting = escapeFilePath(IMAGES_FOLDER) + f'_{DENOISER}'
|
||||
|
||||
imagesFileNames = os.listdir(IMAGES_FOLDER)
|
||||
random.seed(0)
|
||||
# To not have a bias (chronological for instance) when split to make subgroups.
|
||||
shuffle(imagesFileNames)
|
||||
random.shuffle(imagesFileNames)
|
||||
|
||||
numberOfImagesPerSubgroup = len(imagesFileNames) // NUMBER_OF_SUBGROUPS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user