[筆記] On Feature Normalization and Data Augmentation
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Overview
- Normalization
- batch_norm 跟 instance_norm 其實就是對不同維度做 normalization,batch_norm 對整個 batch 做 normalization,instance_norm 對 channel 做 normalization
- Batch normalization 常常被用在 training 時做 feature scaling
- 一個 batch 的 features 減 除以 做標準化 (平移縮放),
- 再乘 加上 來調整 features 不要都落在 ,
- Instance normalization 反而在 image generation 這類的 task 表現的比 batch_norm 更好,因為透過 instance_norm 或是 position_norm 的 moments (, ) 可以更好的抓到 style 和 shape
- 我看過一個說法是,在 image generation task 更看重 instance 之間的差異,要生成一張 image 不需要參考其他 image 的資訊,應該保有該張 image 的特色,也就是 ,
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 在 image recognition (classification) task 中,latent feature 的 , 被視為 noise,需要透過 batch_norm 移除;但是 image generation task,latent feature 的 , 是一種 feature
- 例如,下圖 1. 透過 postion normalization 得到 ResNet-18 第一個 layer 的 , ,仍舊可以透過 , 來預測 class 的類別
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 比較下表中 classification task 的 error rate,單純從 moments 來做分類 (PONO moments, 紅色) 已經比隨機亂猜 (Random Baseline, 灰色) 來得更好。如果把 moments 移掉 (PONO normalized, 藍色),結果會比標準的 PONO (綠色) 還要更爛,所以 moments 其實是重要的 feature
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 本篇論文的方法基於 positional normalization,既然 moments 代表 shape 和 style,那只要交換 moments 就能限制模型同時學習 a instance 的 feature dist 和 b instance 的 moments
- 這篇的方法稱為 Moment Exchange (MoEX)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Methodology
…前面其實已經把本篇論文的核心給講完了,接著細探這篇的方法。但不得不說,這篇的作法跟 DOMAIN GENERALIZATION WITH MIXSTYLE 超級無敵像,只差在這篇透過 intra-instance normalization 得到 , ,DOMAIN GENERALIZATION WITH MIXSTYLE 是透過 instance normalization 得到 ,
MoEX
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
input 經過模型得到 features ,透過 insta-instance normalization 取得 的 ;同時,input 的 features 也會透過 insta-instance normalization 取得
- Normalize 的 features,再透過 縮放平移
- Normalize 的 features,再透過 縮放平移
透過 normalized 替換成 可以強迫模型同時關注 data 的兩個面向:normalized features 和 moments
Ground-truth
,
既然結合兩個 instances 的特徵,那結合後的 ground-truth 一定是兩個 instances 個別 ground-truth 的 weighted sum
原 paper 的 Table 10. 有做 的參數實驗,總的來說最推薦
Normalization
這篇方法有個重要的前提:normalize 只能做在 instance 內部,也就是 intra-instance normalization,例如 positional normalization 就是拿 instance 的 position 做標準化
Annotation
- : 第 個 input
- : 第 個 layer 的 feature
- 假設有個 function 負責做 intra-instance normalization,給 feature maps 會得到
(1) normalized feature ,
(2) ,
(3)
Annotation
- : 第 個 input
- : 第 個 layer 的 feature
- 對應 負責從 normalization 還原,給 ,做縮放平移
MoEX 限制在 instance 內的標準化,很單純的調整 ,所以還是可以做 inter-instance normalization (e.g. batch normalization),也就是 instance 間 的標準化
Intra-instance normalization 有很多種 (IN, GN, LN),作者也有做相關的實驗在 Table 8.
My Conclusions