swz30 / Restormer

[CVPR 2022--Oral] Restormer: Efficient Transformer for High-Resolution Image Restoration. SOTA for motion deblurring, image deraining, denoising (Gaussian/real data), and defocus deblurring.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The number of channels do not match before/after pixel unshuffle/shuffle?

guanhuankang opened this issue · comments

I am wondering that the number of channels should become 4 times (1/4 times) after applying pixel unshuffle (pixel shuffle) with downscale (upscale x2). But in Fig.1, the number of channels is double (half) before applying pixel unshuffle (pixel shuffle).

[My question]
Is there another layer (like conv_1x1) next to the upsampling/downsample operator to adjust the number of channels (but is not mentioned in Fig.1)? Am I right? Thank you for your time!

Here, I paste my understanding of pixel shuffle. The number of channels changes in r*r scale.
image

Yes, we adjust the channels before pixel shuffle and unshuffle operation: