The LVM-Video-text similarity filter (Deep Learning Containers) component filters out videos with low similarity. The component supports only videos in MP4 format.
Supported compute resources
Algorithm description
The component samples several video frames and then calculates the similarity between the video frames and the descriptive text in the training data. The descriptive text is the content that follows the <__dj__video> field in the sample training data file. This process filters out videos with low similarity to ensure video quality. This is often used for training subsequent video generation models.
The input data must be a file in JSON Lines (JSONL) format.
The input data format is a JSONL file. In the text field, "<__dj__video>" and "<|__dj__eoc|>" are the start and stop flags for the video description text.
{"videos":["oss://bucket_name.oss-cn-hangzhou.aliyuncs.com/video/data/video1.mp4"],"text":"<|__dj__video|> optional video caption <|__dj__eoc|>"}
{"videos":["oss://bucket_name.oss-cn-hangzhou.aliyuncs.com/video/data/video2.mp4"],"text":"<|__dj__video|><|__dj__eoc|>"}
{"videos":["oss://bucket_name.oss-cn-hangzhou.aliyuncs.com/video/data/video3.mp4"],"text":"<|__dj__video|> a person pointing to a piece of wood on the ground<|__dj__eoc|>"}
{"videos":["oss://bucket_name.oss-cn-hangzhou.aliyuncs.com/video/data/video4.mp4", "oss://bucket_name.oss-cn-hangzhou.aliyuncs.com/video/data/video5.mp4"],"text":"<|__dj__video|><|__dj__eoc|>"}The videos field specifies the OSS path of the video.
The text field contains the descriptive text mentioned in the algorithm description.
Input/Output
Input port
You can use the Read OSS Data component to read the training data file from the specified OSS path.
You can set the Video Data OSS Path parameter for this component to select the training data file.
For more information about the training data file, see Algorithm description.
Output port
The output port provides the filtering results. For more information, see the parameter description in the following table.
Configure the component
In the Designer workflow, you can add the LVM-Video-text similarity filter (DLC) component and configure its parameters in the pane that appears on the right.
Parameter Type | Parameter | Required | Description | Default Value | |
Field settings | Video Data OSS Path | No | The training data file. For more information, see Algorithm description. | None | |
OSS Path for Output File | Yes | The storage folder for the filtering results. The results include the following files:
| None | ||
Output File Name | Yes | The name of the filtering result file. | result.jsonl | ||
Parameter settings | Minimum Text-Image Similarity | Yes | The minimum text-image similarity score to keep. | 0.1 | |
Maximum Text-Image Similarity | Yes | The maximum text-image similarity score to keep. | 1 | ||
Number of Sampled Frames | Yes | The number of video frames to sample. The system uniformly samples frames from the video based on its duration for analysis. | 3 | ||
Execution tuning | Select resource group | Public resource group | No | Select node specifications, such as CPU or GPU instance types, and a virtual private cloud (VPC). This algorithm requires a GPU-accelerated instance. | None |
Dedicated resource group | No | Select the number of CPU cores, memory size, shared memory size, and number of GPU cards. | None | ||
Maximum Runtime | No | The maximum runtime of the component. The job stops if the runtime exceeds this value. | None | ||