Remove potential chronological bias
This commit is contained in:
parent
e9dc28dc2a
commit
b0fa01c6c4
@ -6,6 +6,7 @@ from utils import denoise
|
||||
from skimage import img_as_float
|
||||
import sys
|
||||
import os
|
||||
from random import shuffle
|
||||
|
||||
sys.path.insert(0, '../../algorithms/distance/')
|
||||
|
||||
@ -16,10 +17,11 @@ DENOISER = 'wavelet'
|
||||
IMAGES_FOLDER = 'flat-field/TIF'
|
||||
|
||||
imagesFileNames = os.listdir(IMAGES_FOLDER)
|
||||
# To not have a bias (chronological for instance) when split to make subgroups.
|
||||
shuffle(imagesFileNames)
|
||||
numberOfImagesPerSubgroup = len(imagesFileNames) // NUMBER_OF_SUBGROUPS
|
||||
numberOfImagesThresholds = range(numberOfImagesPerSubgroup, numberOfImagesPerSubgroup + 1)
|
||||
|
||||
# Assume random image order to not introduce a bias.
|
||||
subgroupsPrnuEstimatesNpArray = []
|
||||
for subgroupIndex in tqdm(range(NUMBER_OF_SUBGROUPS), 'Subgroup'):
|
||||
imagesPrnuEstimateNpArray = []
|
||||
|
Loading…
Reference in New Issue
Block a user