nemo_curator.stages.image.filters.nsfw_filter
nemo_curator.stages.image.filters.nsfw_filter
Module Contents
Classes
Data
API
Dataclass
Bases: BaseFilterStage
Stage for filtering out NSFW images using NSFWScorer model.
This class processes image batches through an NSFW scoring model to generate NSFW probability scores for each image. Images with scores above the threshold will be filtered out as NSFW content.
name
weights_path
Process an image batch to generate NSFW scores and filter by threshold.
Parameters:
task
ImageBatch containing list of ImageObject instances with pre-computed embeddings
Returns: ImageBatch
ImageBatch with filtered images that have NSFW scores below the threshold
Initialize the NSFW filtering model.
Download NSFW model weights from LAION repository.