Demoiréing aims to remove moiré artifacts that often occur in images. While recent deep learning-based methods have achieved promising results, they typically require substantial computational resources, limiting their deployment on edge devices. Model quantization offers a compelling solution. However, directly applying existing quantization methods to demoiréing models introduces severe performance degradation. The main reasons are distribution outliers and weakened representations in smooth regions. To address these issues, we propose QuantDemoire, a post-training quantization framework tailored to demoiréing. It contains two key components. First, we introduce an outlier-aware quantizer to reduce errors from outliers. It uses sampling-based range estimation to reduce activation outliers and keeps a few extreme weights in FP16 with negligible cost. Second, we design a frequency-aware calibration strategy. It emphasizes low- and mid-frequency components during fine-tuning, which mitigates banding artifacts caused by low-bit quantization. Experiments validate that our QuantDemoire achieves large reductions in parameters and computation while maintaining quality. Meanwhile, it outperforms existing quantization methods by over 4 dB on W4A4. We implement a CUDA kernel for the mixed-precision branch and achieve a 2.3× end-to-end speedup on an RTX 4090 GPU. Code is released at: https://github.com/zhengchen1999/QuantDemoire.
Figures & tables
Figure 1: Comparison of PSNR with other quantization methods on UHDM. The full-precision backbone is ESDNet [ 36 ] . Our QuantDemoire demonstrates superior performance.
Figure 2: The overview of our QuantDemoire. (a) Outlier-Aware Quantizer: activations discard outliers through sample-based estimation, while weights preserve outliers in FP16 precision. (b) Frequency-Aware Calibration Strategy: quantizer parameters are optimized on mid- and low-frequency components, which are extracted through the frequency extraction process.
Figure 3: Activation distributions (Original, Smooth (Raw), Smooth (Sample)). (a) Original: ranges differ across channels; (b) Smooth (Raw): align maxima only; (c) Smooth (Sample): align the main body (excluding outliers), improving suitability for quantization.
Figure 4: Visualization of activation and weight distributions from randomly selected layers in ESDNet [ 36 ] . The distributions are approximately Gaussian or exponential. Under these distributions, outliers are distributed on both sides. These sparse extremes can dominate the quantization range if they are treated together with ordinary values.
Table 1: Ablation study on sampling-based activation quantizer.
Table 2: Ablation study on mixed-precision weight quantizer.
Table 3: Ablation study on frequency-aware calibration strategy.
UHDM
FHDMi
LCDMoiré
Method
Bit
PSNR ↑
SSIM ↑
LPIPS ↓
PSNR ↑
SSIM ↑
LPIPS ↓
PSNR ↑
SSIM ↑
LPIPS ↓
ESDNet [ 36 ]
W32A32
22.12
0.7956
0.2551
24.50
0.8351
0.1354
44.83
0.9963
0.0097
MinMax [ 10 ]
W8A8
21.50
0.7727
0.2596
20.30
0.7631
0.2600
37.92
0.9865
0.0236
Percentile [ 14 ]
W8A8
19.38
0.7744
0.2784
19.73
0.7519
0.2734
30.11
0.9585
0.0281
2DQuant [ 17 ]
W8A8
21.20
0.7827
0.2749
20.57
0.7861
0.2034
41.60
0.9923
0.0214
SVDQuant [ 13 ]
W8A8
21.80
0.7907
0.2580
22.07
0.7966
0.1598
41.18
0.9915
0.0165
Table 4: Quantitative comparison. The best and second-best results are colored red and blue .
Table 5: Compression ratios of Params and OPs at 6/4/3-bit. OPs are measured with an input size of 3×224×224 .
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Table 6: Ablation on the sampling rate in the activation. Evaluation is conducted on UDHM, 4-bit.
UHDM
Method
Bit( w / a )
Params (M)
OPs (G)
PSNR ↑
SSIM ↑
LPIPS ↓
SVDQuant (rank = 2)
4/4
1.08
3.76
14.68
0.5762
0.6559
SVDQuant (rank = 8)
4/4
2.10
8.48
18.69
0.7428
0.3615
QuantDemoire (ours)
4/4
0.79
1.80
21.08
0.7626
0.3068
SVDQuant (rank = 2)
3/3
0.90
3.34
14.83
0.4547
0.7289
SVDQuant (rank = 8)
3/3
2.01
6.80
17.20
0.6707
0.5033
Appendix
Table 7: Results of SVDQuant (rank = 2 and 8). Evaluation is conducted on UDHM, 3 and 4-bit.
Bit
Params (M)
OPs (G)
UHDM
Method
( w / a )
( ↓ Ratio)
( ↓ Ratio)
PSNR ↑
SSIM ↑
LPIPS ↓
ESDNet [ 36 ]
32/32
5.93 ( ↓ 0%)
13.52 ( ↓ 0%)
22.12
0.7956
0.2551
MinMax [ 10 ]
8/8
1.49 ( ↓ 74.90%)
3.38 ( ↓ 75.00%)
21.50
0.7727
0.2596
Percentile [ 14 ]
8/8
1.49 ( ↓ 74.90%)
3.38 ( ↓ 75.00%)
19.38
0.7744
0.2784
2DQuant [ 17 ]
8/8
1.49 ( ↓ 74.90%)
3.38 ( ↓ 75.00%)
21.20
0.7827
0.2749
SVDQuant [ 13 ]
8/8
1.82 ( ↓ 69.29%)
5.44 ( ↓ 59.75%)
21.80
0.7907
0.2580
Appendix
Table 8: Compression ratios of Params and OPs. OPs are measured with a 3×224×224 input.
N
∣x−mean∣>4∗std
∣x−mean∣>4.5∗std
106
51
17
107
103
41
108
253
72
Appendix
Table 9: Results of number of extreme outliers ∣x−mean∣>4∗std means the number of activations that lies more than four standard deviations away from the mean.
RUN
PSNR ↑
SSIM ↑
LPIPS ↓
1
21.0808
0.7626
0.3068
2
21.0835
0.7623
0.3066
3
21.0798
0.7628
0.3070
4
21.0801
0.7624
0.3059
5
21.0824
0.7631
0.3062
std
0.0014
0.0003
0.0004
Appendix
Table 10: Results of PSNR, SSIM, and LPIPS metrics across 5 runs.
Method
PSNR
SSIM
LPIPS
Ours (sampling)
20.2803
0.6745
0.3369
percentile 95%
19.3058
0.6026
0.3623
percentile 99.9%
19.3526
0.6091
0.3487
Appendix
Table 11: Comparison of different methods. Apart from using sampling-based estimation, % clipping, and 99.9% clipping to compute the quantization boundaries and the smoothing factor. The remaining settings for all three methods are identical to the final configuration of our method.
Method
PSNR
SSIM
LPIPS
Ours (sampling)
20.2803
0.6745
0.3369
percentile 95%
19.4556
0.6223
0.3601
percentile 99.9%
19.5781
0.6391
0.3532
MinMax
18.9265
0.5921
0.4013
Appendix
Table 12: Comparison of different initialization approaches.
Task / Backbone
Dataset
Method/Bit
PSNR ↑
SSIM ↑
Demoiréing / FHDe 2 Net
UHDM
MinMax/4
16.42
0.6535
Demoiréing / FHDe 2 Net
UHDM
Percentile/4
17.86
0.7012
Demoiréing / FHDe 2 Net
UHDM
QuantDemoire/4
20.23
0.7194
SR / SwinIR
Urban100
MinMax/4
18.54
0.3871
SR / SwinIR
Urban100
Percentile/4
21.01
0.5179
SR / SwinIR
Urban100
QuantDemoire/4
24.15
0.7324
Appendix
Table 13: Generalization results on another demoiréing backbone and image super-resolution.
Figure 8: Visualization of the effectiveness of frequency-aware calibration. "Orignal" are the results of model trained with original loss function, "Frequency" are the results of model trained with frequency-aware calibration, which significantly weakened banding artifacts.
Method
PSNR
SSIM
LPIPS
Training epoch
Ours (only learn the clipping bound)
21.0808
0.7626
0.3068
4
Omniquant (learn clipping bound and smoothing factor)
21.0643
0.7613
0.3106
40
Appendix
Table 14: Comparison of our method vs. Omniquant. Experiments are conducted in 4bit, UHDM.
Figure 9: Visualization of results under different calibration strategies. Original: training in the spatial domain suffers from banding artifacts under low-bit quantization. Mid&Low-Freq: our frequency-aware calibration strategy leverages mid- and low-frequency.
Figure 10: Visual comparison on the UHDM [ 36 ] dataset.
Figure 11: Visual comparison on the LCDMoiré [ 37 ] dataset.
Figure 12: More distribution of activation (Part 1).
Figure 13: More distribution of activation (Part 2).
Image demoiréing remains a challenging task due to the complex interplay between texture corruption and color distortions caused by moiré patterns. Existing methods, especially those relying on direct image-to-image restoration, often fail to disentangle these intertwined artifacts effectively. While frequency-aware approaches offer a promising direction, their potential is hindered by the discrete transform (e.g., Haar wavelet or block-based DCT), which may suffer from spatial discontinuity, channel redundancy, and further cause error accumulation during their fixed inverse processes. In this paper, we present Freqformer, a Transformer-based framework specifically designed for image demoiréing through targeted frequency separation. Our method performs an effective frequency decomposition that splits moiré patterns into high-frequency spatially-localized textures and low-frequency scale-robust color distortions, which are then handled by a dual-branch architecture and an asymmetric training scheme tailored to their distinct characteristics. We further propose a learnable Frequency Composition Transform (FCT) module to adaptively fuse the frequency-specific outputs, enabling consistent and high-fidelity reconstruction. To better aggregate the spatial dependencies and the inter-channel complementary information, we introduce a Spatial-Aware Channel Attention (SA-CA) module that refines moiré-sensitive regions without incurring high computational cost. Extensive experiments on various demoiréing benchmarks demonstrate that Freqformer achieves state-of-the-art performance with a compact model size. The code will be made publicly available at https://github.com/xyLiu339/Freqformer.
Robust demoiréing of screen-recaptured images remains challenging: moiré varies in frequency, color, and spatial support across display-camera pairs and capture conditions. Dedicated restoration networks trained on finite paired data struggle with this diversity, especially when low-frequency color banding and high-frequency stripes co-occur. We present DemoiréEdit, a content-preserving editing framework that adapts the natural-image prior of a pretrained flow-matching editor to demoiréing. First, an endpoint-supervised training objective supplements velocity matching with pixel, perceptual, and frequency-domain restoration losses. Second, a dual-scale condition-shift strategy performs global correction at low resolution, then refines the image at full resolution by shifting the denoising condition from the first-stage output to the original input for detail recovery. We also introduce DailyMoiré130, a benchmark of challenging moiré in everyday screen photography, comprising 130 smartphone captures across diverse displays with low-frequency color banding, fine high-frequency stripes, and mixed-frequency interference. On the challenging DailyMoiré130 benchmark, our method achieves the lowest residual moiré area and receives 71.3% overall-quality preference in a blind Best-of-7 study with 31 participants. We also evaluate on paired FHDMi/UHDM, reducing residual moiré confidence by 47.1%/9.3% and increasing MUSIQ by 4.3%/2.0% over the best baseline for each metric.
Shiyang Zhou, Haijin Zeng, Congpei Qiu +6
Harbin Institute of Technology, Shenzhen · Shenzhen Loop Area Institute · Xi’an Jiaotong University
Quantization-Aware Training (QAT), combined with Knowledge Distillation (KD), holds immense promise for compressing models for edge deployment. However, joint optimization for precision-sensitive image restoration (IR) to recover visual quality from degraded images remains largely underexplored. Directly adapting QAT-KD to low-level vision reveals three critical bottlenecks: teacher-student capacity mismatch, spatial error amplification during decoder distillation, and an optimization "tug-of-war" between reconstruction and distillation losses caused by quantization noise. To tackle these, we introduce Quantization-aware Distilled Restoration (QDR), a framework for edge-deployed IR. QDR eliminates capacity mismatch via FP32 self-distillation and prevents error amplification through Decoder-Free Distillation (DFD), which corrects quantization errors strictly at the network bottleneck. To stabilize the optimization tug-of-war, we propose a Learnable Magnitude Reweighting (LMR) that dynamically balances competing gradients. Finally, we design an Edge-Friendly Model (EFM) featuring a lightweight Learnable Degradation Gating (LDG) to dynamically modulate spatial degradation localization. Extensive experiments across four IR tasks demonstrate that our Int8 model recovers 96.5% of FP32 performance, achieves 442 frames per second (FPS) on an NVIDIA Jetson Orin, and boosts downstream object detection by 16.3 mAP