Using SIFT for deep fake image detetction
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using SIFT algorithm todetect the deep fake iamges, by comparing them to original images. First where can i find the easiest code for it, and the second thing is that i have to then do the pre processing of SIFT for image detetion, for that any kind of matrices i am looking for to check the accuracy of the algorithm. code will be helpful in the answer.
0 comentarios
Respuestas (1)
Piyush Dubey
el 6 de Abr. de 2023
Hi,
Below is a basic flow on implementation of the SIFT algorithm to figure out similarity between two images. Load the input and reference image with appropriate scaling in “grayscale” only by using “im2gray()” function.
The below snippet can be used to extract the common features in the input image and reference image.
%SIFT feature extraction
input_sift = detectSIFTFeatures(input_image);
reference_sift = detectSIFTFeatures(reference_image);
[features1,valid_points1] = extractFeatures(input_image,input_sift);
[features2,valid_points2] = extractFeatures(reference_image,reference_sift);
In order to evaluate the matching features you can follow this documentation that consists of various methods to draw comparisons between various images: matchFeatures()
The matched points can be compared with the reference image to generate a similarity score.
Similarity score can be evaluated using the following syntax:
similarity_score = size(matchedPoints_refimg, 1)
After obtaining the matching feature and similarity score, a threshold can be applied to consider if an image is genuine or fake with respect to the reference image.
threshold = 50;
if similarity_score >= threshold
disp('The input image is genuine');
else
disp('The input image is fake');
end
Refer to the attached documentation for a better understanding over other functions that have a similar use case: https://www.mathworks.com/help/vision/ref/detectsiftfeatures.html
A much detailed implementation of the SIFT algorithm can be found in the following link: https://www.mathworks.com/matlabcentral/fileexchange/43723-sift-scale-invariant-feature-transform-algorithm
There are various metrices that might help you measure the accuracy for SIFT algorithm such as: Number of correct correspondences, Precision, Recall, F1 score, etc
I hope this might be helpful.
0 comentarios
Ver también
Categorías
Más información sobre Feature Detection and Extraction en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!