desert-ant-labs/moderator

Model

Moderator

6

9 commits

1 linked in READMEs

updated Oct 16, 2026

See the code

README

Moderator

Flag nudity before upload or display.

On-device NSFW image detection, trained only on licensed and synthetic data.

Score an image from 0 to 1 for nudity or sexual activity. Threshold it (default 0.5) and you have your answer. Tuned to pass real swimwear and lingerie photos while flagging real nude and sexual content. The model is small (9.7MB on Apple via Core ML, 9.2MB via LiteRT elsewhere) and runs fully on device, with images never leaving it.

Per-region detail (nipples, genitals, buttocks, nudity, sexual activity) is available for policies that need it, for example allow-topless.

PlatformsiOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node
Weightsv1.0.0

Install

Swift (requirements)

.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "4.0.0")

Then add the Moderator product to your target.

Kotlin (requirements)

implementation("ai.desertant:moderator:4.0.0")

JavaScript (requirements)

npm i @desert-ant-labs/moderator @litertjs/core   # browser
npm i @desert-ant-labs/moderator                  # Node, prebuilt native core

Files

FileFormatSizeContents
moderator.mlmodelcCompiled Core ML (int8)9.7MBReady to load on Apple platforms (used by the Swift SDK)
moderator.tfliteLiteRT / TFLite (int8)9.2MBRuns on Android, Linux, Windows, Node, and the web (downloaded on demand by the Kotlin and JavaScript SDKs)

Inputs and outputs

  • Input: an image. The SDKs take platform images, files, or raw RGB(A) pixels.
  • Output: an NSFW score from 0 to 1 and a yes/no decision at your threshold (default 0.5), plus a confidence per region: nipples, genitals, buttocks, nude, and sexAct. The score is the highest region the policy counts; allow-topless leaves out nipples.

Trade speed for recall with the SDK's quality setting:

QualityRecallSpecificityUse for
fast74%97%Video frames; sampling across frames recovers recall
balanced84%95%Higher per-frame recall
accurate (default)88%94%Single images

Training data: 100% clean

This is the rare NSFW model with fully controlled data provenance. Nothing is scraped from the open internet. Every training image is either permissively licensed (public domain or Creative Commons) or generated in-house. Positives are drawn from public-domain fine art and museum open-access collections (classical nudes in painting, sculpture, and photography), historic and documentary photography, and openly-licensed imagery, plus photorealistic images generated with generative image models.

Clean, controlled provenance end to end is unusual for an NSFW classifier, where scraped datasets of unknown origin are the norm. It means no copyright or licensing exposure, and a model you can put in a commercial product with confidence.

Evaluation

Held-out evaluation set (464 images, 75% SFW / 25% NSFW), scored on the single NSFW score at threshold 0.5 with the default accurate quality.

MetricModeratorNudeNet
Recall (catches NSFW)87.8%82.6%
Specificity (SFW passed)93.7%87.1%
False-block rate (SFW flagged)6.3%12.9%

Moderator beats NudeNet on both recall and precision, and flags about half as many SFW images.

Limitations

  • Adult-content classifier only. Subjects rendered as minors are out of scope by design; the training corpus excludes them and the model is not validated for that population.
  • Accuracy is lower on difficult images (crowded scenes, extreme close-ups, low light, or low resolution) than on clear, well-lit ones.
  • Anime/hentai and heavily-censored (mosaic) content are out of scope; the model is trained on photoreal.
  • This is a content-moderation aid, not a legal determination. Use with human review for any decision the model is the only gate on.

License

Desert Ant Labs Source-Available License. Free for most apps, and a commercial license is required at scale. Full terms are at the link. Licensing: [email protected].

See THIRD_PARTY_NOTICES.md.

Citation

