What is an efficient way to detect near-duplicate images in a large dataset?

What is an efficient way to detect near-duplicate images in a large dataset?

I’m interested in identifying duplicate and near-duplicate images in a large collection.

The images may have different resolutions, JPEG compression levels, or minor edits. Exact file hashing would not help when the image content is the same but the files differ.

Would perceptual hashing be sufficient for this use case, or would it make sense to combine pHash with feature matching or image embeddings?

I’m particularly interested in approaches that balance matching accuracy with computational cost as the dataset grows.