It sounds like there is code that enables anyone to compute the perceptual hash for an image. Is this code published somewhere?

The instructions are here: https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX

This was discussed on HN yesterday here (and a few other front-page stories): https://news.ycombinator.com/item?id=28218391