InsightFace_TF
InsightFace_TF copied to clipboard
about distance calculation in verification.py script
looking to line 50 and 51, the scripts diff = np.subtract(embeddings1, embeddings2) dist = np.sum(np.square(diff), 1) are use to calculate the distance between two embedding, but why not add an extra sqrt to the dist? like this. dist = np.sqrt(np.sum(np.square(diff), 1))
euclidean needs a extra sqrt operation, doesn't it?
no, of course not. In fact, this dist represents cos distance. dist = 2 * ( 1 - cos ).