It's not. It's a specific database of image hashes they are comparing against. Not AI, Not ML.
It's one thing to compute a simple hash. It's another entirely if they're using some type of locality sensitive hash since that very much has the possibility of false positives and would be a major invasion of privacy (which it already is).