
Hugging Face Blog
· 1 min read
Build awesome datasets for video generation
(This post was authored by hlky and Sayak)
Tooling for image generation datasets is well established, with img2dataset being a fundamental tool used for large scale dataset preparation, and complemented with various community guides, scripts and UIs that cover smaller scale initiatives.
Our ambition is to make tooling for video generation datasets equally established, by creating open video dataset scripts suited for small scale, and leveraging video2dataset for large scale use cases.
“If I have seen further it is by standing on the shoulders of giants”
In this post, we provide an overview of the tooling we are developing to make it easy for the community to build their own datasets for fine-tuning video generation models. If you cannot wait to get started already, we welcome you to check out the codebase here.
Table of contents
- Tooling
- Filtering examples
- Putting this tooling to use 👨🍳
- Your Turn
Tooling
Typically, video generation is conditioned on natural language text prompts such as: "A cat walks on the grass, realistic style". Then in a video, there are a number of qualitative aspects for controllability and filtering, like so:
- Motion
- Aesthetics
- Presence of watermarks
- Presence of NSFW content
Video generation models are only as good as the data they are trained on. Therefore, these aspects become crucial when curating the datasets for training/fine-tuning.
Our 3 stage pipeline draws inspiration from works like Stable Video Diffusion, LTX-Video, and their data pipelines.
Stage 1 (Acquisition)
Like video2dataset we opt to use yt-dlp for downloading videos.
We create a script Video to Scenes to split long videos into short clips.
Stage 2 (Pre-processing/filtering)
Extracted frames
- detect watermarks with LAION-5B-WatermarkDetection
- predict an aesthetic score with improved-aesthetic-predictor
- detect presence of NSFW content with Falconsai/nsfw_image_detection
Entire video
- predict a motion score with OpenCV
Stage 3 (Processing)
Filtering examples
pwatermark |
Image |
|---|---|
| 0.69 | |
| 0.61 |
Original source
This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on huggingface.co


