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

question about ref_img_sampler parameters (num_ref_imgs, frame_range, filter_key_img ) #154

Closed
fcakyon opened this issue May 11, 2021 · 5 comments

Comments

@fcakyon
Copy link
Contributor

fcakyon commented May 11, 2021

@OceanPang @GT9505 Thanks a lot for maintaining this library!

I read the related docs on these params but couldnt understand their meaning, would you tell their meaning and what they change during training:

num_ref_imgs, frame_range, filter_key_img from this config.

What is the difference between this and this as given:
num_ref_imgs=9, frame_range=9, filter_key_img=True
num_ref_imgs=2, frame_range=0, filter_key_img=True

@OceanPang
Copy link
Collaborator

OceanPang commented May 11, 2021

Hi @fcakyon, num_ref_imgs means the number of reference images you want to sample (output).
frame_range means the frame intervals to sample the images and filter_key_img means whether you will put the keyframe into the sampling candidates.
For example, a key image locates at frame t. If frame_range == 2, the sampling candidates will be the images in t-2 -> t+2. filter_key_img decides whether t exists in sampling candidates.

@fcakyon
Copy link
Contributor Author

fcakyon commented May 11, 2021

@OceanPang thanks for the fast response.

So when num_ref_imgs=2, frame_range=0, filter_key_img=True as in here, the number of reference images you want to sample (output) is 2 and sampling candidates will be the images in t -> t. How does that work out?

@OceanPang
Copy link
Collaborator

OceanPang commented Jun 3, 2021

@fcakyon Sorry for the late reply.
This seems like an implementation bug. @GT9505, can you take a look at this config?

@GT9505
Copy link
Collaborator

GT9505 commented Jun 4, 2021

The code for sampling reference images is in here.
This is a bug, which may introduce some misunderstanding, in the vid config. The filter_key_img should be False, when the training data is images rather than videos. But it don't change the output of the function, since the function directly copy the input image with num_ref_imgs times, as long as frame_range=0.
We will fix it in next PR.

@fcakyon
Copy link
Contributor Author

fcakyon commented Jun 4, 2021

@GT9505 thanks for the feedback.

@GT9505 GT9505 closed this as completed Jun 7, 2021
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

No branches or pull requests

3 participants