ckkelvinchan / BasicVSR_PlusPlus

Official repository of "BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment"
Apache License 2.0
589 stars 64 forks source link

BasicVSR++2 and Training Speed #21

Open mikolez opened 1 year ago

mikolez commented 1 year ago

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 commented 1 year ago

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

ckkelvinchan commented 1 year ago

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 commented 1 year ago

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

chaojihongjing commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 10 months ago

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

ioctl-user commented 9 months ago
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 commented 8 months ago
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 commented 8 months ago
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 commented 6 months ago

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?