This project is an illustration for the paper: Modeling Uncertainty with Hedged Instance Embedding, ICLR 2019. The paper describes a new type of embedding for images, were each image is represented as a probability distribution rather than a single point (which is the common practice). Embeddings are commonly used to help determine if a pair of images are of the same class, say two of the same person's face, or two different image of a particular pet. In general, two embeddings that are close together have HIGHER probability of having the same class label as two embeddings that are farther away. In that paper, there is an equation that describes how to go from a pair of distributions, one for each of two images, to estimate the probability that the two images are the same object. This is P(Match | z1, z2). It's a little bit complex to describe to people, so this is a demo of that computation.
Push "Start" and you will see two ellipses, each representing a single HIB Embedding's distribution as a Gaussian. You can adjust the embedding positions and scales a bit. Then, press "Go". At this point, there will be 12 samples drawn for each of the embeddings. For each pair of samples (one sample from each of the two embeddings), we measure the distance apart. Samples that are close have higher likelihood of Match, and are colored yellowish. In the lower corner, a histogram shows the distribution of distances between the embeddings, and in the lower right is the final P(Match | z1, z2) that is computed. You can move around the individual samples at this point, and the histogram and score computations will update.