| <!--Copyright 2022 The HuggingFace Team. All rights reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | |
| an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | |
| specific language governing permissions and limitations under the License. | |
| โ ๏ธ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be | |
| rendered properly in your Markdown viewer. | |
| --> | |
| # Swin2SR [[swin2sr]] | |
| ## ๊ฐ์ [[overview]] | |
| Swin2SR ๋ชจ๋ธ์ Marcos V. Conde, Ui-Jin Choi, Maxime Burchi, Radu Timofte๊ฐ ์ ์ํ ๋ ผ๋ฌธ [Swin2SR: SwinV2 Transformer for Compressed Image Super-Resolution and Restoration](https://huggingface.co/papers/2209.11345)์์ ์๊ฐ๋์์ต๋๋ค. | |
| Swin2SR์ [SwinIR](https://github.com/JingyunLiang/SwinIR/) ๋ชจ๋ธ์ ๊ฐ์ ํ๊ณ ์ [Swin Transformer v2](swinv2) ๋ ์ด์ด๋ฅผ ๋์ ํจ์ผ๋ก์จ, ํ๋ จ ๋ถ์์ ์ฑ, ์ฌ์ ํ๋ จ๊ณผ ๋ฏธ์ธ ์กฐ์ ๊ฐ์ ํด์๋ ์ฐจ์ด, ๊ทธ๋ฆฌ๊ณ ๋ฐ์ดํฐ ์์กด์ฑ ๋ฌธ์ ๋ฅผ ์ํ์ํต๋๋ค. | |
| ๋ ผ๋ฌธ์ ์ด๋ก์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค: | |
| *์์ถ์ ์คํธ๋ฆฌ๋ฐ ์๋น์ค, ๊ฐ์ ํ์ค, ๋น๋์ค ๊ฒ์๊ณผ ๊ฐ์ ๋์ญํญ์ด ์ ํ๋ ์์คํ ์ ํตํด ์ด๋ฏธ์ง์ ์์์ ํจ์จ์ ์ผ๋ก ์ ์กํ๊ณ ์ ์ฅํ๋ ๋ฐ ์ค์ํ ์ญํ ์ ํฉ๋๋ค. ํ์ง๋ง ์์ถ์ ํ์ฐ์ ์ผ๋ก ์๋ณธ ์ ๋ณด์ ์์ค๊ณผ ์ํฐํฉํธ๋ฅผ ์ด๋ํ๋ฉฐ, ์ด๋ ์๊ฐ์ ํ์ง์ ์ฌ๊ฐํ๊ฒ ์ ํ์ํฌ ์ ์์ต๋๋ค. ์ด๋ฌํ ์ด์ ๋ก, ์์ถ๋ ์ด๋ฏธ์ง์ ํ์ง ํฅ์์ ํ๋ฐํ ์ฐ๊ตฌ ์ฃผ์ ๊ฐ ๋๊ณ ์์ต๋๋ค. ํ์ฌ ๋๋ถ๋ถ์ ์ต์ฒจ๋จ ์ด๋ฏธ์ง ๋ณต์ ๋ฐฉ๋ฒ์ ํฉ์ฑ๊ณฑ ์ ๊ฒฝ๋ง์ ๊ธฐ๋ฐ์ผ๋ก ํ์ง๋ง, SwinIR๊ณผ ๊ฐ์ ํธ๋์คํฌ๋จธ ๊ธฐ๋ฐ ๋ฐฉ๋ฒ๋ค๋ ์ด ์์ ์์ ์ธ์์ ์ธ ์ฑ๋ฅ์ ๋ณด์ฌ์ฃผ๊ณ ์์ต๋๋ค. ์ด๋ฒ ๋ ผ๋ฌธ์์๋ Swin Transformer V2๋ฅผ ์ฌ์ฉํด SwinIR์ ๊ฐ์ ํ์ฌ ์ด๋ฏธ์ง ์ดํด์๋ ์์ , ํนํ ์์ถ๋ ์ ๋ ฅ ์๋๋ฆฌ์ค์์ ์ฑ๋ฅ์ ํฅ์์ํค๊ณ ์ ํฉ๋๋ค. ์ด ๋ฐฉ๋ฒ์ ํตํด ํธ๋์คํฌ๋จธ ๋น์ ๋ชจ๋ธ์ ํ๋ จํ ๋ ๋ฐ์ํ๋ ์ฃผ์ ๋ฌธ์ ๋ค, ์๋ฅผ ๋ค์ด ํ๋ จ ๋ถ์์ ์ฑ, ์ฌ์ ํ๋ จ๊ณผ ๋ฏธ์ธ ์กฐ์ ๊ฐ ํด์๋ ์ฐจ์ด, ๊ทธ๋ฆฌ๊ณ ๋ฐ์ดํฐ ์์กด์ฑ์ ํด๊ฒฐํ ์ ์์ต๋๋ค. ์ฐ๋ฆฌ๋ JPEG ์์ถ ์ํฐํฉํธ ์ ๊ฑฐ, ์ด๋ฏธ์ง ์ดํด์๋(ํด๋์ ๋ฐ ๊ฒฝ๋), ๊ทธ๋ฆฌ๊ณ ์์ถ๋ ์ด๋ฏธ์ง ์ดํด์๋๋ผ๋ ์ธ ๊ฐ์ง ๋ํ์ ์ธ ์์ ์์ ์คํ์ ์ํํ์ต๋๋ค. ์คํ ๊ฒฐ๊ณผ, ์ฐ๋ฆฌ์ ๋ฐฉ๋ฒ์ธ Swin2SR์ SwinIR์ ํ๋ จ ์๋ ด์ฑ๊ณผ ์ฑ๋ฅ์ ํฅ์์ํฌ ์ ์์ผ๋ฉฐ, "AIM 2022 Challenge on Super-Resolution of Compressed Image and Video"์์ ์์ 5์ ์๋ฃจ์ ์ผ๋ก ์ ์ ๋์์ต๋๋ค.* | |
| <img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/swin2sr_architecture.png" | |
| alt="drawing" width="600"/> | |
| <small> Swin2SR ์ํคํ ์ฒ. <a href="https://huggingface.co/papers/2209.11345">์๋ณธ ๋ ผ๋ฌธ</a>์์ ๋ฐ์ท.</small> | |
| ์ด ๋ชจ๋ธ์ [nielsr](https://huggingface.co/nielsr)๊ฐ ๊ธฐ์ฌํ์์ต๋๋ค. | |
| ์๋ณธ ์ฝ๋๋ [์ฌ๊ธฐ](https://github.com/mv-lab/swin2sr)์์ ํ์ธํ ์ ์์ต๋๋ค. | |
| ## ๋ฆฌ์์ค [[resources]] | |
| Swin2SR demo notebook์ [์ฌ๊ธฐ](https://github.com/NielsRogge/Transformers-Tutorials/tree/master/Swin2SR)์์ ํ์ธํ ์ ์์ต๋๋ค. | |
| SwinSR์ ํ์ฉํ image super-resolution demo space๋ [์ฌ๊ธฐ](https://huggingface.co/spaces/jjourney1125/swin2sr)์์ ํ์ธํ ์ ์์ต๋๋ค. | |
| ## Swin2SRImageProcessor [[transformers.Swin2SRImageProcessor]] | |
| [[autodoc]] Swin2SRImageProcessor | |
| - preprocess | |
| ## Swin2SRConfig [[transformers.Swin2SRConfig]] | |
| [[autodoc]] Swin2SRConfig | |
| ## Swin2SRModel [[transformers.Swin2SRModel]] | |
| [[autodoc]] Swin2SRModel | |
| - forward | |
| ## Swin2SRForImageSuperResolution [[transformers.Swin2SRForImageSuperResolution]] | |
| [[autodoc]] Swin2SRForImageSuperResolution | |
| - forward | |