AsuharietYgvar / AppleNeuralHash2ONNX

Convert Apple NeuralHash model for CSAM Detection to ONNX.
Apache License 2.0
1.53k stars 132 forks source link

Huggingface Spaces Web Demo #6

Closed AK391 closed 3 years ago

AK391 commented 3 years ago

Web demo for usage on huggingface spaces

AsuharietYgvar commented 3 years ago

Please be careful of redistributing Apple's model outside intended purposes. I'm not going to merge this.

AK391 commented 3 years ago

@AsuharietYgvar the models used were downloaded from here https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/2#issuecomment-901246239, there is also a colab downloading the models and using it here https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/7#issue-976126671 and a web demo using the models here https://www.reddit.com/r/MachineLearning/comments/p8q27o/p_run_neuralhash_in_your_browser/. The web demo on huggingface does not do conversion, only inference with the images given

AsuharietYgvar commented 3 years ago

The web demo on huggingface does not do conversion, only inference with the images given

This is exactly what I was talking about. In theory Apple could take down your web version because the model is Apple's proprietary asset. It's okay to let the user provide their own model file, which is the same idea as the famous SM64 project where you have to provide your "own" game ROM. Apple could easily appeal to GitHub and take this repo down if we are clearly redistributing their models.

AK391 commented 3 years ago

@AsuharietYgvar to clarify the model here https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/2#issuecomment-901246239 has been converted to onnx is the one the huggingface web demo is using and seems anyone can download and use?

AsuharietYgvar commented 3 years ago

The fact that you can find something doesn't mean it can be redistributed anywhere. Think about pirated movies. They can be easily found on various websites. But it doesn't mean you will be fine redistributing those movies everywhere. Even downloading by BitTorrent can get yourself into trouble.