The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
text: string
metadata: string
video: string
quality: string
caption: string
to
{'video': Value('string'), 'metadata': Value('string'), 'caption': Value('string'), 'quality': Value('string')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
text: string
metadata: string
video: string
quality: string
caption: string
to
{'video': Value('string'), 'metadata': Value('string'), 'caption': Value('string'), 'quality': Value('string')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- π Folder Layout
- π Video Categories
- π οΈ Getting Started
- π Sequential Execution Pipeline
- 1. Keyframe Extraction
- 2. Audio Extraction
- 3. Speech Transcription
- 4. Video Captioning
- 5. Video OCR
- 6. CLIP Embeddings
- 7. Video Embeddings
- 8. Motion Analysis
- 9. Monocular Depth Estimation
- 10. Semantic Segmentation
- 11. Quality Filtering
- 12. Deduplication
- 13. Create Splits
- 14. Dataset Validation
- 15. Hugging Face Upload
- 1. Keyframe Extraction
- π Model Training Guide
- π License
ramanv-video-foundation
A production-grade, highly-scalable dataset engineering platform designed for collecting, processing, validating, captioning, scoring, deduplicating, and publishing generative video datasets at scale.
The repository is built to process datasets scaling up to 1M+ videos, supporting keyframe extraction, multi-VLM captioning, OCR extraction, audio/speech transcription, CLIP/video embeddings, dense optical flow motion scoring, monocular depth mapping, semantic segmentation, deduplication, quality filters, and automated uploading to the Hugging Face Hub.
π Folder Layout
ramanv-video-foundation/
βββ README.md # Dataset Card & Guide
βββ LICENSE # Apache-2.0 License
βββ pyproject.toml # Project configurations and packages
βββ requirements.txt # Python dependency list
βββ dataset_infos.json # HF Dataset features schema
βββ create_repo.sh # Bash initialization script
βββ create_repo.ps1 # PowerShell initialization script
β
βββ configs/ # Pipeline configurations (YAML)
β βββ default.yaml
β
βββ videos/ # Video folders grouped into 120 categories
β βββ marketing_ads/
β βββ product_ads/
β βββ indian_weddings/
β βββ ... (117 other folders)
β
βββ keyframes/ # Extracted keyframes (JPEG)
βββ previews/ # Low-resolution preview GIFs
βββ thumbnails/ # Primary video cover images
βββ captions/ # Generated caption JSONs
βββ metadata/ # Schema-compliant JSON files (62 fields)
βββ manifests/ # Dataset manifest files (JSON)
βββ quality/ # Quality reports
βββ embeddings/ # Precomputed CLIP/Video embedding matrices (.npy)
βββ optical_flow/ # Optical flow analysis files
βββ depth/ # Monocular depth maps
βββ segmentation/ # Semantic segmentation masks
βββ ocr/ # OCR detections with timestamps
βββ audio/ # Extracted audio tracks (.wav)
βββ transcripts/ # Transcripts with word timestamps
βββ splits/ # Train/Val/Test split records
βββ logs/ # Rotation log output files
βββ src/ # Core utility codebase
π Video Categories
The dataset organizes assets into 120 distinct category folders under videos/, including:
- Commercial & Ads:
marketing_ads,product_ads,cosmetics,real_estate,fashion,food,restaurants,electronics,unboxing,reviews. - Social Media:
social_media,instagram_reels,youtube_shorts,vlogs,interviews,gaming,talk_shows. - Culture & People:
indian_weddings,festivals,temples,villages,city_life,street_markets,office,workspace,children,elderly,pets,dancing,cooking,diy. - Visual Styles:
cinematic,drone,timelapse,slow_motion,hyperlapse,stop_motion,animation,3d,cgi,documentary,news,underwater,aerial,macro,first_person. - Physical & Motion Elements:
nature,water,fire,snow,space,sunset,night,sports,fitness,running,yoga. - Industrial & Professional:
science,technology,robots,medical,construction,agriculture,tutorials,e_learning,conferences,workshops.
π οΈ Getting Started
Clone & Install Dependencies:
pip install -r requirements.txtInitialize Folder Structure: On Linux:
bash create_repo.shOn Windows (PowerShell):
powershell -ExecutionPolicy Bypass -File .\create_repo.ps1Add Raw Video Assets: Place your raw video files (
.mp4,.mkv,.avi, etc.) inside their respective category subdirectories undervideos/.
π Sequential Execution Pipeline
To compile a fully processed and validated dataset, execute the processing scripts in the following sequence:
graph TD
A[Raw Videos] --> B[Keyframe Extraction]
A --> C[Audio Demuxing]
B --> D[Visual Captioning]
B --> E[Video OCR]
B --> F[CLIP Embeddings]
B --> G[Depth Estimation]
B --> H[Semantic Segmentation]
C --> I[Speech Transcription]
A --> J[Video Embeddings]
A --> K[Motion Analysis]
D & E & F & G & H & I & J & K --> L[Quality Filtering]
L --> M[Deduplication]
M --> N[Create Splits]
N --> O[Auditing & Validation]
O --> P[HuggingFace Upload]
1. Keyframe Extraction
Extract representative keyframes, previews, and cover thumbnails:
python scripts/extract_keyframes.py --method adaptive --num-keyframes 5
2. Audio Extraction
Extract audio tracks (WAV formats are generated to feed transcription models):
python scripts/extract_audio.py --format wav
3. Speech Transcription
Run Whisper transcription with word-level timestamps and language identification:
python scripts/transcribe_audio.py --model base --gpu-id 0
4. Video Captioning
Generate short summaries and dense captions using Vision LLMs:
python scripts/generate_video_captions.py --model Qwen/Qwen2.5-VL-7B-Instruct --gpu-id 0
5. Video OCR
Extract onscreen text overlays and associate temporal timestamps:
python scripts/video_ocr.py --languages en
6. CLIP Embeddings
Extract sequence frame embeddings using OpenCLIP or SigLIP:
python scripts/compute_clip_embeddings.py --model-family openclip --model-name ViT-H-14
7. Video Embeddings
Extract unified spatial-temporal video representations:
python scripts/compute_video_embeddings.py --model microsoft/xclip-base-patch16
8. Motion Analysis
Compute Farneback dense optical flow to categorize camera and object movement:
python scripts/motion_analysis.py --sample-fps 5.0
9. Monocular Depth Estimation
Generate keyframe depth maps for visual structure mapping:
python scripts/depth_estimation.py --model LiheYoung/depth-anything-base-hf
10. Semantic Segmentation
Segment keyframes to isolate subjects, roads, sky, and backgrounds:
python scripts/segment_video.py --model nvidia/segformer-b0-finetuned-ade-512-512
11. Quality Filtering
Score visual fidelity, filter blurry/compressed clips, detect black screen errors, and screen watermarks:
python scripts/quality_filter.py --min-width 1280 --min-height 720
12. Deduplication
Cluster and remove exact or near-duplicate assets:
python scripts/deduplicate.py --phash-threshold 8 --cosine-threshold 0.96
13. Create Splits
Generate balanced training, validation, and testing partitions:
python scripts/create_splits.py --train-ratio 0.8 --val-ratio 0.1 --test-ratio 0.1
14. Dataset Validation
Audit metadata files and manifest schemas to ensure integrity:
python scripts/validate_dataset.py
15. Hugging Face Upload
Publish the compiled dataset folder to HuggingFace Hub:
python scripts/upload_hf.py --repo-id username/ramanv-video-foundation
π Model Training Guide
1. Fine-tuning Video Diffusion Transformers (DiTs)
Modern video generative architectures (e.g., Sora, LTX-Video, CogVideoX) process video as a sequence of spatial-temporal patches.
- Dense Captioning: Always train using the
long_captionmetadata field. Large text encoders like T5-XXL parse spatial relationships, camera pan movements, and action sequences detailed in the caption. - Temporal Aspect Bucketing: Group video training items by aspect ratio class and FPS bins to avoid spatial distortion and temporal jitter during batch training.
- Motion Filtering: Use the computed
motion_scoreandcamera_motiontags. To train high-action video models, filter out clips withmotion_score < 0.2(static scenes). For camera motion editing (e.g. pan left/right condition), filter using thecamera_motioncategory labels.
2. Audio-Visual Video Generation
- Use the word-level transcripts in
transcripts/combined with the extracted audio trackaudio/to train audio-visual synchronization networks, talking-head generators, or sound-aligned video generation.
3. Depth-conditioned ControlNet
- Train depth-conditioned spatial controllers by utilizing the computed depth maps under the
depth/folder as auxiliary controls, enabling structure-consistent video generation.
π License
This repository is licensed under the Apache License 2.0. See LICENSE for more details.
- Downloads last month
- 63