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

BasicVSR++2 and Training Speed #21

Open
mikolez opened this issue Oct 26, 2022 · 12 comments
Open

BasicVSR++2 and Training Speed #21

mikolez opened this issue Oct 26, 2022 · 12 comments

Comments

@mikolez
Copy link

mikolez commented Oct 26, 2022

In the technical report for deblurring and denoising (https://arxiv.org/pdf/2204.05308.pdf), there are two versions of the BasicVSR++ for video denoising, the one which reduces the resolution by 2 (BasicVSR++2, superior performance but less speed) and by 4 (BasicVSR++4, more speed but worse performance). Current code, as I understand, implements the version which reduces the resolution by 4. How do I change the code exactly to switch to the BasicVSR++2 (the one which reduces the resolution by 2)? Or could you please share the code?

In addition, I am trying to speed up the training for denoising. I tried increasing samples_per_gpu config variable from 1 to 3 and decreasing the number of iterations from 600,000 to 200,000 (so that the amount of data that the model uses for training is the same), which helped to improve the time quite well (from 13 days to 6 days of training). Is there any other way to make the training faster without hurting the performance after the training?

Thank you!

@Dylan-Jinx
Copy link

Hello,I have a similar problem. Could you please tell me you choose dataset, is REDS or DIV2K?

@ckkelvinchan
Copy link
Owner

ckkelvinchan commented Dec 14, 2022

Hello @mikolez and @Dylan-Jinx, sorry for the (very) late reply.

@mikolez

  1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.
  2. About the training time, you may try to decrease the sequence length and further increase the batch size. I am not sure whether the performance will be better or worse. About increasing the batch size, do you obtain the similar performance?

@Dylan-Jinx

  1. DIV2K is an image dataset. We use REDS for SR, DVD/GoPro for Deblur, and DAVIS for Denoise.

@AIisCool
Copy link

@ckkelvinchan look forward to seeing the improvement BasicVSR++2 can have!

@chaojihongjing
Copy link

Hello @mikolez and @Dylan-Jinx, sorry for the (very) late reply.

@mikolez

  1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.
  2. About the training time, you may try to decrease the sequence length and further increase the batch size. I am not sure whether the performance will be better or worse. About increasing the batch size, do you obtain the similar performance?

@Dylan-Jinx

  1. DIV2K is an image dataset. We use REDS for SR, DVD/GoPro for Deblur, and DAVIS for Denoise.

@ckkelvinchan Hi, thank you very much for your excellent work. Could you please tell me the dataset for Decompress training?

@ckkelvinchan
Copy link
Owner

@ckkelvinchan look forward to seeing the improvement BasicVSR++2 can have!

Hi @AIisCool, I have uploaded the checkpoints for BasicVSR_2x. You can find the checkpoints in the same Dropbox link mentioned in README. I will try to upload the code this week, but it should be pretty trivial to modify as you only need to remove one strided conv and one pixel-shuffling.

Sorry to keep you waiting, enjoy!

@AIisCool
Copy link

AIisCool commented Feb 9, 2023

I have uploaded the checkpoints for BasicVSR_2x

Excellent thank you! I will have to wait for the code as I am not too sure what to modify exactly.

@bgalerne
Copy link

bgalerne commented Jun 6, 2023

Hi,

First thanks for your work and for sharing the code.

Is the code for using the released

basicvsr_plusplus_2x_denoise.pth

available yet ? Thank you in advance.

@zhu2bowen
Copy link

@AIisCool Do you know how to fix the code for x2 super resolutiuon now?

@ioctl-user
Copy link

1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.

So, what changes should be done in the https://github.com/ckkelvinchan/BasicVSR_PlusPlus/blob/master/configs/basicvsr_plusplus_denoise.py to use 2-times resolution model?

@lcc157
Copy link

lcc157 commented Jan 17, 2024

1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.

So, what changes should be done in the https://github.com/ckkelvinchan/BasicVSR_PlusPlus/blob/master/configs/basicvsr_plusplus_denoise.py to use 2-times resolution model?

Do you know how to fix the code for x2 super resolutiuon now?

@ioctl-user
Copy link

1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.

So, what changes should be done in the https://github.com/ckkelvinchan/BasicVSR_PlusPlus/blob/master/configs/basicvsr_plusplus_denoise.py to use 2-times resolution model?

Do you know how to fix the code for x2 super resolutiuon now?

Still not.

@pingxingxianpaixingxing

Hello @mikolez and @Dylan-Jinx, sorry for the (very) late reply.

@mikolez

  1. To reduce the resolution by 2 times instead of 4, you can just simply reduce the number of strided conv and pixel shuffle from 2 to 1. I will share the code and model soon.
  2. About the training time, you may try to decrease the sequence length and further increase the batch size. I am not sure whether the performance will be better or worse. About increasing the batch size, do you obtain the similar performance?

@Dylan-Jinx

  1. DIV2K is an image dataset. We use REDS for SR, DVD/GoPro for Deblur, and DAVIS for Denoise.

I can reduce the training time by decreasing the frame rate to 15 frames, but when I modify samples_per_gpu (which is equivalent to batch size) in train_dataloader=dict(samples_per_gpu=1, drop_last=True) in the config file, it actually increases the training time. Why is this the case?

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

10 participants