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

[Feature] Support video input and output in restoration demo #622

Merged
merged 8 commits into from
Dec 29, 2021

Conversation

ckkelvinchan
Copy link
Member

Motivation

When inferencing a video model, one would need to convert the video (e.g., .mp4) to images, and then load the images. This causes inconvenience if one wants to quickly try the result.

Modification

This PR supports using video format as input and output. One could simply replace the directory with the path to the video.

Note: When saving the outputs as a video, it introduces video compression, which would lower the visual quality.

@ckkelvinchan ckkelvinchan added need test status/WIP work in progress normally labels Nov 23, 2021
@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #622 (b67cf98) into master (8dce073) will decrease coverage by 0.11%.
The diff coverage is 35.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #622      +/-   ##
==========================================
- Coverage   80.69%   80.57%   -0.12%     
==========================================
  Files         199      199              
  Lines       11383    11409      +26     
  Branches     1822     1830       +8     
==========================================
+ Hits         9185     9193       +8     
- Misses       1915     1932      +17     
- Partials      283      284       +1     
Flag Coverage Δ
unittests 80.55% <35.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
mmedit/apis/restoration_video_inference.py 17.85% <16.12%> (+1.19%) ⬆️
mmedit/datasets/pipelines/random_degradations.py 94.78% <100.00%> (+0.10%) ⬆️
...ls/components/stylegan2/generator_discriminator.py 84.93% <0.00%> (-1.21%) ⬇️

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 09104fd...b67cf98. Read the comment docs.

@ckkelvinchan ckkelvinchan removed need test status/WIP work in progress normally labels Dec 3, 2021
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.

Several lines are not covered by tests

@ckkelvinchan
Copy link
Member Author

Several lines are not covered by tests

It is tested in GPU only. Therefore it is not revealed in the CI report.

@ckkelvinchan ckkelvinchan merged commit 4f814a8 into master Dec 29, 2021
@ckkelvinchan ckkelvinchan deleted the video_demo branch December 29, 2021 03:58
Yshuo-Li pushed a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
Yshuo-Li pushed a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
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.

2 participants