Skip to content

yk/neural_hash_collision

Repository files navigation

Neural Hash Collision Creator

  1. Use https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX to obtain the model and convert it to onnx.
  2. Use onnx_tf to convert the onnx model to tensorflow and save it in model.pb.
  3. Run the script. It will start off making lots of progress and then slowly approach a loss of -1. If you don't succeed, try raising the eps value in the script and play around with eps_step to control the noisyness.
  4. Confirm using nnhash.py from https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX.

Note: The final output might have a slightly different hash due to quantization and clipping. Just try again until you find an exact match.

Images from wikipedia

Concurrent work: https://github.com/anishathalye/neural-hash-collider More concurrent work: https://github.com/greentfrapp/apple-neuralhash-attack

Pull requests to improve this repo welcome.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages