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

Add BasicVSR #245

Merged
merged 10 commits into from
Apr 12, 2021
Merged

Add BasicVSR #245

merged 10 commits into from
Apr 12, 2021

Conversation

ckkelvinchan
Copy link
Member

BasicVSR: The Search for Essential Components in Video Super-Resolution and Beyond

@innerlee innerlee requested a review from Yshuo-Li April 8, 2021 11:30
@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #245 (328867a) into master (9243ffc) will increase coverage by 0.04%.
The diff coverage is 83.10%.

❗ Current head 328867a differs from pull request most recent head f7e8050. Consider uploading reports for the commit f7e8050 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #245      +/-   ##
==========================================
+ Coverage   81.31%   81.35%   +0.04%     
==========================================
  Files         156      158       +2     
  Lines        7503     7719     +216     
  Branches     1102     1141      +39     
==========================================
+ Hits         6101     6280     +179     
- Misses       1271     1296      +25     
- Partials      131      143      +12     
Flag Coverage Δ
unittests 81.35% <83.10%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmedit/models/restorers/basicvsr.py 73.49% <73.49%> (ø)
...edit/models/backbones/sr_backbones/basicvsr_net.py 88.54% <88.54%> (ø)
mmedit/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmedit/models/backbones/sr_backbones/__init__.py 100.00% <100.00%> (ø)
mmedit/models/restorers/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9243ffc...f7e8050. Read the comment docs.

Copy link
Collaborator

@Yshuo-Li Yshuo-Li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! There are two files named basicvsr.py, how about rename mmedit/models/backbones/sr_backbones/basicvsr.py as basicvsr_net.py or others?

@ckkelvinchan
Copy link
Member Author

Thanks for your contribution! There are two files named basicvsr.py, how about rename mmedit/models/backbones/sr_backbones/basicvsr.py as basicvsr_net.py or others?

Sure, I will change it to basicvsr_net.py.

@Yshuo-Li Yshuo-Li requested a review from innerlee April 9, 2021 05:21

def __init__(self, mid_channels=64, num_blocks=30, spynet_pretrained=None):

super(BasicVSRNet, self).__init__()
Copy link
Contributor

@innerlee innerlee Apr 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super().__init__()

"""

def __init__(self, in_channels, out_channels=64, num_blocks=30):
super(ResidualBlocksWithInputConv, self).__init__()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super().__init__()

"""

def __init__(self, pretrained):
super(SPyNet, self).__init__()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init

train_cfg=None,
test_cfg=None,
pretrained=None):
super(BasicVSR, self).__init__(generator, pixel_loss, train_cfg,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super

self.generator.find_unused_parameters = False

# count training steps
self.step_counter = train_cfg.get('step_counter',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal:

Add a TAIL component to the module, just like backbones and heads, and save step counters there, so that they could be automatically saved and restored.


# Note: For Vimeo-90K, we use mirror extension. Hence, the output
# sequence has 14 frames. Only center frame is kept for Vimeo-90K.
if output.size(1) == 14:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the hard-coded 14 is good

@innerlee
Copy link
Contributor

Looks good generally. Some minor comments.

@innerlee innerlee merged commit 8725d92 into open-mmlab:master Apr 12, 2021
@ckkelvinchan ckkelvinchan deleted the basicvsr branch April 12, 2021 03:13
@innerlee innerlee mentioned this pull request Apr 20, 2021
5 tasks
Yshuo-Li pushed a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
* Add BasicVSR

* fix isort

* fix isort

* rename to basicvsr_net.py

* change step_counter to a key in train_cfg

* rename and fix minor bug

* rename to BasicVSRNet

* Fix init and model
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

Successfully merging this pull request may close these issues.

3 participants