[SCRIPT] Changing md5 is not enough, do this instead

BetterKnow

Senior Member
Jr. VIP
Joined
Mar 17, 2018
Messages
1,117
Reaction score
1,291
With modern day algorithms' ability to detect duplicate images with machine vision without the need to use any hashing it became easy to detect reposting.

The script below will change the image by adding a few effects that'll make it almost unrecognizable to machines but not change it much for the human eye, simply follow the instructions:

1) Download ffmpeg from here: https://ffmpeg.zeranoe.com/builds/

2) Extract the file ffmpeg.exe to "C:\Program Files\ffmpeg\ffmpeg.exe"

3) In the same folder create a new .txt file and rename it to "edit.bat" (remove the .txt)

4) Open the new edit.bat file and copy the script below to it:

Code:
::Replace png with whatever file format you have. (mp4, ts, jpg, etc.)
set FileFormat=png

::Directory where you have your unedited files. (Make sure you end it with a "\")
set UneditFilesDirectory=C:\Program Files\ffmpeg\png\

::Directory where you want your edited files to be saved (Make sure you end it with a "\")
set EditedFilesDirectory=C:\Program Files\ffmpeg\png2\

for %%d in ("%UneditFilesDirectory%*.%FileFormat%") do "C:\Program Files\ffmpeg\ffmpeg.exe" -i "%%d"  -map_metadata -1 -vf "eq=brightness=0.06:saturation=1.1:contrast=1.4,lenscorrection=k1=-0.02:k2=0.01" "%EditedFilesDirectory%%%~nd.%FileFormat%"

Replace "png", "C:\Program Files\ffmpeg\png\" and "C:\Program Files\ffmpeg\png2\" with your correlating values.

You can use the script for images or videos, each has to be done individually.

This will remove all metadata, change colors a little and distort shapes and objects in a way where it's harder for machine vision to detect.

This might not work properly if your image or video contains any subtitles or similar small text as it will distort the lines and letters.

You can also do something similar to watermark videos, let me know if you're interested in seeing that.
 
Thank you @Better Know, very cool!

This could be the reason why some of my accounts got banned even after changing the hash, gonna try it soon after all my accounts are banned! (weird goal, I know)
 
Thank you @Better Know, very cool!

This could be the reason why some of my accounts got banned even after changing the hash, gonna try it soon after all my accounts are banned! (weird goal, I know)
Yeah, it's possible that was the cause.
 
Bumping this so more members get to see it.
 
Would anyone be interested in a website that does this? I can probably create one where you upload it and it spits out the "new" image.

Sounds interesting to me. Actually have been looking for a service like that a while ago.
 
Great share. I was wondering if IG could still detect duplicate images even after changing the hash
 
ffmpeg is a livesaver and an amazing tool. Great share, thanks.
 
Would anyone be interested in a website that does this? I can probably create one where you upload it and it spits out the "new" image.
I can imagine something like this being useful to members here
 
Can i use this to make youtube video unique ?
 
Can i use this to make youtube video unique ?
I haven't tested it myself, but I think the YT algorithm is much more advanced than that of IG. Maybe try it and let us know.
 
Thanks for the share. Do you think it good for Pinterest?
I don't see why it wouldn't.

This would depend on what type MV algorithm they're using. Most simple algorithms won't be able to detect it, however advanced ones might be able to, especially if the image has a lot of shapes or objects where the filters could be detected.
 
I think no one uses cryptographic hash like md5 to check if media is similar anymore. Maybe they do, but it's not the only thing they use. Even without machine learning, you can use algorithms like perceptual hash which is easy to implement to check if two images are the same or not. In this, cases adding some random pixels to change md5 wouldn't even matter.

Haven't tested how good your method @Better Know works, but thanks for sharing.
 
I think no one uses cryptographic hash like md5 to check if media is similar anymore. Maybe they do, but it's not the only thing they use. Even without machine learning, you can use algorithms like perceptual hash which is easy to implement to check if two images are the same or not. In this, cases adding some random pixels to change md5 wouldn't even matter.

Haven't tested how good your method @Better Know works, but thanks for sharing.

I think each social network uses it's own combination of algorithms. This script should work on most even those using simple machine vision.
 
What is "set FileFormat"? I have folder with 90 jpg images, so set it at jpg, but didint work, then I set it at png and edited the same folder with 90 jpg images. It edited but only 15 ( from 90 ) and saved photos as jpg. I think something is broken.
 
Back
Top