The LVM-Image-Shape Filter (DLC) component filters images by resolution, discarding any image whose width or height falls outside the specified pixel range. Use this component to clean training data before running image generation model training jobs.
Supported computing resources
How it works
The component reads image data from Object Storage Service (OSS), calculates the width and height of each image in pixels, and removes any image whose dimensions fall outside the configured minimum-maximum range. Images that pass all threshold checks are written to the output path as a filtered dataset. In most cases, the component is used for the subsequent training of image generation models.
The component generates an image metadata file (meta.jsonl) in the parent directory of the path you specify in Image Data OSS Path. On subsequent runs, point directly to this file instead of the original directory to skip re-scanning the source data.
Inputs and outputs
Input ports
Use one of the following as the upstream input:
Read File Data — reads the OSS path where your training data is stored.
Image Data OSS Path — specify the OSS directory containing your images, or point directly to a previously generated
meta.jsonlmetadata file.Any image data preprocessing component.
Output port
The filtered dataset. The output path contains three files:
File | Description |
| The filtered output file. The filename is set by the Output Filename parameter (default: |
| The state file. |
| The parameter configuration snapshot used when the algorithm ran. |
Configure the component
Configure the LVM-Image-Shape Filter (DLC) component in Machine Learning Designer. The following table describes all parameters.
Tab | Parameter | Required | Default | Description |
Field Settings | Image Data OSS Path | No | — | The OSS directory containing your image data, or the path to a previously generated |
Field Settings | OSS Directory for Saving OutputData | No | — | The OSS directory where the filtering results are stored. |
Field Settings | Output Filename | No |
| The filename of the output file (without the |
Parameter Settings | Minimum Width | Yes |
| The minimum image width, in pixels. Images narrower than this value are filtered out. |
Parameter Settings | Maximum Width | Yes |
| The maximum image width, in pixels. Images wider than this value are filtered out. |
Parameter Settings | Minimum Height | Yes |
| The minimum image height, in pixels. Images shorter than this value are filtered out. |
Parameter Settings | Maximum Height | Yes |
| The maximum image height, in pixels. Images taller than this value are filtered out. |
Execution Tuning | Number of Processes | No |
| The number of parallel processes to use during filtering. |
Single-node/Multi-node | No | single-node | Single-node or multi-node mode. Default value: single-node. Multi-node mode supports only the Ray framework. | |
Select Resource Group | No | — | Select a public resource group or a resource quota (if distributed mode is used, you must set resource parameters for the head and worker nodes separately):
| |
Maximum Running Duration (seconds) | No | — | The time limit for the job, in seconds. The job is terminated if it exceeds this limit. |