6 ms·
Can somebody please explain to me how one can go about finding images that have collision hashes? Or how you can create an image to have a specific hash?
by seanbarry 5y ago
Can somebody please explain to me how one can go about finding images that have collision hashes? Or how you can create an image to have a specific hash?
- nullc 5y agoNeuralhash is a neural network. This means that its locally differentiable. To make an image match a specific hash, you pass the you want to modify image through neuralhash and compute a difference with your target hash, then ask your netural network library to use reverse mode automatic differentiation to give you the gradients for each of the outputs with respect to the input pixels. Update the input pixels. To make the collisions that look good, you need to either augment the objective to include some 'good looking' metric, or condition your gradient descent to prefer good looking results. In my examples ( https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/1#issuecomment-903094036 https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issue... ) I used a gaussian blur to highpass the error between my starting image and the current work in progress, and fed that back in, and adapted the feedback to be as great as possible while still keeping it colliding. The bad looking examples that people initially posted just did nothing to try to make the result look good. I'm thrilled to see that someone other than me has now also worked out getting fairly reasonable looking examples.
- seanbarry 5y agoAwesome, thanks for taking the time to reply! Much appreciated.