-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Feature] Add BasicVSR++ #451
Conversation
Codecov Report
@@ Coverage Diff @@
## master #451 +/- ##
==========================================
- Coverage 80.92% 80.54% -0.38%
==========================================
Files 189 190 +1
Lines 10149 10338 +189
Branches 1495 1533 +38
==========================================
+ Hits 8213 8327 +114
- Misses 1721 1781 +60
- Partials 215 230 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
o1, o2, mask = torch.chunk(out, 3, dim=1) | ||
|
||
# offset | ||
offset = 10 * torch.tanh(torch.cat((o1, o2), dim=1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this number is 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may give some comments on this number. Otherwise, you can make it user-defined but offer a default value of 10.
|
||
return flows_forward, flows_backward | ||
|
||
def propagate(self, feats, flows, module): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module_name
may be better.
"""Compute the output image given the features. | ||
|
||
Args: | ||
lqs (tensor): Input LR images with shape (n, t, c, h, w). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is lqs
short for? You may specify the meaning of lqs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@innerlee may have a look. |
| [basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bi](/configs/restorers/basicvsr/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bi.py) | 31.0126/0.8804 | **37.7864/0.9500** | **27.7882/0.8401** | 33.1211/0.9270 | 33.8972/0.9195 | 23.6086/0.7033 | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bi_20210305-4ef437e2.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bi_20210305_141254.log.json) | | ||
| [basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bd](/configs/restorers/basicvsr/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bd.py) | 29.2041/0.8528 | 34.7248/0.9351 | 26.4377/0.8074 | **40.7216/0.9722** | **38.2054/0.9550** | **29.0400/0.8753** | [model](https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bd_20210305-ab315ab1.pth) \| [log](https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_300k_vimeo90k_bd_20210305_140921.log.json) | | ||
|
||
## NTIRE 2021 checkpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap L29-39 to a <details>
section
def test_basicvsr_plusplus(): | ||
"""Test BasicVSR++.""" | ||
|
||
# gpu (DCN can only be tested in GPUs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can DCN be turned off, and be tested on cpu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can, but we need to create another argument to specify whether to skip the alignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is one of the core parts of BasicVSR++, I am not sure whether adding this option is meaningful or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to test it haha. It does not have to do with what basicvsr thinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or can you implement a cpu version of DCN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or can you implement a cpu version of DCN?
Not sure if I can do it in a short time haha. One workaround for now is to add the argument to skip alignment, and set it to False.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you can check the coverage report to see if more parts could be tested. 80% is a healthy line
@ckkelvinchan Please add this method to the repo's README |
* Add BasicVSR++ * Update * Add max_residue_magnitude as an argument * Add configuration files and README * Modify README * Modify README * Raise error about DCN if CUDA is not available * Skip alignment in CPU mode
Paper: BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment
3 champions + 1 runner-up in NTIRE 2021.