# Position invariant perceptual loss

**URL:** <https://discuss.pytorch.org/t/position-invariant-perceptual-loss/104611>\
**Category:** vision\
**Created:** [November 30, 2020, 11:19am UTC](https://discuss.pytorch.org/t/position-invariant-perceptual-loss/104611 "2020-11-30T11:19:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZimoNitrome](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/zimonitrome/32/27591_2.png) [@ZimoNitrome](https://discuss.pytorch.org/u/ZimoNitrome)\
**Post date:** [November 30, 2020, 11:19am UTC](https://discuss.pytorch.org/t/position-invariant-perceptual-loss/104611/1 "2020-11-30T11:19:58Z")

</div>

Is there any way to get positional-invariant perceptual loss?  
i.e. these image pairs would receive a low loss:  
 ![cf746e57d06a_bE9Y400tb0](https://discuss.pytorch.org/uploads/default/original/3X/e/e/ee44f9bd1747f920774d5efcfece56a21f40671c.png) compared to ![087b12a73b83_B44L536Iso](https://discuss.pytorch.org/uploads/default/original/3X/9/6/967426b845545920f812c376071e5997ab5f64eb.png)

![cf746e57d06a_bE9Y400tb0](https://discuss.pytorch.org/uploads/default/original/3X/e/e/ee44f9bd1747f920774d5efcfece56a21f40671c.png) compared to ![eb1c9f04e639_1MMupMjNHt](https://discuss.pytorch.org/uploads/default/original/3X/d/8/d8db1ed999c6e1126519a6099d395dbad3ddf7d2.png)

Because they contain the same objects.

But this image would receive a high loss:

![cf746e57d06a_bE9Y400tb0](https://discuss.pytorch.org/uploads/default/original/3X/e/e/ee44f9bd1747f920774d5efcfece56a21f40671c.png) compared to ![503fd7c3498a_OThVRmItUJ](https://discuss.pytorch.org/uploads/default/original/3X/1/a/1ab084130290ec4f793121816dda8c992119efc1.png)

Since the objects are not the same.

Experimentation of the above images show that none of the layers in VGG19 has this property:

![Code_SqgKSTLCtv](https://discuss.pytorch.org/uploads/default/original/3X/8/0/8017af9189e344a541d6e56b0c2cf3b9383177e5.png)
