1: # DJ-SORA
2: 
3: ---
4: 
5: Data is the key to the unprecedented development of large multi-modal models such as SORA. How to obtain and process data efficiently and scientifically faces new challenges! DJ-SORA aims to create a series of large-scale, high-quality open-source multi-modal data sets to assist the open-source community in data understanding and model training.
6: 
7: DJ-SORA is based on Data-Juicer (including hundreds of dedicated video, image, audio, text and other multi-modal data processing [operators](Operators.md) and tools) to form a series of systematic and reusable Multimodal "data recipes" for analyzing, cleaning, and generating large-scale, high-quality multimodal data.
8: 
9: This project is being actively updated and maintained. We eagerly invite you to participate and jointly create a more open and higher-quality multi-modal data ecosystem to unleash the unlimited potential of large models!
10: 
11: ![Overview](https://img.alicdn.com/imgextra/i2/O1CN01YMO2p31MsT5PKu7fh_!!6000000001490-0-tps-2134-1518.jpg)
12: 
13: ## Motivation
14: - SORA only briefly mentions using DALLE-3 to generate captions and can handle varying durations, resolutions and aspect ratios.
15: - High-quality large-scale fine-grained data helps to densify data points, aiding models to better learn the conditional mapping of "text -> spacetime token", and solve a series of existing challenges in text-to-video models:
16:   - Smoothness of visual flow, with some generated videos exhibiting dropped frames and static states.
17:   - Text comprehension and fine-grained detail, where the produced results have a low match with the given prompts.
18:   - Generated content showing distortions and violations of physical laws, especially when entities are in motion.
19:   - Short video content, mostly around ~10 seconds, with little to no significant changes in scenes or backdrops.
20: 
21: ## Roadmap
22: ### Overview
23: - [DJ-SORA](#dj-sora)
24:   - [Motivation](#motivation)
25:   - [Roadmap](#roadmap)
26:     - [Overview](#overview)
27:     - [Support high-performance loading and processing of video data](#support-high-performance-loading-and-processing-of-video-data)
28:     - [Basic Operators (video spatio-temporal dimension)](#basic-operators-video-spatio-temporal-dimension)
29:     - [Advanced Operators (fine-grained modal matching and data generation)](#advanced-operators-fine-grained-modal-matching-and-data-generation)
30:     - [Advanced Operators (Video Content)](#advanced-operators-video-content)
31:     - [DJ-SORA Data Recipes and Datasets](#dj-sora-data-recipes-and-datasets)
32:     - [DJ-SORA Data Validation and Model Training](#dj-sora-data-validation-and-model-training)
33: 
34: 
35: ### Support high-performance loading and processing of video data
36: - [✅] Parallelize data loading and storing:
37:    - [✅] lazy load with pyAV and ffmpeg
38:    - [✅] Multi-modal data path signature
39: - [✅] Parallelization operator processing:
40:    - [✅] Support single machine multicore running
41:    - [✅] GPU utilization
42:    - [✅] Ray based multi-machine distributed running
43:    - [✅] Aliyun PAI-DLC & Slurm based multi-machine distributed running
44: - [✅] Distributed scheduling optimization (OP-aware, automated load balancing) --> Aliyun PAI-DLC
45: - [WIP] Low precision acceleration support for video related operators. (git tags: dj_op, dj_efficiency)
46: - [WIP] SOTA model enhancement of existing video related operators. (git tags: dj_op, dj_sota_models)
47: 
48: ### Basic Operators (video spatio-temporal dimension)
49: - Towards Data Quality
50:   - [✅] video_resolution_filter (targeted resolution)
51:   - [✅] video_aspect_ratio_filter (targeted aspect ratio)
52:   - [✅] video_duration_filter (targeted duration)
53:   - [✅] video_motion_score_filter (video continuity dimension, calculating optical flow and removing statistics and extreme dynamics)
54:   - [✅] video_ocr_area_ratio_filter (remove samples with text areas that are too large)
55: - Towards Data Diversity & Quantity
56:    - [✅] video_resize_resolution_mapper (enhancement in resolution dimension)
57:    - [✅] video_resize_aspect_ratio_mapper (enhancement in aspect ratio dimension)
58:    - [✅] video_split_by_duration_mapper (enhancement in time dimension)
59:   - [✅] video_split_by_key_frame_mapper (enhancement in time dimension with key information focus)
60:    - [✅] video_split_by_scene_mapper (enhancement in time dimension with scene continuity focus)
61: 
62: ### Advanced Operators (fine-grained modal matching and data generation)
63: - Towards Data Quality
64:   - [✅] video_frames_text_similarity_filter (enhancement in the spatiotemporal consistency dimension, calculating the matching score of key/specified frames and text)
65: - Towards Diversity & Quantity
66:   - [✅] video_tagging_from_frames_mapper (with lightweight image-to-text models, spatial summary information from dense frames)
67:   - [✅] video_captioning_from_frames_mapper (heavier image-to-text models, generating more detailed spatial information from fewer frames)
68:   - [✅] video_tagging_from_audio_mapper (introducing audio classification/category and other meta information)
69:   - [✅] video_captioning_from_audio_mapper (incorporating voice/dialogue information; AudioCaption for environmental and global context)
70:   - [✅] video_captioning_from_video_mapper (video-to-text model, generating spacetime information from continuous frames)
71:   - [✅] video_captioning_from_summarizer_mapper (combining the above sub-abilities, using pure text large models for denoising and summarizing different types of caption information)
72:   - [ ] [WIP] video_interleaved_mapper (enhancement in ICL, temporal, and cross-modal dimensions), `interleaved_modes` include:
73:     - text_image_interleaved (placing captions and frames of the same video in temporal order)
74:     - text_audio_interleaved (placing ASR text and frames of the same video in temporal order)
75:     - text_image_audio_interleaved (alternating stitching of the above two types)
76: ### Advanced Operators (Video Content)
77: - [✅] video_deduplicator (comparing hash values to deduplicate at the file sample level)
78: - [✅] video_aesthetic_filter (performing aesthetic scoring filters after frame decomposition)
79: - [✅] Compatibility with existing ffmpeg video commands
80:   - audio_ffmpeg_wrapped_mapper 
81:   - video_ffmpeg_wrapped_mapper
82: - [✅] Video content compliance and privacy protection operators (image, text, audio):
83:   - [✅] Mosaic
84:   - [✅] Copyright watermark
85:   - [✅] Face blurring
86:   - [✅] Violence and Adult Content
87: - [ ] [TODO] (Beyond Interpolation) Enhancing data authenticity and density
88:   - Collisions, lighting, gravity, 3D, scene and phase transitions, depth of field, etc.
89:   - [ ] Filter-type operators: whether captions describe authenticity, relevance scoring/correctness of that description
90:   - [ ] Mapper-type operators: enhance textual descriptions of physical phenomena in video data
91:   - [ ] ...
92: ### DJ-SORA Data Recipes and Datasets
93: - Support for unified loading and conversion of representative datasets (other-data <-> dj-data), facilitating DJ operator processing and dataset expansion.
94:   - [✅] **Video-ChatGPT**: 100K video-instruction data: `{<question, answer, youtube_id>}`
95:   - [✅] **Youku-mPLUG-CN**: 36TB video-caption data: `{<caption, video_id>}`
96:   - [✅] **InternVid**: 234M data sample: `{<caption, youtube_id, start/end_time>}`
97:   - [✅] **MSR-VTT**: 10K video-caption data: `{<caption, video_id>}`
98:   - [✅] ModelScope's datasets integration
99:   - [✅] VideoInstruct-100K, Panda70M, ......
100: - [ ] Large-scale high-quality DJ-SORA dataset
101:   - [✅] (Data sandbox) Building and optimizing multimodal data recipes with DJ-video operators (which are also being continuously extended and improved).
102:   - [✅] Continuous expansion of data sources: open-datasets, Youku, web, ...
103:   - [ ] Large-scale analysis, cleaning, and generation of high-quality multimodal datasets based on DJ recipes (OpenVideos, ...)
104:     - [WIP] broad scenarios, high-dynamic
105:   - ...
106: 
107: ### DJ-SORA Data Validation and Model Training
108:   - [ ] Exploring and refining the collaborative development of multimodal data and model, establishing benchmarks and insights. [paper](https://arxiv.org/abs/2407.11784)
109:   - [ ] [WIP] Integration of SORA-like model training pipelines
110:     - [EasyAnimate](https://github.com/aigc-apps/EasyAnimate)
111:     - [✅] [T2V](https://t2v-turbo.github.io/)
112:     - [✅] [V-Bench](https://vchitect.github.io/VBench-project/)
113:     - ...
114:   - [✅] (Model-Data sandbox) With relatively small models and the DJ-SORA dataset, exploring low-cost, transferable, and instructive data-model co-design, configurations and checkpoints. 
115:   - [ ] [WIP] Training SORA-like models with DJ-SORA data on  larger scales and in more scenarios to improve model performance.
116:     - [✅] Data-Juicer-T2V, [V-Bench Top1 model](https://huggingface.co/datajuicer/Data-Juicer-T2V-v2). Please refer [here](https://datajuicer.github.io/data-juicer-sandbox/en/main/index.html) for more details.
117:     - ...
118:   - ...