zhengchen1999 / DAT

PyTorch code for our ICCV 2023 paper "Dual Aggregation Transformer for Image Super-Resolution"
Apache License 2.0
386 stars 37 forks source link

PerceptualLoss #3

Open Phhofm opened 1 year ago

Phhofm commented 1 year ago

Thank you for your work, it seems interesting :)

I just had some questions (since I wanted to train/finetune a model):

Would be thankful for answers :)

zhengchen1999 commented 1 year ago

Hi. Thanks for your interest in our work.

Thank you for your valuable questions. And if you have any other problem, please let us know. Thanks.

Phhofm commented 1 year ago

Thank you, I was able to make a finetune on your official DAT_x4 model. Used AdamW with L1Loss, PercetualLoss, ColorLoss and GanLoss together with (a little bit of) otf jpg compression, blur and resize.

Examples: Imgsli1 (generated with onnx file) Imgsli2 (generated with onnx file) Imgsli (generated with testscript on the three test images in dataset/single with pth file)

Model files (pth file, onnx conversions, model information, and my failed attempts) can be found in this google drive folder it someone wanted to try it out.

For convenience the direct file links: Download pth file (~295MB) Download onnx file (~85.8MB)

Phhofm commented 1 year ago

PS I wanted to show another DAT finetune I trained (and had just released) on the FFHQ (Flickr-Faces-HQ) dataset, for 4x upscaling faces:

Model Name: 4xFFHQDAT

Examples: Imgsli1 Imgsli2 Imgsli3 Imgsli4 Imgsli5 Imgsli6 Imgsli7

Download pth file (~295MB) Download fp32 onnx file (~85.8MB)

And I also made a variant of it that can handle low quality input:

Model Name: 4xFFHQLDAT

Examples: Imgsli1 Imgsli2 Imgsli3

Download pth file (~295MB) Download fp32 onnx (~85.8MB)

eisneim commented 1 year ago

@Phhofm thank you for sharing those onnx files! the results are looking pretty good!

shiyuleixia commented 1 year ago

PS I wanted to show another DAT finetune I trained (and had just released) on the FFHQ (Flickr-Faces-HQ) dataset, for 4x upscaling faces:

Model Name: 4xFFHQDAT

Examples: Imgsli1 Imgsli2 Imgsli3 Imgsli4 Imgsli5 Imgsli6 Imgsli7

Download pth file (~295MB) Download fp32 onnx file (~85.8MB)

And I also made a variant of it that can handle low quality input:

Model Name: 4xFFHQLDAT

Examples: Imgsli1 Imgsli2 Imgsli3

Download pth file (~295MB) Download fp32 onnx (~85.8MB)

@Phhofm Hi,I wonder how to convert this model from pth to onnx,TKS