littletry/video-nsfw-filter

Detect NSFW content in sampled video frames with adjustable sensitivity, per-frame scores, and optional screenshots.

Public
43 runs

Video NSFW Filter

Check sampled video frames for visual NSFW content using the Stable Diffusion safety checker. Returns a JSON report and optional JPEG screenshots, without calling other Replicate models.

Usage

Upload a short video. Start with num_frames=8 and return_frames=all to inspect sampled screenshots alongside the report.

  • num_frames: 1–32 uniformly spaced samples; default 8. Multiple samples include both ends of the declared frame range; one sample selects the middle.
  • threshold_offset: default 0.02. Higher values make normal NSFW matching less strict. Scores are similarity margins, not probabilities.
  • strict_special_care: default true. Preserves stricter normal matching after a special-care match. Set false to disable that adjustment; special labels are still returned.
  • return_frames: none (default), flagged, or all.
  • include_details: default false. Enable for full scores, threshold settings, and diagnostic metadata.

Output

Returns one video-nsfw-report_*.json file and optional JPEGs. File order is not guaranteed: identify the report by filename and match screenshots using each frame’s image_filename.

The report includes nsfw_detected, checked_frames, flagged_frame_count, sampling_complete, and per-frame results with NSFW labels, special labels, frame numbers, and estimated timestamps.

Any NSFW-matched sample sets nsfw_detected=true. Special-care labels alone do not. Screenshot and detail settings do not affect detection.

Limitations

Only sampled visual frames are checked—not every frame, audio, or temporal context. A no-match result does not guarantee a safe video. Special-care labels are model predictions, not verified age or identity information.

False positives and negatives are possible. Timestamps are estimates. Intended for short videos; decoding time increases with video length.

Attribution and licenses

An unofficial adaptation of m1guelpf/cog-nsfw-filter, using the Stable Diffusion v1.5 safety checker. Not affiliated with or endorsed by the original authors.

Original code: MIT License. Model weights: CreativeML OpenRAIL-M, including its use-based restrictions.

More AI tools

Explore AI models with SeeAPI — a unified platform for multimodal generation.

Model created
Model updated