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:
- Load images using
FilePartitioningStageandImageReaderStage - Generate image embeddings using
ImageEmbeddingStage - Apply filtering stages (for example,
ImageAestheticFilterStageorImageNSFWFilterStage) - 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.embeddingfield for each image
Imports
Available Filters
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). ImageAestheticFilterStage aesthetic_score
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). ImageNSFWFilterStage nsfw_score