Calculate hamming distance using Phashion.