def near_deduplicate_images(file_array, bit_distance, metadata = None): """Given a list of file names, return a dictionary of "nearly" deduplicated images""" nd = NearDuplicate(file_array, k=bit_distance, metadata_dictionary = metadata) nd.deduplicate_images() return nd.simhash_index,nd.image_dictionary