image_shape_filter

Filters images by width and height dimensions using Python image processing libraries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps filter images based on their shape dimensions, enabling users to retain or exclude images based on width and height criteria.

Core Features & Use Cases

  • Image Size Filtering: Retain or exclude images based on specified width and height ranges.
  • Multiple Filtering Strategies: Support 'any' or 'all' strategies to meet various user requirements.
  • Use Case: When working with image datasets, you may want to focus on images with specific dimensions for further processing or analysis.

Quick Start

Use the image_shape_filter skill to filter images in the 'example_input.json' file by width between 400 and 800 pixels and height between 400 and 800 pixels.

Frequently Asked Questions about image_shape_filter

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

FAQPage Schema
How do I filter images by width and height dimensions in a dataset?

Image shape filtering allows you to specify width and height pixel ranges, retaining or excluding images in a dataset that fall within or outside your defined criteria.

Can I pre-screen image data based on specific dimension ranges?

Yes, image pre-screening is possible by setting minimum and maximum values for width and height to validate image shapes before downstream processing.

Does data_juicer support filtering images by size for data pre-screening?

Yes, this Skill requires data_juicer for processing image data and uses Python libraries to execute image shape filtering based on specified width and height parameters.

What strategies can I use to filter images when multiple dimension criteria are set?

When filtering images with multiple dimension criteria, you can choose between the 'any' strategy to match at least one condition or the 'all' strategy to require every width and height condition to be met.

How do I set up image shape validation to keep images between 400 and 800 pixels?

To set up image shape validation, provide an input JSON file and configure the Skill to filter for images with width and height both between 400 and 800 pixels using the 'all' strategy.