*** description: >- Image filtering tools including aesthetic and NSFW filters for dataset quality control categories: * workflows tags: * filtering * aesthetic * nsfw * quality-filtering * gpu-accelerated personas: * data-scientist-focused * mle-focused difficulty: intermediate content\_type: workflow modality: image-only *** # 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 ```python from nemo_curator.stages.image.filters.aesthetic_filter import ImageAestheticFilterStage from nemo_curator.stages.image.filters.nsfw_filter import ImageNSFWFilterStage ``` *** ## 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