ce64450101 Load lazily images (#62)
10f8766793 First try lazy load
Compare 2 commits »
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 18:55:53 +02:00
Optimize execution speed

My tests seem biased due to a cache.

Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 18:43:11 +02:00
Optimize execution speed

Saving each color channel in a different file:

OPERATION = <Operation.SAVE: 2>
Image: 100%
f85e63b6e0 #62: First lazy load try
ac32abede1 Save all colors
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 18:21:55 +02:00
Optimize execution speed

Well I was only saving the last color.

Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 18:08:23 +02:00
Optimize execution speed

Serializing for all colors on both cameras:

time ./benchmark_load_part_of_images.py
Image: 100%
36b17eb3cc #62: Add benchmark_load_part_of_images.py
fb0f78e069 Add the ability to hardcode resolution
86093a40c0 Load training images to memory to ease implementation and make execution
54178c1101 #72: Verify actual data type pointer
50058d5d2e #72: Verify pointer before actually implementing the correct second choice
Compare 7 commits »
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 17:19:44 +02:00
Optimize execution speed
time ./benchmark_load_part_of_images.py
Image: 100%
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 16:42:56 +02:00
Optimize execution speed

Thought about using benchmark_raw_images_loading.py:

#!/usr/bin/env python

from tqdm import tqdm

IMAGES_CAMERAS_FOLDER = {
    'RAISE': 'flat-field/nef',
    'Rafael…
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#72 2024-05-13 16:41:17 +02:00
Correctly implement iterative mean for camera attribution
class iterativeMean:
    mean = None
    numberOfElementsInMean = 0

    def add(self, element):
        if self.mean is None:
            self.mean = element
        else:
    
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#62 2024-05-13 16:37:48 +02:00
Optimize execution speed

It does not seem that can only load part of a raw image with rawpy, if even possible at all.

In getRawColorChannel:

rawImageVisible = raw.raw_image_visible.copy()[:100,
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#72 2024-05-13 16:21:34 +02:00
Correctly implement iterative mean for camera attribution

50 images for both cameras take about 22 GB of memory.

Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#66 2024-05-13 15:58:23 +02:00
Implement correlation

Should implement an enum to choose between RMS and correlation.

Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#72 2024-05-13 14:50:27 +02:00
Correctly implement iterative mean for camera attribution

Implementation

So now let us correct the implementation to implement:

  • $prnu_{camera}^l = \text{mean}(image_{camera}^{training_j} − denoiser(image_{camera}^{training_j}, l, camera) \text{…
Correctly implement iterative mean for camera attribution
5e6702e007 #63: use scipy.stats.pearsonr
1a910d2e2c Add a try with numpy.corrcoef
6ed57bc477 Precise purpose of a part of code
Compare 2 commits »
Benjamin_Loison commented on issue Benjamin_Loison/Robust_image_source_identifica…#63 2024-05-13 12:05:49 +02:00
Attribute source camera

I doubt that current iterative mean leverages the best its current knowledge of the training set.

More precisely we add to the estimated PRNU mean the image substracted the average of already…