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

Support start_index in GenerateSegmentIndices #338

Merged
merged 2 commits into from May 31, 2021

Conversation

ckkelvinchan
Copy link
Member

Motivation

As mentioned in #335, the existing video_restoration_demo does not support sequences whose start frame index is not 0. This may cause problems in custom video sequences.

Modification

This PR changes the behavior of the function GenerateSegmentIndices so that the image names can now start from number other than 0. Changes are:

  1. Instead of assuming the start frame index is 0, we add the value start_idx to the extracted indices.
  2. video_restoration_demo and video_restoration_inference are modified.

Note: The image names must be consecutive. That means, a sequence with images 0000.png, 0004.png, 0020.png is not supported.

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #338 (8700796) into master (6238c69) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #338   +/-   ##
=======================================
  Coverage   80.03%   80.04%           
=======================================
  Files         178      178           
  Lines        9332     9334    +2     
  Branches     1357     1358    +1     
=======================================
+ Hits         7469     7471    +2     
  Misses       1674     1674           
  Partials      189      189           
Flag Coverage Δ
unittests 80.03% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
mmedit/apis/restoration_video_inference.py 21.42% <100.00%> (ø)
mmedit/datasets/pipelines/augmentation.py 97.06% <100.00%> (+0.01%) ⬆️
...ls/components/stylegan2/generator_discriminator.py 84.93% <0.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 6238c69...8700796. Read the comment docs.

@innerlee innerlee merged commit 8473c2b into open-mmlab:master May 31, 2021
@ckkelvinchan ckkelvinchan deleted the start_idx branch June 1, 2021 03:47
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.

None yet

3 participants