@software{moderator_2026,
  title  = {Moderator: On-device NSFW image detection, trained only on licensed and synthetic data},
  author = {Desert Ant Labs},
  year   = {2026},
  url    = {https://huggingface.co/desert-ant-labs/moderator},
}

© 2026 Desert Ant Labs · https://desertant.com

content-moderation
core-ml
image
image-classification
litert
not-for-all-audiences
nsfw
on-device
tflite

desert-ant-labs/moderator

Model

Moderator

6

9 commits

1 linked in READMEs

updated Oct 16, 2026

See the code

README

Moderator

Flag nudity before upload or display.

On-device NSFW image detection, trained only on licensed and synthetic data.

Score an image from 0 to 1 for nudity or sexual activity. Threshold it (default 0.5) and you have your answer. Tuned to pass real swimwear and lingerie photos while flagging real nude and sexual content. The model is small (9.7MB on Apple via Core ML, 9.2MB via LiteRT elsewhere) and runs fully on device, with images never leaving it.

Per-region detail (nipples, genitals, buttocks, nudity, sexual activity) is available for policies that need it, for example allow-topless.

PlatformsiOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node
Weightsv1.0.0

Install

Swift (requirements)

.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "4.0.0")

Then add the Moderator product to your target.

Kotlin (requirements)

implementation("ai.desertant:moderator:4.0.0")

JavaScript (requirements)

npm i @desert-ant-labs/moderator @litertjs/core   # browser
npm i @desert-ant-labs/moderator                  # Node, prebuilt native core

Files

FileFormatSizeContents
moderator.mlmodelcCompiled Core ML (int8)9.7MBReady to load on Apple platforms (used by the Swift SDK)
moderator.tfliteLiteRT / TFLite (int8)9.2MBRuns on Android, Linux, Windows, Node, and the web (downloaded on demand by the Kotlin and JavaScript SDKs)

Inputs and outputs

  • Input: an image. The SDKs take platform images, files, or raw RGB(A) pixels.
  • Output: an NSFW score from 0 to 1 and a yes/no decision at your threshold (default 0.5), plus a confidence per region: nipples, genitals, buttocks, nude, and sexAct. The score is the highest region the policy counts; allow-topless leaves out nipples.

Trade speed for recall with the SDK's quality setting:

QualityRecallSpecificityUse for
fast74%97%Video frames; sampling across frames recovers recall
balanced84%95%Higher per-frame recall
accurate (default)88%94%Single images

Training data: 100% clean

This is the rare NSFW model with fully controlled data provenance. Nothing is scraped from the open internet. Every training image is either permissively licensed (public domain or Creative Commons) or generated in-house. Positives are drawn from public-domain fine art and museum open-access collections (classical nudes in painting, sculpture, and photography), historic and documentary photography, and openly-licensed imagery, plus photorealistic images generated with generative image models.

Clean, controlled provenance end to end is unusual for an NSFW classifier, where scraped datasets of unknown origin are the norm. It means no copyright or licensing exposure, and a model you can put in a commercial product with confidence.

Evaluation

Held-out evaluation set (464 images, 75% SFW / 25% NSFW), scored on the single NSFW score at threshold 0.5 with the default accurate quality.

MetricModeratorNudeNet
Recall (catches NSFW)87.8%82.6%
Specificity (SFW passed)93.7%87.1%
False-block rate (SFW flagged)6.3%12.9%

Moderator beats NudeNet on both recall and precision, and flags about half as many SFW images.

Limitations

  • Adult-content classifier only. Subjects rendered as minors are out of scope by design; the training corpus excludes them and the model is not validated for that population.
  • Accuracy is lower on difficult images (crowded scenes, extreme close-ups, low light, or low resolution) than on clear, well-lit ones.
  • Anime/hentai and heavily-censored (mosaic) content are out of scope; the model is trained on photoreal.
  • This is a content-moderation aid, not a legal determination. Use with human review for any decision the model is the only gate on.

License

Desert Ant Labs Source-Available License. Free for most apps, and a commercial license is required at scale. Full terms are at the link. Licensing: [email protected].

See THIRD_PARTY_NOTICES.md.

Citation

@software{moderator_2026,
  title  = {Moderator: On-device NSFW image detection, trained only on licensed and synthetic data},
  author = {Desert Ant Labs},
  year   = {2026},
  url    = {https://huggingface.co/desert-ant-labs/moderator},
}

© 2026 Desert Ant Labs · https://desertant.com

content-moderation
core-ml
image
image-classification
litert
not-for-all-audiences
nsfw
on-device
tflite