1. 程式人生 > >閱讀筆記之——Contextual Loss

閱讀筆記之——Contextual Loss

給出幾篇論文的連結(

https://arxiv.org/pdf/1803.02077.pdf

https://arxiv.org/pdf/1803.04626.pdf

無論是風格轉換的任務中,還是超解析度重建的任務中,有一個核心內容是找到生成影象跟目標影象特徵之間的相似性度量。對於超分任務,從概率的角度看,也是希望生成影象跟目標影象的分佈儘可能相似,因此提出使用一個比較特徵分佈的目標函式,而不僅僅是比較外觀。若僅僅比較外觀,就會存在MSE loss所帶來的問題——over smooth

The commonly used loss functions for comparing images can be

classified into two types:

Pixel-to-pixel loss functions(針對影象pixel維度的)——compare pixels at the same spatial coordinates, e.g., L1, L2, the perceptual loss。這類損失函式對input 和GT 的要求比較高,是逐畫素進行匹配的,對以PSNR、SSIM為客觀評價指標的問題貢獻比較大,但是從目前的研究來看,單單用這類損失函式,已經不能夠滿足我們的需求了。比如SRGAN這篇論文中提到MSE代價函式使重建結果有較高的信噪比PSNR,但是缺少了高頻資訊,出現過度平滑的紋理。perceptual loss的提出主要是為了更好的保留影象的高頻資訊。

全域性平均,從而導致過平滑。見下圖

Global loss functions(針對整幅影象特徵的)——perceptual loss,Gram loss which successfully captures style and texture by comparing statistics collected over the entire image.(通過比較在整個影象上收集的統計資料,成功捕獲樣式和紋理。)與perceptual loss相似的,Gram loss也是計算在特徵層上的損失,這兩個損失都是在整個VGG網路中得到的特徵層進行的計算,約束的是全域性高頻特徵的相似性;然而影象的相似性一般是區域性的,這些約束也不是十分的合理(由於它的全域性性,它把全域性特性轉換為整個影象。它不能用於約束生成的影象的內容)

更注重紋理特徵,會更加的sharp。但是存在的問題是雖然更明亮,但是部分會出現傾斜,見下圖

adversarial loss functions (GAN,針對身材影象和目標影象的“逼真程度”)。GAN loss是一個常見的損失函式,通過簡單的判斷生成的影象是否“逼真”到以假亂真的程度,但是GAN的模式崩潰問題到目前都沒有一個較好的解決辦法。

而這篇論文的Contextual Loss——a loss function targeted at non-aligned data.(用於不對齊資料之間的loss)based on the similarity between their features, ignoring the spatial positions of the features. And, this approach allows the generated image to spatially deform with respect to the target. The Contextual loss is not overly global (which is the main limitation of the Gram loss) since it compares features, and therefore regions, based on semantics.

A nice characteristic of the Contextual loss is its tendency to maintain the appearance of the target image.(更傾向於保持目標影象的外觀?可以理解為保持目標的輪廓麼~~~) This enables generation of images that look real even without using GANs, whose goal is speci cally to distinguish between `real' and `fake', and are sometimes difficult to fine tune in training.

 

 

 

 

 

 

 

 

 

 

 

 

 

關於perceptual loss

https://www.jianshu.com/p/58fd418fcabf