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

Pad to Size instead of center crop #40

Closed
Haydnspass opened this issue Jan 27, 2021 · 1 comment
Closed

Pad to Size instead of center crop #40

Haydnspass opened this issue Jan 27, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Haydnspass
Copy link
Collaborator

Currently we crop a frame by default to multitudes of 8 so that we can forward it through the model. Change this to a less destructive pad to size, by padding until it reaches a multitude of 8.

Idea:

tar_size = ceil(actual_size / 8) * 8
pad_to_size(tensor, tar_size)

Resources:
https://pytorch.org/docs/stable/generated/torch.nn.utils.rnn.pad_sequence.html
Use pad_sequence put an artificial tensor of target size in and only return the input tensor.

@Haydnspass Haydnspass added the enhancement New feature or request label Jan 27, 2021
@Haydnspass Haydnspass added this to the v0.10 milestone Jan 27, 2021
@Haydnspass Haydnspass self-assigned this Jan 27, 2021
@Haydnspass
Copy link
Collaborator Author

7b5f93c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant