A loss function that helps judge how visually similar two images are. Itβs premise is to compare two image similarities from features extracted from both.
The process:
- Run both images through a pretrained VGG (or CNN)
- Extract feature maps from multiple layers of the pretrained model.
- Compute weighted distances between corresponding feature maps.
- Aggregate into one loss
The main reason this gets used is that pixel-level reconstruction is a hard loss function and counter-productive for what we really want some models to learn. Sometimes, itβs best to learn the features that the model is supposed to contain and reconstruct those accurately enough for a pretrained model to work against.