Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeuralHash classifier #7

Open
kjsman opened this issue Aug 21, 2021 · 3 comments
Open

NeuralHash classifier #7

kjsman opened this issue Aug 21, 2021 · 3 comments

Comments

@kjsman
Copy link

kjsman commented Aug 21, 2021

I tried to build a classifier for NeuralHash: It gets NeuralHash as input and outputs class and probability.

I hashed all images of ILSVRC2012 dataset and trained the simple NN model.

Performance on the ImageNet validation dataset: (1,000 possible choices)

  • Top-1 Accuracy: 5.25% (If random, 0.1% expected)
  • Top-5 Accuracy: 14.09% (If random, 0.5% expected)

So... It seems that NeuralHash can't anonymize images well.

You can try this in Colab.

@willard-yuan
Copy link

@kjsman I think you should use the outs[0].flatten() as input, and NeuralHash is an embedding network which put out the outs[0].flatten() of 128 dimension. The seed.dot(outs[0].flatten()) is the Local Sensitive Hashing Process, and the seed is the projection matrix of LSH.

@kjsman
Copy link
Author

kjsman commented Aug 21, 2021

@willard-yuan The goal of this project is to prove that NeuralHash cannot guarentee anonymity of image, so I used final form(including LSH) of NeuralHash because that is what Apple accesses.

@dxoigmn
Copy link

dxoigmn commented Aug 23, 2021

This is a nice datapoint. What was the simple NN model you used? I'm wondering if we could learn something about which bits of the hash are biased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants