Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
text-generation-inference
VisionGuardrail
JSON
image-classification
content-safety
content-moderation
multimodal
safety-classifier
guardrail
visual-safety
multimodal-content-filter
mmcf
v1.0
conversational
Run this model with HF Jobs
Run prithivMLmods/VisionGuardrail-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/prithivMLmods/VisionGuardrail-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/prithivMLmods/VisionGuardrail-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/prithivMLmods/VisionGuardrail-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/prithivMLmods/VisionGuardrail-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use prithivMLmods/VisionGuardrail-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/VisionGuardrail-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/VisionGuardrail-4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("prithivMLmods/VisionGuardrail-4B") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/VisionGuardrail-4B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/VisionGuardrail-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/VisionGuardrail-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VisionGuardrail-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/VisionGuardrail-4B
- SGLang
How to use prithivMLmods/VisionGuardrail-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/VisionGuardrail-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VisionGuardrail-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/VisionGuardrail-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/VisionGuardrail-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prithivMLmods/VisionGuardrail-4B with Docker Model Runner:
docker model run hf.co/prithivMLmods/VisionGuardrail-4B
Update README.md
Browse files112344567891010111213121314151617141516172118192324202122232428292526273128293031323334383536373843394041464748494243444546475148495051525657535455565761625859606162676869707172737475636465776667686981707183727385747576778978799180818283849596858687888999100909192102939495969710610710898991001011021101031121131041051061071081091101111121131191141151161171231181191201211221231241251261271251281291301311321331301341351361371381391401411421431441451461361471481381491501511521531541551561571581591601611621441451461471631641651661671681691521531541551561701711721731741751761621771781641791801811671821831841851863 unmodified lines1901911921931941781791951961971981821831841851861871881891992002012022032041931942052061971981992002072082092102112122132142042052062152162172182192202092102112122212222232242252262272282292302312152162322332342352362372382392202212222232242252402412422432442452462282472482492502322332512522532542362552562572392582592602422612622632642652472482492502512522662672682692702712722732742752762772782792582802812602822832842852642862872662882892682902912922938 unmodified lines30230330430530630730828628728828929029130931031131231331431531631731829329429529629729831932032132232332432532632732832945 unmodified lines3753763773503513523533543553563573583593603613623633643653663673683783793803813703713823833843853863873883893903913923933943953963973983994003 unmodified lines4044054063813824074084094104113 unmodified lines415416417392393394395396397398399400418419420421422423424425426427404405406407408428429430431432433434410411412413414435436416437438439440420421441442443444424425445446447448449450431451452433453454455456457458438439440441459460461462463464465466<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,500;0,700;1,400&family=Ubuntu+Mono&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Ubuntu+Mono:wght@400;700&display=swap" rel="stylesheet">
<style> .vg-container { .vg-wrap { font-family: 'Ubuntu', sans-serif; background-color: #000000; color: #FFFFFF; max-width: 920px; margin: 0 auto; padding: 32px 24px; padding: 36px 30px; border: 1px solid #1a1a1a; border-radius: 14px; line-height: 1.65; }
.vg-header { border-bottom: 2px solid #222222; padding-bottom: 16px; margin-bottom: 24px; box-sizing: border-box; }
.vg-title { font-size: 32px; font-size: 34px; font-weight: 700; color: #FFFFFF; margin: 0 0 12px 0; letter-spacing: -0.5px; margin: 0 0 18px 0; color: #FFFFFF; }
.vg-description { font-size: 15px; .vg-lead { font-size: 15.5px; color: #FFFFFF; margin: 0; margin-bottom: 24px; }
.vg-link { color: #FF4500; text-decoration: none; font-weight: 500; transition: opacity 0.2s ease; }
.vg-link:hover { text-decoration: underline; opacity: 0.85; }
/* Blockquote as structured isolated box */ .vg-notice-panel { background-color: #000000; border: 1px solid #333333; border-radius: 8px; .vg-notice-box { background: #000000; border: 1px solid #292929; border-left: 4px solid #444444; border-radius: 6px; padding: 16px 20px; margin: 24px 0; margin: 24px 0 32px 0; font-size: 14px; color: #FFFFFF; }
.vg-section-title { font-size: 20px; .vg-section-head { font-size: 21px; font-weight: 700; color: #FFFFFF; margin: 36px 0 16px 0; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.vg-section-title::after { content: ""; flex: 1; height: 1px; background-color: #222222; margin-left: 16px; }
.vg-plus-list { /* Plus-style list formatting */ .vg-bullet-list { list-style: none; padding-left: 0; padding: 0; margin: 0 0 24px 0; }
.vg-plus-list li { .vg-bullet-list li { position: relative; padding-left: 24px; padding-left: 22px; margin-bottom: 12px; font-size: 15px; font-size: 14.5px; color: #FFFFFF; }
.vg-plus-list li::before { .vg-bullet-list li::before { content: "+"; color: #FF4500; position: absolute; left: 0; top: 0; color: #FFFFFF; font-weight: 700; font-size: 18px; line-height: 1.2; font-size: 16px; line-height: 1.4; }
/* Expandable / Dropdown sections */ .vg-dropdown { border: 1px solid #333333; .vg-accordion { border: 1px solid #222222; border-radius: 8px; margin-bottom: 24px; margin-bottom: 22px; background-color: #000000; overflow: hidden; }
.vg-dropdown-summary { padding: 14px 18px; font-size: 15px; .vg-accordion-summary { list-style: none; padding: 16px 20px; font-size: 16px; font-weight: 700; cursor: pointer; color: #FFFFFF; outline: none; user-select: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; background: #080808; border-bottom: 1px solid transparent; transition: background 0.2s; }
.vg-dropdown-summary::-webkit-details-marker { .vg-accordion-summary::-webkit-details-marker { display: none; }
.vg-dropdown-summary::after { .vg-accordion-summary:hover { background: #111111; }
.vg-accordion[open] .vg-accordion-summary { border-bottom: 1px solid #222222; }
.vg-accordion-summary::after { content: "+"; color: #FF4500; font-size: 18px; font-weight: 700; color: #FFFFFF; transition: transform 0.2s ease; }
.vg-dropdown[open] .vg-dropdown-summary::after { .vg-accordion[open] .vg-accordion-summary::after { content: "−"; }
.vg-accordion-content { padding: 18px; background: #000000; }
/* Code block shells & actions */ .vg-code-wrapper { position: relative; background: #000000; border: 1px solid #222222; border: 1px solid #242424; border-radius: 8px; background-color: #000000; margin-bottom: 20px; overflow: hidden; }
.vg-code-topbar { display: flex; justify-content: space-between; align-items: center; background: #090909; padding: 8px 14px; border-bottom: 1px solid #1c1c1c; }
.vg-code-label { padding: 8px 16px; background-color: #080808; border-bottom: 1px solid #222222; font-family: 'Ubuntu Mono', monospace; font-size: 12px; font-family: 'Ubuntu Mono', monospace; text-transform: uppercase; letter-spacing: 0.8px; color: #FFFFFF; }
.vg-copy-btn { position: absolute; top: 6px; right: 8px; background-color: #000000; .vg-copy-trigger { background: #181818; color: #FFFFFF; border: 1px solid #333333; border-radius: 4px; padding: 4px 10px; font-family: 'Ubuntu', sans-serif; font-size: 11px; font-size: 12px; cursor: pointer; transition: border-color 0.2s ease; transition: background 0.2s, border-color 0.2s; }
.vg-copy-btn:hover { .vg-copy-trigger:hover { background: #252525; border-color: #555555; }
3 unmodified lines overflow-x: auto; font-family: 'Ubuntu Mono', monospace; font-size: 13.5px; line-height: 1.55; color: #FFFFFF; line-height: 1.5; background-color: #000000; white-space: pre; background: #000000; }
.vg-table-container { border: 1px solid #222222; border-radius: 8px; overflow: hidden; margin-bottom: 28px; }
.vg-spec-table { /* Table styling */ .vg-specs-table { width: 100%; border-collapse: collapse; margin: 10px 0 28px 0; font-size: 14px; background-color: #000000; text-align: left; }
.vg-spec-table th, .vg-spec-table td { padding: 12px 18px; border-bottom: 1px solid #222222; .vg-specs-table th, .vg-specs-table td { border: 1px solid #222222; padding: 12px 16px; text-align: left; color: #FFFFFF; }
.vg-spec-table tr:last-child th, .vg-spec-table tr:last-child td { border-bottom: none; .vg-specs-table th { background-color: #080808; width: 32%; font-weight: 700; }
.vg-spec-table th { width: 35%; font-weight: 700; background-color: #050505; .vg-specs-table td { background-color: #000000; }
.vg-ack-entry { font-size: 14.5px; margin-bottom: 14px; color: #FFFFFF; line-height: 1.5; }
.vg-ack-container { margin-bottom: 16px; .vg-divider { border: 0; height: 1px; background: #222222; margin: 32px 0; }</style>
<div class="vg-container"> <div class="vg-header"> <h1 class="vg-title">VisionGuardrail-4B</h1> <p class="vg-description"> <b>VisionGuardrail-4B</b> is a multimodal content-safety classifier based on <b>Qwen/Qwen3.5-4B</b> and trained on the <a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link" target="_blank" rel="noopener noreferrer">prithivMLmods/ImageShield-Guardrail-Pro</a> content-safety guardrail dataset. The model is designed to classify visual content as <b>Safe</b> or <b>Unsafe</b>, with a particular focus on detecting <b>Not Safe for Work (NSFW) sensual content</b> and other potentially sensitive visual content. VisionGuardrail-4B excels at detecting <b>explicit and sensitive visual content</b>, with detailed analysis of <b>dress codes, clothing exposure, poses, framing, and different visual settings</b> to support conservative content-safety classification. </p><div class="vg-wrap"> <div class="vg-title">VisionGuardrail-4B</div>
<div class="vg-lead"> <b>VisionGuardrail-4B</b> is a multimodal content-safety classifier based on <b>Qwen/Qwen3.5-4B</b> and trained on the <a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link">prithivMLmods/ImageShield-Guardrail-Pro</a> content-safety guardrail dataset. The model is designed to classify visual content as <b>Safe</b> or <b>Unsafe</b>, with a particular focus on detecting <b>Not Safe for Work (NSFW) sensual content</b> and other potentially sensitive visual content. VisionGuardrail-4B excels at detecting <b>explicit and sensitive visual content</b>, with detailed analysis of <b>dress codes, clothing exposure, poses, framing, and different visual settings</b> to support conservative content-safety classification. </div>
<div class="vg-notice-panel"> <div class="vg-notice-box"> This model is an experimental release and may generate unexpected behaviors or reasoning artifacts in certain scenarios. <b>This model is intended for research and content-safety classification only.</b> Any outputs generated by this model are the sole responsibility of the user. The authors and hosting platform disclaim all liability for generated content. Users must ensure safe, ethical, and lawful usage. </div>
<div class="vg-section-title">Key Highlights</div> <ul class="vg-plus-list"> <div class="vg-section-head">Key Highlights</div> <ul class="vg-bullet-list"> <li><b>Qwen 3.5 Foundation</b>: Built on <b>Qwen/Qwen3.5-4B</b>.</li> <li><b>Multimodal Content Filter</b>: Designed for visual content-safety classification.</li> <li><b>ImageShield-Guardrail-Pro Training</b>: Fine-tuned on the <a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link" target="_blank" rel="noopener noreferrer">prithivMLmods/ImageShield-Guardrail-Pro</a> content-safety guardrail dataset.</li> <li><b>ImageShield-Guardrail-Pro Training</b>: Fine-tuned on the <b>prithivMLmods/ImageShield-Guardrail-Pro</b> content-safety guardrail dataset.</li> <li><b>Safe / Unsafe Classification</b>: Classifies visual content as either <b>Safe</b> or <b>Unsafe</b>.</li> <li><b>NSFW Sensual Content Detection</b>: Focused on identifying potentially <b>Not Safe for Work (NSFW) sensual content</b> and related sensitive visual material.</li> <li><b>Explicit & Sensitive Content Detection</b>: Excels at identifying explicit, revealing, provocative, and otherwise potentially sensitive visual content.</li> <li><b>Explicit & Sensitive Content Detection</b>: Excels at identifying explicit, revealing, provocative, and otherwise potentially sensitive visual content.</li> <li><b>Dress-Code Analysis</b>: Performs detailed analysis of clothing, dress codes, exposure, and revealing garments.</li> <li><b>Pose Analysis</b>: Analyzes body poses, positioning, framing, and potentially suggestive presentation.</li> <li><b>Context & Setting Analysis</b>: Considers different visual settings and contextual cues when determining content safety.</li> <li><b>Context & Setting Analysis</b>: Considers different visual settings and contextual cues when determining content safety.</li> <li><b>Zero-Tolerance Safety Classification</b>: Uses a conservative classification policy that favors safety when the content is ambiguous.</li> <li><b>Structured Output</b>: Produces a machine-readable JSON response containing a caption, classification, and reasoning.</li> </ul>
<div class="vg-section-title">Standard Instruction</div> <details class="vg-dropdown"> <summary class="vg-dropdown-summary">View Guardrail Zero-Tolerance System Prompt</summary> <div class="vg-code-wrapper" style="border: none; border-top: 1px solid #222222; border-radius: 0; margin-bottom: 0;"> <button class="vg-copy-btn" onclick="vgCopyCode(this)">Copy</button> <pre class="vg-code-block">You are a strict, zero-tolerance parental control content-safety guardrail classifier for visual media. <details class="vg-accordion"> <summary class="vg-accordion-summary">Standard Instruction</summary> <div class="vg-accordion-content"> <div class="vg-code-wrapper"> <div class="vg-code-topbar"> <span class="vg-code-label">System Prompt & Schema</span> <button class="vg-copy-trigger" onclick="handleCopy(this)">Copy</button> </div> <pre class="vg-code-block">You are a strict, zero-tolerance parental control content-safety guardrail classifier for visual media.
Your role is minor protection: any media containing suggestive, revealing, sexually provocative, or explicit visual elements must be flagged as NSFW.
STRICT ZERO-TOLERANCE CLASSIFICATION RULES:
1. Nudity & Exposure: Any full or partial nudity, exposed breasts, cleavage, buttocks, groin, or visible pubic area MUST be classified as NSFW.1. Nudity & Exposure: Any full or partial nudity, exposed breasts, cleavage, buttocks, groin, or visible pubic area MUST be classified as NSFW.
2. Underwear & Swimwear: Thongs, G-strings, micro-bikinis, skimpy or revealing swimwear, bras, panties, lingerie, see-through clothing, or unbuttoned tops revealing undergarments or bare torsos MUST be classified as NSFW.2. Underwear & Swimwear: Thongs, G-strings, micro-bikinis, skimpy or revealing swimwear, bras, panties, lingerie, see-through clothing, or unbuttoned tops revealing undergarments or bare torsos MUST be classified as NSFW.
3. Dress-Code Analysis: Carefully analyze clothing, coverage, transparency, exposure, and the overall dress code. Revealing or sexually provocative clothing MUST be classified as NSFW.
4. Poses & Suggestiveness: Sexually suggestive poses, seductive modeling, cleavage-emphasizing framing, fetish content, or explicit erotic themes MUST be classified as NSFW.4. Poses & Suggestiveness: Sexually suggestive poses, seductive modeling, cleavage-emphasizing framing, fetish content, or explicit erotic themes MUST be classified as NSFW.
5. Context & Setting: Consider the visual setting, composition, framing, and contextual cues when evaluating potentially sensitive content.5. Context & Setting: Consider the visual setting, composition, framing, and contextual cues when evaluating potentially sensitive content.
6. Artwork & Animation: Anime nudes, ecchi, hentai, suggestive illustrations, or 2D/3D stylized erotica MUST be classified as NSFW.6. Artwork & Animation: Anime nudes, ecchi, hentai, suggestive illustrations, or 2D/3D stylized erotica MUST be classified as NSFW.
7. Sensitive Visual Content: Explicit or highly suggestive visual content MUST be classified as NSFW even when presented in non-photorealistic or artistic formats.
8 unmodified lines "nsfw": 1 | 0, "safe": 1 | 0}</pre> </div> </div> </details>
<div class="vg-section-title">Quick Start with Transformers</div> <div class="vg-code-wrapper"> <div class="vg-code-label">bash</div> <button class="vg-copy-btn" onclick="vgCopyCode(this)">Copy</button> <pre class="vg-code-block">pip install transformers <details class="vg-accordion"> <summary class="vg-accordion-summary">Quick Start with Transformers</summary> <div class="vg-accordion-content"> <div class="vg-code-wrapper"> <div class="vg-code-topbar"> <span class="vg-code-label">Bash Installation</span> <button class="vg-copy-trigger" onclick="handleCopy(this)">Copy</button> </div> <pre class="vg-code-block">pip install transformerspip install accelerate</pre> </div>
<div class="vg-code-wrapper"> <div class="vg-code-label">python</div> <button class="vg-copy-btn" onclick="vgCopyCode(this)">Copy</button> <pre class="vg-code-block">from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor </div>
<div class="vg-code-wrapper"> <div class="vg-code-topbar"> <span class="vg-code-label">Python Inference</span> <button class="vg-copy-trigger" onclick="handleCopy(this)">Copy</button> </div> <pre class="vg-code-block">from transformers import Qwen3_5ForConditionalGeneration, AutoProcessorimport torch
model = Qwen3_5ForConditionalGeneration.from_pretrained(45 unmodified lines)
print(output_text[0])</pre> </div>
<div class="vg-section-title">Training Details</div> <div class="vg-table-container"> <table class="vg-spec-table"> <tbody> <tr><th>Setting</th><td>Value</td></tr> <tr><th>Base Model</th><td>Qwen/Qwen3.5-4B</td></tr> <tr><th>Model</th><td>VisionGuardrail-4B</td></tr> <tr><th>Model Type</th><td>Multimodal Content-Safety Classifier</td></tr> <tr><th>Training Dataset</th><td><a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link" target="_blank" rel="noopener noreferrer">prithivMLmods/ImageShield-Guardrail-Pro</a></td></tr> <tr><th>Training Objective</th><td>Content-safety guardrail classification</td></tr> <tr><th>Primary Classification</th><td>Safe / Unsafe</td></tr> <tr><th>Safety Focus</th><td>Not Safe for Work (NSFW) Sensual Content</td></tr> <tr><th>Visual Analysis</th><td>Dress Codes, Poses, Exposure & Settings</td></tr> <tr><th>Training Framework</th><td>TRL</td></tr> </tbody> </table> </div> </div> </div> </details>
<div class="vg-section-title">Intended Use</div> <ul class="vg-plus-list"> <div class="vg-section-head">Training Details</div> <table class="vg-specs-table"> <tr><th>Setting</th><td>Value</td></tr> <tr><th>Base Model</th><td>Qwen/Qwen3.5-4B</td></tr> <tr><th>Model</th><td>VisionGuardrail-4B</td></tr> <tr><th>Model Type</th><td>Multimodal Content-Safety Classifier</td></tr> <tr><th>Training Dataset</th><td>prithivMLmods/ImageShield-Guardrail-Pro</td></tr> <tr><th>Training Objective</th><td>Content-safety guardrail classification</td></tr> <tr><th>Primary Classification</th><td>Safe / Unsafe</td></tr> <tr><th>Safety Focus</th><td>Not Safe for Work (NSFW) Sensual Content</td></tr> <tr><th>Visual Analysis</th><td>Dress Codes, Poses, Exposure & Settings</td></tr> <tr><th>Training Framework</th><td>TRL</td></tr> </table>
<div class="vg-section-head">Intended Use</div> <ul class="vg-bullet-list"> <li><b>Content Safety Classification</b>: Classifying visual media as safe or unsafe.</li> <li><b>NSFW Sensual Content Detection</b>: Supporting research into automated detection of potentially sensitive and sexually suggestive visual content.</li> <li><b>Parental Controls</b>: Building conservative visual content-safety filtering systems.</li>3 unmodified lines <li><b>Visual Safety Analysis</b>: Analyzing clothing, dress codes, poses, framing, and visual settings for content-safety signals.</li> </ul>
<div class="vg-section-title">Limitations</div> <ul class="vg-plus-list"> <div class="vg-section-head">Limitations</div> <ul class="vg-bullet-list"> <li><b>Experimental Model</b>: The model may produce incorrect or inconsistent classifications.</li> <li><b>False Positives</b>: Benign content may occasionally be classified as unsafe due to the conservative classification threshold.</li> <li><b>False Negatives</b>: Unsafe content may occasionally be missed.</li>3 unmodified lines <li><b>Automated Classification</b>: The model should not be treated as a definitive legal or safety determination.</li> </ul>
<div class="vg-section-title">Acknowledgements</div> <div class="vg-ack-container"> <ul class="vg-plus-list"> <li><a href="https://huggingface.co/Qwen/Qwen3.5-4B" class="vg-link" target="_blank" rel="noopener noreferrer">Qwen/Qwen3.5-4B</a>: Base multimodal model used for this project.</li> <li><a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link" target="_blank" rel="noopener noreferrer">ImageShield-Guardrail-Pro</a>: Content-safety guardrail dataset used for training VisionGuardrail-4B.</li> <li><b>TRL</b> – <a href="https://huggingface.co/docs/trl/en/index" class="vg-link" target="_blank" rel="noopener noreferrer">Transformers Reinforcement Learning</a>: TRL is a full-stack library providing tools to train transformer language models with methods including Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), Direct Preference Optimization (DPO), Reward Modeling, and more.</li> <li><a href="https://huggingface.co/docs/transformers/en/index" class="vg-link" target="_blank" rel="noopener noreferrer">Transformers</a>: Transformers provides state-of-the-art machine learning models for text, computer vision, audio, video, and multimodal tasks, supporting both inference and training.</li> </ul> </div> <hr class="vg-divider">
<div class="vg-section-head">Acknowledgements</div> <div class="vg-ack-entry"><a href="https://huggingface.co/Qwen/Qwen3.5-4B" class="vg-link">Qwen/Qwen3.5-4B</a>: Base multimodal model used for this project.</div> <div class="vg-ack-entry"><a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" class="vg-link">ImageShield-Guardrail-Pro</a>: Content-safety guardrail dataset used for training VisionGuardrail-4B.</div> <div class="vg-ack-entry"><a href="https://huggingface.co/docs/trl/en/index" class="vg-link">TRL</a> – Transformers Reinforcement Learning: TRL is a full-stack library providing tools to train transformer language models with methods including Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), Direct Preference Optimization (DPO), Reward Modeling, and more.</div> <div class="vg-ack-entry"><a href="https://huggingface.co/docs/transformers/en/index" class="vg-link">Transformers</a>: Transformers provides state-of-the-art machine learning models for text, computer vision, audio, video, and multimodal tasks, supporting both inference and training.</div></div>
<script> function vgCopyCode(btn) { var wrapper = btn.closest('.vg-code-wrapper'); var codeElement = wrapper.querySelector('.vg-code-block'); var textToCopy = codeElement.innerText;
function handleCopy(button) { const codeBlock = button.closest('.vg-code-wrapper').querySelector('.vg-code-block'); if (!codeBlock) return; const textToCopy = codeBlock.innerText; if (navigator.clipboard && window.isSecureContext) { navigator.clipboard.writeText(textToCopy).then(function() { showSuccess(btn); }).catch(function() { fallbackCopy(textToCopy, btn); }); navigator.clipboard.writeText(textToCopy).then(() => setSuccessState(button)).catch(() => fallbackCopy(textToCopy, button)); } else { fallbackCopy(textToCopy, btn); fallbackCopy(textToCopy, button); } }
function fallbackCopy(text, btn) { var textArea = document.createElement("textarea"); function fallbackCopy(text, button) { const textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position = "fixed"; textArea.style.left = "-999999px"; textArea.style.top = "-999999px"; textArea.style.opacity = "0"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { document.execCommand('copy'); showSuccess(btn); setSuccessState(button); } catch (err) { btn.innerText = "Error"; button.innerText = "Failed"; setTimeout(() => { button.innerText = "Copy"; }, 2000); } document.body.removeChild(textArea); }
function showSuccess(btn) { btn.innerText = "Copied!"; setTimeout(function() { btn.innerText = "Copy"; function setSuccessState(button) { const originalText = button.innerText; button.innerText = "Copied!"; setTimeout(() => { button.innerText = originalText; }, 2000); }</script>README.md+205-183