  Global operations, such as global average pooling, are widely used in
top-performance image restorers. They aggregate global information from input
features along entire spatial dimensions but behave differently during training
and inference in image restoration tasks: they are based on different regions,
namely the cropped patches (from images) and the full-resolution images. This
paper revisits global information aggregation and finds that the image-based
features during inference have a different distribution than the patch-based
features during training. This train-test inconsistency negatively impacts the
performance of models, which is severely overlooked by previous works. To
reduce the inconsistency and improve test-time performance, we propose a simple
method called Test-time Local Converter (TLC). Our TLC converts global
operations to local ones only during inference so that they aggregate features
within local spatial regions rather than the entire large images. The proposed
method can be applied to various global modules (e.g., normalization, channel
and spatial attention) with negligible costs. Without the need for any
fine-tuning, TLC improves state-of-the-art results on several image restoration
tasks, including single-image motion deblurring, video deblurring, defocus
deblurring, and image denoising. In particular, with TLC, our Restormer-Local
improves the state-of-the-art result in single image deblurring from 32.92 dB
to 33.57 dB on GoPro dataset. The code is available at
https://github.com/megvii-research/tlc.
