LVM-Aspect-Ratio Filter (DLC)

更新时间:
复制 MD 格式

The LVM-Aspect-Ratio Filter (DLC) component filters MP4 videos by aspect ratio, keeping only videos whose width-to-height ratio (W/H) falls within a specified range. Use this component to clean training data for video generation models by removing videos with extreme proportions that could degrade model quality.

Supported computing resources

Deep Learning Containers (DLC)

How it works

The component calculates the aspect ratio of each video as width divided by height (W/H). Videos with an aspect ratio below the minimum or above the maximum threshold are filtered out. The remaining videos — those within the specified range — are written to the output path.

Only MP4 videos are supported.

Inputs and outputs

Input ports

Use one of the following as the input:

  • Read File Data component: reads the Object Storage Service (OSS) path where training data is stored.

  • Any component in the LVM Data Processing (DLC) family.

To select the video source, configure the Video Data OSS Path parameter (see Parameters).

Output port

The component writes filtered results to the OSS directory specified in Output File OSS Path. The output includes three files:

File Description
{name}.jsonl Filtered video records. The filename is set by Output Filename.
{name}_stats.jsonl The state file.
dj_run_yaml.yaml Parameter configuration used during the run.

Parameters

Configure the component in Machine Learning Designer. The following table lists all parameters.

Tab Parameter Required Default Description
Field settings Video Data OSS Path No The OSS directory containing the video data, or the metadata file video_meta.jsonl. On the first run without an upstream component, select the OSS directory manually. After the run, video_meta.jsonl is generated in the root of the OSS bucket — select this file for subsequent runs.
Output File OSS Path Yes The OSS directory where filtering results are saved.
Output Filename Yes result.jsonl The base filename for the output file. The component generates {name}.jsonl and {name}_stats.jsonl using this value.
Parameter settings Minimum Aspect Ratio (W/H) Yes 9/21 The minimum aspect ratio to keep. Videos with W/H below this value are filtered out. Specify as a fraction, for example 9/21.
Maximum Aspect Ratio (W/H) Yes 21/9 The maximum aspect ratio to keep. Videos with W/H above this value are filtered out. Specify as a fraction, for example 21/9.
Execution tuning Number of Processes Yes 4 The number of parallel processes for filtering.
Public Resource Group No Select a CPU or GPU instance type and a Virtual Private Cloud (VPC). Use a CPU instance type to reduce costs.
Dedicated resource group No Specify the number of vCPUs, memory, shared memory, and GPUs to use.
Maximum Running Duration (seconds) No The time limit for the component run. If the run exceeds this limit, the job is terminated.