I think would be better to use another libraries to check for duplicates. If you use PHP, you can check in with hash() func. This function generate md5 hash code using a picture content.
If you have similiar photos, you can check best photo using Focus Model. This model return Image Focus Value. With this val you can check it (i use it to check quality of photo).