Dedupe Support

Adds a function for finding duplicate images in a group of already-existing image IDs.