Downloads · 30 days
0
MingSafeR/xyran-image-safety
xyran-image-safety is a image classification model from MingSafeR. Use it when you need a label for an image. It is set up for onnx. The card lists the license as mit.
Pinned ONNX image-safety model used by the Xyran local-first moderation SDK.
Downloads · 30 days
0
Access
Public
Updated Sep 7, 2026
Repo size
23.7 MB
Likes
0
Public
Click a slice to open those files.
.onnx23.7 MB · 100%
From the Hugging Face model README
Pinned ONNX image-safety model used by the Xyran local-first moderation SDK.
Xyran is a Python content-moderation SDK designed for local inference: no Xyran API key and no cloud moderation request are required.
For most users, the supported integration is the Xyran package rather than calling the ONNX file directly:
pip install xyran
xyran scan image.jpg
Python:
from xyran import Moderator
mod = Moderator()
result = mod.scan("image.jpg")
print(result.decision) # ALLOW / REVIEW / BLOCK
print(result.scores.sexual)
print(result.scores.graphic)
print(result.scores.safe)
Xyran also provides frame-aware animated GIF/WebP moderation, true ONNX batching, one-shot Folder Scan, resumable Dataset Mode, JSON/Markdown/TXT/CSV folder reports, and JSONL/CSV dataset manifests.
The current Xyran free SDK uses a pinned ONNX model from:
Upstream repository: OwenElliott/image-safety-classifier-s
Pinned commit: eb8b0b203952b70db191e990217174af4af39767
Upstream file: onnx/image-safety-classifier-s.onnx
Expected size: 23,701,765 bytes
SHA256: fef443ed68ae25ed693b6fef9e456071692ed3963cff4168acb39c3de6f017e7
Upstream license metadata: MIT
The classifier was not authored or trained by the Xyran project. Xyran pins, verifies, redistributes, and integrates the model with its local SDK/runtime layer. The upstream repository remains the authoritative source for the model's original authorship.
The model is an image classifier with three output classes in this order:
NSFL
NSFW
SFW
Xyran maps them to:
NSFL -> graphic
NSFW -> sexual
SFW -> safe
The SDK then applies configurable moderation thresholds and returns:
ALLOW
REVIEW
BLOCK
Example result shape:
{
"scores": {
"sexual": 0.08,
"graphic": 0.02,
"safe": 0.90
},
"decision": "ALLOW"
}
The numbers above are an example of the output structure, not a benchmark claim.
The pinned ONNX graph expects:
[batch, 3, 224, 224] float32
The Xyran SDK handles preprocessing and batching. For reproducible Xyran results, use the SDK rather than reimplementing preprocessing from the model file alone.
Default Xyran preprocessing:
BlurPad + Lanczos3
Optional Xyran preprocessing:
Warp + Linear
Xyran 1.3 adds a dedicated large-dataset workflow:
xyran scan-dataset ./dataset --output ./runs/train-clean
It can provide:
stat or SHA-256 file fingerprints;Example:
xyran scan-dataset ./dataset \
--output ./runs/train-clean \
--batch-size 64 \
--fingerprint sha256 \
--manifest-formats jsonl csv
Xyran supports CPU and NVIDIA CUDA ONNX Runtime on supported systems.
A fresh environment can preview the selected runtime with:
xyran setup-runtime --dry-run
Then install it:
xyran setup-runtime
For deterministic environments:
pip install "xyran[cpu]"
# or
pip install "xyran[gpu]"
The model itself is bundled in published Xyran release artifacts, so Xyran does not need to download this model during inference.
Potential uses include:
This model is probabilistic and can make mistakes. It should not be treated as a perfect determination of whether content is safe, legal, harmful, consensual, or appropriate in a particular jurisdiction/context.
Performance can vary across:
Xyran's animated-media smart sampling is also non-exhaustive for long GIF/WebP
files unless sampling="all" is explicitly selected.
For high-impact moderation decisions, evaluate on representative data, calibrate thresholds, and use additional safeguards or human review where appropriate.
The Xyran project does not currently publish invented or unverified accuracy numbers for this model. A reproducible evaluation/benchmark workflow is planned for a later Xyran release.
Until then, users should benchmark the model against data representative of their own application.
The pinned upstream model repository reports MIT license metadata. Preserve upstream attribution and license terms when redistributing the model.
The Xyran SDK is a separate project licensed under Apache-2.0:
https://github.com/mingshenhk/xyran
SDK/runtime issues:
https://github.com/mingshenhk/xyran/issues
Please do not post private or sensitive media publicly just to demonstrate a classification error.