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

make size selection not scrict #40

Closed
rom1504 opened this issue Nov 20, 2022 · 5 comments · Fixed by #87
Closed

make size selection not scrict #40

rom1504 opened this issue Nov 20, 2022 · 5 comments · Fixed by #87
Labels
refactoring v0 https://github.com/iejMac/video2dataset/issues/18

Comments

@rom1504
Copy link
Collaborator

rom1504 commented Nov 20, 2022

No description provided.

@rom1504 rom1504 added v0 https://github.com/iejMac/video2dataset/issues/18 refactoring labels Nov 20, 2022
@iejMac
Copy link
Owner

iejMac commented Nov 20, 2022

is this for allowing lower resolution and sizing up?

@rom1504
Copy link
Collaborator Author

rom1504 commented Nov 20, 2022 via email

@iejMac
Copy link
Owner

iejMac commented Dec 22, 2022

@rom1504 couldn't find any way of specifying "closest format according to resolution" but we could manually do it in python by finding:

  • worst format >= target_resolution
  • best format <= target_resolution
    and comparing which is closer using metadata in the return formats

problem with this is not sure if we want to take on the extra overhead of playing with formats again. The speedup we recently got was from not playing with formats and just trusting yt-dlp to give us the best format. To that end I suggest 2 options, would like to hear some thoughts:

  1. we try the thing I suggested earlier, test it, etc.
  2. we implement resolution subsampler and use that on the output of data reader to get exact resolution we want and move this to v1

@iejMac
Copy link
Owner

iejMac commented Dec 26, 2022

ChatGPT suggests using max_resolution with height and width and then combine with | best

@iejMac
Copy link
Owner

iejMac commented Jan 4, 2023

summarizing my thoughts on this again:

we need to make it so that users have more choices about the output dimensionality than just - what YT has or EXACT video_size x video_size. To do this we need to implement the following functionality:

  • try to pick the smallest video larger than the video_size
  • if that's not available and all videos are smaller than take the largest video, smaller than video_size
  • if some resize mode is "pad", pad the video to video_size x video_size
  • otherwise just save the smaller version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring v0 https://github.com/iejMac/video2dataset/issues/18
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants