albumentations
albumentations copied to clipboard
[Documentation] Add examples how to apply transforms to videos
We can apply the same transform to videos using additional targets
.
But no one knows about this methods => need example notebook
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. 😸
Thanks!
Inspiration - it is almost this notebook: https://albumentations.ai/docs/examples/example_multi_target/
- Video is split into frames.
- 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!
Thanks for the details @ternaus. Will make sure to check the Discord. 👌
I have started working on the example. Hopefully will have a first version by next week. :ok_hand: (The branch in my fork: https://github.com/yassineAlouini/albumentations_examples/tree/feature/videos_transforms_example)