Can anyone help me understand per-pixel loss versus content loss?

I couldn’t find the definition of per-pixel loss and am struggling to understand the difference between per-pixel loss and content(perceptual) loss. I understand that

  1. both loss functions measure how similar 2 images are alike.
  2. for content loss you can combine multiple layers so that’s an advantage.

In terms of measuring the loss, are they both measuring the per-pixel differences? if not, how are they measuring things differently? thank you!

per-pixel loss = measuring the actual differences between pixels in the images. i.e. it’s very naive and fancy sounding for a basic concept.

Thanks @kelvin!

Can you verify if the following description is correct? If not, can you point out the errors for me?

for “per-pixel loss”, we are summing all the absolute error between all pixels.
for content loss, we are summing all the squared errors between all pixels and take the mean.

The loss function is interchangeable conceptually. i.e. you can use MAE/MSE for either/both per-pixel and content loss.

I think I follow that, so what’s the difference per-pixel loss and content loss (if it’s not about the loss functions they use)?

I misread your earlier comment.

per-pixel = measuring differences between pixels.
perceptual = measuring differences between a specific layer’s filter activations in a convnet.


Thank you! You just saved me a massive headache!!!

1 Like