Attribute source camera #63
Labels
No Label
bug
Context-Adaptive Interpolator
duplicate
enhancement
epic
help wanted
high priority
invalid
left for future work
low priority
medium
medium priority
meta
question
quick
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones#63
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Following #59.
Considering same number of images for both groups and consider half for testing and up to the other half for training. Just a 2D curve seems enough to represent the accuracy, y-axis being accuracy and x-axis being the number of images for training and we expect the curve to increase and preferably reach an accuracy of 100% while starting at 50%.
I initially thought about a 2D heatmap, as shown in the Stack Overflow answer 33282548. Maybe it makes sense to consider multiple images in testing set that we know were taken with a given device but we do not know for sure if it is the one associated to some retrieved images, see #61 and #8. Let us first investigate with one testing image.
What execution time can we expect from such an algorithm? As the longest iteration takes about 4 minutes and 28 second, for 50 executions we can expect about 4 hours of execution.
Will we face normalization issue as do not know what normalization to apply to a testing image as we do not know the associated device in theory?
Well can apply a single normalization for both image types.
319ca8fb60d64793a6e17ce5993d1a6648f2c49b
had a good idea if I remember correctly about PRNU and distance something like convolution as we know what PRNU we expect but I do not remember the point.
Debugging always guessing Rafael by just providing a set of 2 images, one training and one testing being the same one.
In theory Rafael images are more controlled, so less noise and RAISE different noise so not similar.
Normalization across cameras mey be incorrect if do not sample in general in same range.
To test faster directly evaluate the whole dataset instead of an increasing one.
I have the feeling that wavelet estimated PRNU for one camera is not as expected. Note that no matter the random order to compute the estimated PRNU by averaging, it results in the same result, so we should have an identical estimated PRNU.
Well in fact we have to consider 50 random images for the training.
Thanks to determinism (see #24) final
imagesCamerasFileNames
is deterministically determined, I verified this. Hence, can provide these image names toextract_noise.py
to have estimated PRNU to compare with:Using
[:50]
on the following.To be precise here are the given image names:
Note that the training set is currently set to the first half of these 100 image names.
Training is not faster because the training set size is half the dataset one, as also have to estimate PRNU for testing set.
For RAISE:
Modified contrast and brightness:
Rafael 23/04/24:
Modified contrast and brightness:
Well in fact estimated PRNU may be a bit different as the scale is no more single camera images dependent but across cameras.
{min,max}Color
is correctly computed by considering both training and testing sets.As expected have wider scale due to taking into account both testing sets:
So if one of both estimated PRNU generated by
attribute_source_camera.py
have an issue, it should be Rafael one as the intensity range is far narrower than RAISE.to only run prediction once have estimated the PRNUs on the whole training sets.
Also note that one of both camera estimated PRNU may have a different resolution to be comparable with the other camera images.
0.51
accuracy according toRAISE,Rafael 23_04_24_wavelet_accuracy_of_camera_source_attribution.npy
.The estimated PRNUs seem to make sense:
RAISE:
Modified contrast and brightness:
Rafael:
Modified contrast and brightness:
Rafael:
RAISE:
Still accurate as of 13/05/24.
Complexity analysis between tests of all training iterations and only the last one.
Complexity of tests of all training iterations:
TESTS * TRAINING_ITERATIONS
Complexity of the last iteration:
TESTS
The question is do
TESTS
are significant enough such that there is a significant gap withTESTS * TRAINING_ITERATIONS
? It seems to proceed to 4 / 50TESTS
per second, henceTESTS
takes 12.5 seconds andTESTS * TRAINING_ITERATIONS
takes 10.4 minutes.What we expect is either at first iteration already predicting perfectly or progressively predicting better and better but there is no reason to have a linear improvement in relation with the number of iterations.
Have the feeling that when proceed to all iterations the program get killed because of memory. As far as I understand there is no significant (less than one image) memory additional usage at each iteration, so it is unclear why we observe this behavior, otherwise could before each iteration force the garbage collector (if there is any) to work if it does not perfectly already. Related to Benjamin-Loison/cpython/issues/21.
Note that if
Denoiser.MEAN
works fine, later on or even right now we will be interested in not using it as it requires identical scene images.Well as quite expected:
Allowing using correct camera training set mean seems fine as it is quite easy to check what scene, hence dataset it is in the case of flat-field images. In fact for flat-field can attribute camera without extracting noise but just using flat-field images as they are. Should not guess what mean to use as the point is that we do not know later on. Testing them all seems to make sense.
Using iterative mean for denoising seems to make sense.
At least using a different mean per dataset part (i.e. training and testing) does not seem to make much sense finally:
Have to understand why we have suddenly that good results.
Should compute RMS between both training set means and see if it is close to above 672.
For mean and wavelet denoisers should investigate first testing entry and 2 first training estimated PRNUs and first testing entry (only different in the case of mean denoiser) and the whole training set estimated PRNUs. Using box plots seem to make sense.
Example for a given pixel:
RAISE: -1
Rafael: 1
Noise: 0.1
RMS: Rafael
Correlation: -0.1 with RAISE and 0.1 with Rafael according to
signal.correlate2d
(and now what do we do of this result?)To have a single scalar measuring the correlation between 2 images, then apply RMS? Does it make sense on my example?
Can implement a dedicated issue for the mean denoiser support for attributing source camera.
Attribute camera sourceto Attribute source cameraWith bilateral denoiser:
Is it the most appropriate, while staying in the use-case context, to compute
{min,max}Color
only on training images. Do not forget all denoisers.