Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I train swinIR with my own dataset? #147

Open
MingyuLau opened this issue Sep 17, 2022 · 7 comments
Open

How can I train swinIR with my own dataset? #147

MingyuLau opened this issue Sep 17, 2022 · 7 comments

Comments

@MingyuLau
Copy link

I want to train SwinIR using my own HR images and LR images, however it seems that it will raise error about the image size.
My own HR and LR has the same size.

@phongle091
Copy link

I also have the same problem, I think it's some problem with odd resolution values, as I train a few even values examples and no problems raised at all. Please help me if you have solved this problem, thank you.

@Bhavik-Ardeshna
Copy link

@MingyuLau @phongle091 I am facing the same issue. Please help me if you have solved this issue. Thank you.

@yuanzhi-zhu
Copy link
Collaborator

@phongle091 the odd value issue is mostly related to the unet structure which has down sampling and up sampling operation. Just like 7//2*2=6 in Python.
A quick fix is to do preprocessing by resizing the images or cropping them to the right resolution.

@Maatrika-P
Copy link

Maatrika-P commented Jul 10, 2024

Hello, I actually trained the swinir model on my own satellite dataset, with x2 scaling for the task being "real_sr". I trained the psnr model first with main_train_psnr.py with low resolution image size = 256 and high resolution image size = 512(since x2 scaling) and linked the weights to the gan training json to continue training with the same train script, but when i am trying to test from the main_test_swinir.py, there are shape mismatch issues.

what do i do? do i need to make changes in the test script to adapt to my trained configurations?

@danganyuan
Copy link

运行main_train_psnr.py得到三个.pth文件 请问这三个哪一个是所需要的模型呢 我应该如何使用这三个模型

@danganyuan
Copy link

After running main_train_psnr.py, three .pth files are generated. Which one of these is the required model, and how should I use these three models?

@yuanzhi-zhu
Copy link
Collaborator

use either G or E will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants