Image Filters#

NeMo Curator provides filters for image curation, including aesthetic and NSFW filters. These models help you filter, score, and curate large image datasets for downstream tasks such as generative model training and dataset quality control.

How It Works#

Image filtering in NeMo Curator typically follows these steps:

  1. Load images using FilePartitioningStage and ImageReaderStage

  2. Generate image embeddings using ImageEmbeddingStage

  3. Apply filtering stages (for example, ImageAestheticFilterStage or ImageNSFWFilterStage)

  4. Continue with further processing stages or save results

Filtering stages integrate seamlessly into NeMo Curator’s pipeline architecture.

Prerequisites#

Before using filtering stages, ensure that:

  • Load images using ImageReaderStage

  • Generate image embeddings using ImageEmbeddingStage

  • Populate the ImageObject.embedding field for each image

Imports#

from nemo_curator.stages.image.filters.aesthetic_filter import ImageAestheticFilterStage
from nemo_curator.stages.image.filters.nsfw_filter import ImageNSFWFilterStage

Available Filters#

Aesthetic Filter Stage

Assess the subjective quality of images using a model trained on human aesthetic preferences. Filters images below a configurable aesthetic score threshold (0.0 to 1.0).

Aesthetic Filter
NSFW Filter Stage

Detect not-safe-for-work (NSFW) content in images using a CLIP-based filter. Removes images above a configurable NSFW probability threshold (0.0 to 1.0).

NSFW Filter