Rui Wang, Xiaochun Cao, Wenqi Ren, Shangquan Sun, Xinwei Gao
We lifted 11 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| sunshangquan/Histoformer | — | 9 of 11 |
| Function | Status | Where it lives |
|---|---|---|
| Attention_histogram | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("09be8a61d75c6b9b") |
| BiasFree_LayerNorm | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("8caa1bb2ca1217f1") |
| Downsample | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("8728564ca09fb5d2") |
| FeedForward | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("9e868ab7476b4a76") |
| LayerNorm | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("4f765879fd63002f") |
| OverlapPatchEmbed | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("aacfb4408f6e8c7e") |
| SkipPatchEmbed | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("25d209a3b8d475eb") |
| Upsample | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("0ef3a76e8f54fcd5") |
| WithBias_LayerNorm | Ran | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("bfbc59d0ccb176fa") |
| Histoformer | Not yet run | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("a3d97c893214ec56") |
| TransformerBlock | Not yet run | sunshangquan/Histoformer/basicsr/models/archs/histoformer_arch.py pointer only (licence: NONE) · get_code("b3103e147e16c1a5") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Transformer-based image restoration methods in adverse weather have achieved significant progress. Most of them use self-attention along the channel dimension or within spatially fixed-range blocks to reduce computational load. However, such a compromise results in limitations in capturing long-range spatial features. Inspired by the observation that the weather-induced degradation factors mainly cause similar occlusion and brightness, in this work, we propose an efficient Histogram Transformer (Histoformer) for restoring images affected by adverse weather. It is powered by a mechanism dubbed histogram selfattention, which sorts and segments spatial features into intensity-based bins. Self-attention is then applied across bins or within each bin to selectively focus on spatial features of dynamic range and process similar degraded pixels of the long range together. To boost histogram selfattention, we present a dynamic-range convolution enabling conventional convolution to conduct operation over similar pixels rather than neighbor pixels. We also observe that the common pixel-wise losses neglect linear association and correlation between output and ground-truth. Thus, we propose to leverage the Pearson correlation coefficient as a loss function to enforce the recovered pixels following the identical order as groundtruth. Extensive experiments demonstrate the efficacy and superiority of our proposed method. We have released the codes in Github.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2407.10172")
get_code_for_paper("2407.10172")
have("2407.10172")
Connect an agent — have() is free.