image_aspect_ratio_filter

Filter images by minimum and maximum aspect ratio constraints.

541|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill image-aspect-ratio-filter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image_aspect_ratio_filter
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/image_aspect_ratio_filter
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill image-aspect-ratio-filter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires data_juicer, and includes scripts (resource) components.

What problem does it solve?

This Skill helps users filter images based on their aspect ratio, ensuring that only images within a specified range are retained.

Core Features & Use Cases

  • Aspect Ratio Filtering: Select images that meet the user-defined minimum and maximum aspect ratio.
  • Multiple Image Filtering Strategy: Choose between filtering images where any or all must meet the criteria.
  • Use Case: When a user needs to filter out images that are too wide or too tall, or when looking for a specific image format like portrait or landscape.

Quick Start

Use the image_aspect_ratio_filter skill to filter images with a width-to-height ratio between 1.5 and 2.0 from the input file 'images.json'.

Frequently Asked Questions about image_aspect_ratio_filter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter images by aspect ratio for a data processing workflow?

Filtering images by aspect ratio involves specifying minimum and maximum width-to-height constraints to retain only matching images. This standardizes image dimensions for subsequent analysis or display workflows.

Can I keep only landscape or portrait images from a dataset using aspect ratio filtering?

Yes, you can isolate landscape or portrait images by setting specific minimum and maximum width-to-height ratio thresholds. This filters out images that are too wide or too tall for your requirements.

What is the strategy for filtering multiple images against a single aspect ratio criteria?

Multiple image filtering strategies allow you to choose whether any or all images must meet the specified aspect ratio criteria. This controls whether the entire batch is retained or discarded based on your constraints.

Does image aspect ratio filtering require data_juicer to process image metadata?

Yes, aspect ratio filtering requires data_juicer for filtering and processing image metadata. It evaluates dimensions within input files like 'images.json' to apply the specified ratio constraints.

How do I set up aspect ratio constraints to remove extreme image dimensions?

Remove extreme dimensions by defining a specific aspect ratio range, such as between 1.5 and 2.0. The filter processes image metadata and automatically excludes any images falling outside this boundary.