CNN for SR
Formulation
SRCNN์ ๊ตฌ์กฐ๋ ๊ธฐ์กด์ sparse coding based method์ ๊ฐ์ด
Patch extraction + representation
Non-linear mapping
Reconstruction
์ ๊ณผ์ ์ ๊ฑฐ์น๋ค. low-res image๋ SRCNN์ ํฌ์ ๋๊ธฐ ์ bicubic interpolation์ ํตํด ํค์ฐ๋ ค๋ ์ด๋ฏธ์ง์ ํฌ๊ธฐ์ ๋์ผํ๊ฒ ๋ง์ถ๋ค.
Patch extraction and representation
Sparse Coding Based Method์ SRCNN์ ๋น๊ตํด ๋ณด์.
low-res image๋ก๋ถํฐ patch๋ฅผ ์ถ์ถํ๊ณ ๊ฐ patch๋ฅผ high dimensional vector๋ก ๋ฐ๊พธ๋ ๊ณผ์ ์ ๊ฑฐ์น๋ค. CNN์์ filter๋ฅผ ๊ฑฐ์น๋ ๊ฒ์ ์ด๋ฏธ์ง์ ๋ถ๋ถ์ธ patch๋ฅผ ์ถ์ถํ๋ ๊ฒ๊ณผ ๊ฐ๋ค. ๊ทธ patch๋ฅผ representationํ๋ ๊ฒ์ ์ ํ ์ฐ์ฐ์ ๊ฐํด ๋ค๋ฅธ vector๋ก ๋ง๋๋ ๊ฒ์ด๋ฏ๋ก convolution ์ฐ์ฐ๊ณผ ๊ฐ๋ค.
Patch ์ถ์ถ
CNN filter window
Patch Representation
Convolution ์ฐ์ฐ
์ด ๊ณผ์ ์์์ ์ฐ์ฐ ๊ณผ์ ์ ๋ค์๊ณผ ๊ฐ๋ค.
Y์ W1 ํํฐ๋ก convolution ์ฐ์ฐํ๊ณ bias์ธ B1์ ๋ํ๋ค. ๊ทธ ์ถ max(0,x)์ธ ReLU๋ฅผ ํ์ฑํํจ์๋ก ์ ์ฉํ๋ค. W1์ ๊ตฌ์กฐ๋ c*f1*f1 ํฌ๊ธฐ์ ์ด๋ฏธ์ง๋ฅผ n1 ์ฐจ์์ vector๋ก ๋ํํ๋ค.
Non-linear mapping
Non-linear mapping์ filter size 1*1์ convolution ์ฐ์ฐ์ผ๋ก ์๊ฐํ ์ ์๋ค.
W2๋ n1*f2*f2 ํ ์์์ n2 ์ฐจ์์ ๋ฒกํฐ๋ก ์ฐ์ฐํ๋ค. f2๊ฐ 1์ด๋ผ๋ฉด ์ง๊ด์ ์ผ๋ก Non-linear map์ด๋ผ๋ ๊ฒ์ ์ ์ ์๋ค. ๋ ผ๋ฌธ์์ filter size๊ฐ 3*3, 5*5 ์ผ ๋๋ ์ผ๋ฐํ ๊ฐ๋ฅํ๋ค๊ณ ํ๋ค. ์ image์ patch๊ฐ ์๋ feature map์ patch์ nonlinear map์ ์ ์ฉํ๋ ๊ฒ์ด๋ผ ์๊ฐํ ์ ์๋ค.
Reconstruction
๋ง์ง๋ง reconstruction ๊ณผ์ ์ non-linear map์ ํตํด high-res image์ feature map์ผ๋ก ๋ฐ๊พธ์ด์ง ๊ฒ์์ high-res image๋ฅผ ๋ณต์ํ๋ค. ๊ธฐ์กด์ ๋ฐฉ๋ฒ์์ , ์ต์ข ๊ฒฐ๊ณผ๋ฅผ ๊ณ์ฐํ๊ธฐ ์ํด overlap๋๋ ๋ถ๋ถ(์ ์ดํด๊ฐ ๊ฐ์ง ์์)์ ํ๊ท ์ ๊ตฌํ๋ค๊ณ ํ๋ค. ์ด๊ฒ์ ๋ฏธ๋ฆฌ ์ ์๋ ์ปจ๋ณผ๋ฃจ์ ํํฐ๋ฅผ ์ ์ฉํ๋ ๊ฒ๊ณผ ๊ฐ๋ค๊ณ ๋ณผ ์ ์๋ค.
W3์ n2*f3*f3์ ํ ์์์ c ์ฐจ์์ ๋ฒกํฐ๋ก ๋ณํํ๋ค. B3๋ c์ฐจ์์ ๋ฒกํฐ์ด๋ค. ๋ง์ฝ ์ด filter์ ๊ฐ์ด average ์ฐ์ฐ์ผ๋ก ์๋ํ๋๋ก ํ์ต๋๋ค๋ฉด, ์ด์ ์ ๋ฐฉ๋ฒ๊ณผ ์ ์ฌํ ๊ณผ์ ์ ๊ฑฐ์น๊ฒ ๋๋ ๊ฒ์ด๋ค.
Relationship with sparse-coding-based method
๋ ผ๋ฌธ์์ sparse coding based method์ CNN์ ๊ด์ ์์ ๋ณผ ์ ์๋ค๊ณ ํ๋ค. dictionary์ ๊ฐ์๊ฐ ์ด๋ผ๋ฉด, ํฌ๊ธฐ์ ํจ์น๋ฅผ ์ถ์ถํด ์ ํ ์ฐ์ฐ(bias ํฌํจ)์ ํตํด dictionary ๊ณต๊ฐ์ผ๋ก projectionํ๋ ๊ฒ์ด ๋ฐ๋ก sparse coding ๋ฐฉ๋ฒ์ด๋ค. ์ด๋ convolution ์ฐ์ฐ์ด ํ๋ ๊ณผ์ ๊ณผ ๋์ผํ๋ค๋ ๊ฒ์ ์ ์ ์๋ค.
๋ ๋ฒ์งธ, non-linear mapping์์ (์ฆ, pixelwise)์ด๋ฉด convolution ์ฐ์ฐ์ผ๋ก fully connected network๋ฅผ ๋ง๋ ๊ฒ๊ณผ ๊ฐ๋ค. ํฌ๊ธฐ์ low-res dictionary์์ ํฌ๊ธฐ์ high-res dictionary๋ก projectionํ๋ค.
๋ง์ง๋ง reconstruction ๊ณผ์ ์, high-res patch์ overlap๋๋ ๋ถ๋ถ(์ด์ ๋ ผ๋ฌธ์ ์ดํด๋ณด์์ผ ํ ๋ฏ)์ ํ๊ท ๋ด์ด ์ต์ข ์ด๋ฏธ์ง์ ํฝ์ ์ ๊ฒฐ์ ํ๋ค. ์ด ๋ํ convolution ์ฐ์ฐ์ผ๋ก ๋๋ฑํ๊ฒ ๋์ฒด ๊ฐ๋ฅํ ๋ถ๋ถ์ด๋ค.
๋ฐ๋ผ์ sparse coding based method๋ CNN์ ํ๋์ ์๋ผ๊ณ ๋ณผ ์ ์๋ค. ์ด๋ฌํ ์๊ฐ์ SRCNN์ hyperparameter๋ฅผ ๊ฒฐ์ ํ๋๋ฐ ๋์์ ์ค๋ค. high-res dictionary๊ฐ ๋ sparseํ ๊ฒ์ด๋ผ ์์ธก๋๋ฏ๋ก ** ๋ก ์ค์ ํ๋ค. ๊ฒฐ๊ณผ๋ฌผ์ด ๋์ฑ ๋์ ํด์๋๋ฅผ ๋ณด์ด๋ฏ๋ก ์ด์ด์ผ ํ๊ณ ๊ทธ ๊ฒฐ๊ณผ๋ก patch์ ์ค์ฌ์ ์๋ ๊ฐ ์ฑ๋ถ์ด ๋์ฑ ๋ง์ด ํฌํจ๋๋ค.
๊ธฐ์กด์ ๋ฐฉ๋ฒ์ ๋คํธ์ํฌ์ ๋ชจ๋ ๋ถ๋ถ์ ํ์ตํ ์ ์์์ง๋ง, ์ด ๋ฐฉ๋ฒ์ ๋คํธ์ํฌ๊ฐ feedforward์ด๊ณ ๋ชจ๋ ๋ถ๋ถ์ ํ์ต ํ ๋ ์ต์ ํํ ์ ์๋ค. ๋ํ reconstruction ๊ณผ์ ์์ ๊ธฐ์กด์ ๋ฐฉ๋ฒ๋ณด๋ค ๋์ฑ ๋ง์ pixel ์ ๋ณด๋ฅผ ์ด์ฉํ์ผ๋ก, ๋ ์ข์ ์ฑ๋ฅ์ ๋ผ ์ ์๋ค ์ฃผ์ฅํ๋ค.
Training
parameter๋ W1, W2, W3, B1, B2, B3์ด๋ค. Loss function์ผ๋ก MSE๋ฅผ ์ฌ์ฉํ๊ณ ์ด๋ ์ฆ PSNR(์ต๋ ์ ํธ ๋ ์ก์๋น)์ ์ต์ ํํ๋ ๊ฒ๊ณผ ๊ฐ๋ค.
์ต์ ํ ๋ฐฉ์์ SGD์ด๊ณ momentum=0.9๋ก ํ๋ค.
์ฒซ ์์ momentum 0.9์ SGD์ด๊ณ , ๋ ๋ฒ์งธ ์์ update ์์ด๋ค.
๋คํธ์ํฌ์ ์ฒซ ๋ layer์ learning rate๋ 10e-4์ด๊ณ ๋ง์ง๋ง layer๋ 10e-5๋ก ํ๋ค.
filter์ weight๋ gaussian distribution์ผ๋ก ์ด๊ธฐํ(mean=0, stddev=0.001)ํ๊ณ , bias๋ 0์ผ๋ก ์ด๊ธฐํํ๋ค.
f1, f2, f3๋ ์์๋๋ก 9, 1, 5์ด๋ฉฐ n1์ 64, n2๋ 32๋ก ์ค์ ํ๋ค.
๋ฐ์ดํฐ๋ ์ฌ์ง์ randomํ๊ฒ cropํด ๋ง๋ ๋ค. convolution ์ฐ์ฐ ๊ฒฐ๊ณผ, ๊ฐ filter์ ํฌ๊ธฐ๋งํผ ์ถ๋ ฅ ์ด๋ฏธ์ง๊ฐ ์ค์ด๋ค๊ธฐ ๋๋ฌธ์ ํฌ๊ธฐ์ ํด๋นํ๋ ์ค์ฌ๋ถ ์๋ณธ ์ด๋ฏธ์ง์ ๋์กฐํด loss๋ฅผ ๊ณ์ฐํ๋ค.
Last updated
Was this helpful?