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

[Documentation] Add examples how to apply transforms to videos #1561

Open
ternaus opened this issue Mar 5, 2024 · 4 comments
Open

[Documentation] Add examples how to apply transforms to videos #1561

ternaus opened this issue Mar 5, 2024 · 4 comments
Labels

Comments

@ternaus
Copy link
Collaborator

ternaus commented Mar 5, 2024

We can apply the same transform to videos using additional targets.

But no one knows about this methods => need example notebook

@yassineAlouini
Copy link

Hello. I will have some free time starting the week of the 15th April and I would like to help with this.
What type of open-source video dataset you would suggest for creating the tutorial notebook?
Is there a similar notebook to get inspiration?
Thanks. 😸

@ternaus
Copy link
Collaborator Author

ternaus commented Apr 4, 2024

Thanks!

Inspiration - it is almost this notebook: https://albumentations.ai/docs/examples/example_multi_target/

  1. Video is split into frames.
  2. For every frame we use example from the notebook to apply augmentation pipeline with the same parameters (could be very complicated). In the example about multi target we have:
import albumentations as A

transform = A.Compose(
    [HorizontalFlip(p=0.5), ...],
    additional_targets={
        'image1': 'image',
        'image2': 'image',
        ...
        'imageN': 'image',

        'bboxes1': 'bboxes',
        'bboxes1': 'bboxes',
        ...
        'bboxesM': 'bboxes',

        'keypoints1': 'keypoints',
        'keypoints2': 'keypoints',
        ...
        'keypointsK': 'keypoints',

        'mask1': 'mask',
        'mask2': 'mask',
        ...
        'maskL': 'mask'
    })
)

but make N = M = L = K = <the number of frames> and the definition of additional_targets dictionary could be done as a one liner.

For video - probably person / people dancing. This would allow to visualize on image, mask, bounding boxes + keypoints


Way that we create examples =>
we create notebooks to: https://github.com/albumentations-team/albumentations_examples and they are authomatically parsed to the documentation to the website.

If you create such a notebook and commit it to the albumentations_examples it would be great.

P.S. If you have questions - feel free to ask here, ask in Discord, or just ping me in DM

Thank you for helping!

@yassineAlouini
Copy link

Thanks for the details @ternaus.
Will make sure to check the Discord. 👌

@yassineAlouini
Copy link

I have started working on the example. Hopefully will have a first version by next week. 👌
(The branch in my fork: https://github.com/yassineAlouini/albumentations_examples/tree/feature/videos_transforms_example)

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

No branches or pull requests

2 participants