#24: Make executions reproducible

This commit is contained in:
Benjamin Loison 2024-03-28 22:20:40 +01:00
parent a99e942d3a
commit ba5a1b742b
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8
2 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,8 @@ PRNU_FACTOR = 0.1
IMAGE_SIZE_SHAPE = (IMAGE_SIZE, IMAGE_SIZE)
np.random.seed(0)
# Generate PRNUs and images of phones.
imagesWithoutPrnu = [[randomGaussianImage(scale = 1, size = IMAGE_SIZE_SHAPE) for _ in range(NUMBER_OF_IMAGES_PER_PHONE)] for phoneIndex in range(NUMBER_OF_PHONES)]

View File

@ -15,6 +15,8 @@ datasetPath = 'no_noise_images'
PRNU_FACTOR = 255 * 0.1
IMAGE_SIZE_SHAPE = (469, 704)
np.random.seed(0)
# Should first try with an image showing `PRNU`.
prnu = randomGaussianImage(scale = PRNU_FACTOR, size = IMAGE_SIZE_SHAPE)