bahjat-kawar / ddrm-jpeg

JPEG Artifact Correction using Denoising Diffusion Restoration Models -- Official Code Repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't get similar results

zt706 opened this issue · comments

commented

hi,
What is the specific command for the results of qf=2 and qf=5 in the example figure? I can't get similar results to yours

my cmd1:
python main.py --ni --config imagenet_256.yml --doc imagenet -i imagenet --deg quant --num_avg_samples 8
output1:
File "ddrm-jpeg/functions/jpeg_torch.py", line 49, in general_quant_matrix
s = (5000 / qf) if qf < 50 else (200 - 2 * qf)
ZeroDivisionError: division by zero

my_cmd2:
python main.py --ni --config imagenet_256.yml --doc imagenet -i imagenet --deg jpeg80 --num_avg_samples 8
The output image is almost indistinguishable from the original image
 
Default parameters: --eta 1.0 --etaB 0.4 Do you need to modify

For QF=2, you should use --deg jpeg2.