prithivMLmods commited on
Commit
4e3aa9a
·
verified ·
1 Parent(s): 51b7f23

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -87
README.md CHANGED
@@ -7,7 +7,6 @@
7
 
8
  .vg-code, .vg-code * {
9
  font-family: 'Ubuntu Mono', 'Courier New', monospace !important;
10
- line-height: 1.5;
11
  }
12
  </style>
13
 
@@ -25,26 +24,26 @@
25
 
26
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Key Highlights</h2>
27
 
28
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Qwen 3.5 Foundation</b>: Built on <b>Qwen/Qwen3.5-4B</b>.</span></div>
29
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Multimodal Content Filter</b>: Designed for visual content-safety classification.</span></div>
30
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>ImageShield-Guardrail-Pro Training</b>: Fine-tuned on the <b>prithivMLmods/ImageShield-Guardrail-Pro</b> content-safety guardrail dataset.</span></div>
31
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Safe / Unsafe Classification</b>: Classifies visual content as either <b>Safe</b> or <b>Unsafe</b>.</span></div>
32
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>NSFW Sensual Content Detection</b>: Focused on identifying potentially <b>Not Safe for Work (NSFW) sensual content</b> and related sensitive visual material.</span></div>
33
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Explicit & Sensitive Content Detection</b>: Excels at identifying explicit, revealing, provocative, and otherwise potentially sensitive visual content.</span></div>
34
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Dress-Code Analysis</b>: Performs detailed analysis of clothing, dress codes, exposure, and revealing garments.</span></div>
35
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Pose Analysis</b>: Analyzes body poses, positioning, framing, and potentially suggestive presentation.</span></div>
36
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Context & Setting Analysis</b>: Considers different visual settings and contextual cues when determining content safety.</span></div>
37
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Zero-Tolerance Safety Classification</b>: Uses a conservative classification policy that favors safety when the content is ambiguous.</span></div>
38
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Structured Output</b>: Produces a machine-readable JSON response containing a caption, classification, and reasoning.</span></div>
39
 
40
  <details style="border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden; background-color: #000000;">
41
- <summary style="padding: 12px 16px; cursor: pointer; color: #FFFFFF !important; font-weight: 500; background-color: #111111; list-style: none; display: flex; justify-content: space-between; font-family: 'Ubuntu', sans-serif;">Standard Instruction</summary>
42
- <div style="background-color: #000000; border: none; border-radius: 0; margin: 0; overflow: hidden;">
43
- <div style="background-color: #1a1a1a; padding: 8px 16px; border-bottom: 1px solid #333333; font-size: 12px; color: #888888; display: flex; justify-content: space-between; align-items: center; font-family: 'Ubuntu', sans-serif;">
44
- <span>text</span>
45
- <button onclick="copyCode(this)" style="background-color: #333333; color: #FFFFFF; border: none; padding: 4px 10px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
46
  </div>
47
- <pre class="vg-code" style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; overflow-x: auto; font-size: 14px;">You are a strict, zero-tolerance parental control content-safety guardrail classifier for visual media.
48
 
49
  Your role is minor protection: any media containing suggestive, revealing, sexually provocative, or explicit visual elements must be flagged as NSFW.
50
 
@@ -81,20 +80,20 @@ Output strictly valid JSON with no extra conversational text, commentary, or mar
81
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Quick Start with Transformers</h2>
82
 
83
  <div style="background-color: #000000; border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden;">
84
- <div style="background-color: #1a1a1a; padding: 8px 16px; border-bottom: 1px solid #333333; font-size: 12px; color: #888888; display: flex; justify-content: space-between; align-items: center; font-family: 'Ubuntu', sans-serif;">
85
- <span>bash</span>
86
- <button onclick="copyCode(this)" style="background-color: #333333; color: #FFFFFF; border: none; padding: 4px 10px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
87
  </div>
88
- <pre class="vg-code" style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; overflow-x: auto; font-size: 14px;">pip install transformers
89
  pip install accelerate</pre>
90
  </div>
91
 
92
  <div style="background-color: #000000; border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden;">
93
- <div style="background-color: #1a1a1a; padding: 8px 16px; border-bottom: 1px solid #333333; font-size: 12px; color: #888888; display: flex; justify-content: space-between; align-items: center; font-family: 'Ubuntu', sans-serif;">
94
- <span>python</span>
95
- <button onclick="copyCode(this)" style="background-color: #333333; color: #FFFFFF; border: none; padding: 4px 10px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
96
  </div>
97
- <pre class="vg-code" style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; overflow-x: auto; font-size: 14px;">from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor
98
  import torch
99
 
100
  model = Qwen3_5ForConditionalGeneration.from_pretrained(
@@ -149,73 +148,69 @@ print(output_text[0])</pre>
149
  </div>
150
 
151
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Training Details</h2>
152
-
153
- <div style="border: 1px solid #333333; border-radius: 4px; overflow: hidden; margin: 20px 0;">
154
- <table style="width: 100%; border-collapse: collapse; color: #FFFFFF;">
155
- <tbody>
156
- <tr>
157
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; width: 35%; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Base Model</td>
158
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Qwen/Qwen3.5-4B</td>
159
- </tr>
160
- <tr>
161
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Model</td>
162
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">VisionGuardrail-4B</td>
163
- </tr>
164
- <tr>
165
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Model Type</td>
166
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Multimodal Content-Safety Classifier</td>
167
- </tr>
168
- <tr>
169
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Training Dataset</td>
170
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">prithivMLmods/ImageShield-Guardrail-Pro</td>
171
- </tr>
172
- <tr>
173
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Training Objective</td>
174
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Content-safety guardrail classification</td>
175
- </tr>
176
- <tr>
177
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Primary Classification</td>
178
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Safe / Unsafe</td>
179
- </tr>
180
- <tr>
181
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Safety Focus</td>
182
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Not Safe for Work (NSFW) Sensual Content</td>
183
- </tr>
184
- <tr>
185
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-bottom: 1px solid #333333; border-right: 1px solid #333333;">Visual Analysis</td>
186
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF; border-bottom: 1px solid #333333;">Dress Codes, Poses, Exposure & Settings</td>
187
- </tr>
188
- <tr>
189
- <td style="padding: 12px 16px; background-color: #111111; font-weight: 500; color: #FFFFFF; border-right: 1px solid #333333;">Training Framework</td>
190
- <td style="padding: 12px 16px; background-color: #000000; color: #FFFFFF;">TRL</td>
191
- </tr>
192
- </tbody>
193
- </table>
194
- </div>
195
 
196
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Intended Use</h2>
197
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Content Safety Classification</b>: Classifying visual media as safe or unsafe.</span></div>
198
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>NSFW Sensual Content Detection</b>: Supporting research into automated detection of potentially sensitive and sexually suggestive visual content.</span></div>
199
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Parental Controls</b>: Building conservative visual content-safety filtering systems.</span></div>
200
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Content Moderation</b>: Supporting automated safety classification pipelines.</span></div>
201
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Multimodal Safety Research</b>: Evaluating content-safety behavior in multimodal language models.</span></div>
202
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Guardrail Development</b>: Researching structured safety classification and filtering workflows.</span></div>
203
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Visual Safety Analysis</b>: Analyzing clothing, dress codes, poses, framing, and visual settings for content-safety signals.</span></div>
204
 
205
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Limitations</h2>
206
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Experimental Model</b>: The model may produce incorrect or inconsistent classifications.</span></div>
207
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>False Positives</b>: Benign content may occasionally be classified as unsafe due to the conservative classification threshold.</span></div>
208
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>False Negatives</b>: Unsafe content may occasionally be missed.</span></div>
209
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Context Sensitivity</b>: Classification performance depends on image quality, visual context, and the provided instruction.</span></div>
210
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Conservative Policy</b>: The model intentionally uses a strict classification threshold and may flag content that would not be considered NSFW under less restrictive moderation policies.</span></div>
211
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Visual Ambiguity</b>: Clothing, poses, artistic styles, and contextual cues may sometimes be difficult to interpret accurately.</span></div>
212
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>Automated Classification</b>: The model should not be treated as a definitive legal or safety determination.</span></div>
213
 
214
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Acknowledgements</h2>
215
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><a href="https://huggingface.co/Qwen/Qwen3.5-4B" style="color: #FF4500; text-decoration: none;">Qwen/Qwen3.5-4B</a>: Base multimodal model used for this project.</span></div>
216
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" style="color: #FF4500; text-decoration: none;">ImageShield-Guardrail-Pro</a>: Content-safety guardrail dataset used for training VisionGuardrail-4B.</span></div>
217
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><b>TRL</b> – <a href="https://huggingface.co/docs/trl/en/index" style="color: #FF4500; text-decoration: none;">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.</span></div>
218
- <div style="display: flex; align-items: flex-start; margin-bottom: 8px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold;">+</span><span><a href="https://huggingface.co/docs/transformers/en/index" style="color: #FF4500; text-decoration: none;">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.</span></div>
219
 
220
  </div>
221
 
@@ -229,8 +224,12 @@ print(output_text[0])</pre>
229
  try {
230
  document.execCommand('copy');
231
  btn.innerText = 'Copied!';
 
 
232
  setTimeout(() => {
233
  btn.innerText = 'Copy';
 
 
234
  }, 2000);
235
  } catch (err) {
236
  console.error('Failed to copy text: ', err);
 
7
 
8
  .vg-code, .vg-code * {
9
  font-family: 'Ubuntu Mono', 'Courier New', monospace !important;
 
10
  }
11
  </style>
12
 
 
24
 
25
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Key Highlights</h2>
26
 
27
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Qwen 3.5 Foundation</b>: Built on <b>Qwen/Qwen3.5-4B</b>.</span></div>
28
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Multimodal Content Filter</b>: Designed for visual content-safety classification.</span></div>
29
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>ImageShield-Guardrail-Pro Training</b>: Fine-tuned on the <b>prithivMLmods/ImageShield-Guardrail-Pro</b> content-safety guardrail dataset.</span></div>
30
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Safe / Unsafe Classification</b>: Classifies visual content as either <b>Safe</b> or <b>Unsafe</b>.</span></div>
31
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>NSFW Sensual Content Detection</b>: Focused on identifying potentially <b>Not Safe for Work (NSFW) sensual content</b> and related sensitive visual material.</span></div>
32
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Explicit & Sensitive Content Detection</b>: Excels at identifying explicit, revealing, provocative, and otherwise potentially sensitive visual content.</span></div>
33
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Dress-Code Analysis</b>: Performs detailed analysis of clothing, dress codes, exposure, and revealing garments.</span></div>
34
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Pose Analysis</b>: Analyzes body poses, positioning, framing, and potentially suggestive presentation.</span></div>
35
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Context & Setting Analysis</b>: Considers different visual settings and contextual cues when determining content safety.</span></div>
36
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Zero-Tolerance Safety Classification</b>: Uses a conservative classification policy that favors safety when the content is ambiguous.</span></div>
37
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Structured Output</b>: Produces a machine-readable JSON response containing a caption, classification, and reasoning.</span></div>
38
 
39
  <details style="border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden; background-color: #000000;">
40
+ <summary style="padding: 14px 16px; cursor: pointer; color: #FFFFFF; font-weight: 500; background-color: #111111; list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: 'Ubuntu', sans-serif;">Standard Instruction</summary>
41
+ <div style="background-color: #000000; border: none; margin: 0; overflow: hidden;">
42
+ <div style="background-color: #111111; padding: 8px 16px; border-bottom: 1px solid #333333; display: flex; justify-content: space-between; align-items: center;">
43
+ <span style="font-size: 13px; color: #888888; font-family: 'Ubuntu', sans-serif;">text</span>
44
+ <button onclick="copyCode(this)" style="background-color: #222222; color: #FFFFFF; border: 1px solid #444444; padding: 4px 12px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
45
  </div>
46
+ <pre style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; white-space: pre-wrap; overflow-x: auto; font-family: 'Ubuntu Mono', 'Courier New', monospace !important; font-size: 14px; line-height: 1.5;">You are a strict, zero-tolerance parental control content-safety guardrail classifier for visual media.
47
 
48
  Your role is minor protection: any media containing suggestive, revealing, sexually provocative, or explicit visual elements must be flagged as NSFW.
49
 
 
80
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Quick Start with Transformers</h2>
81
 
82
  <div style="background-color: #000000; border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden;">
83
+ <div style="background-color: #111111; padding: 8px 16px; border-bottom: 1px solid #333333; display: flex; justify-content: space-between; align-items: center;">
84
+ <span style="font-size: 13px; color: #888888; font-family: 'Ubuntu', sans-serif;">bash</span>
85
+ <button onclick="copyCode(this)" style="background-color: #222222; color: #FFFFFF; border: 1px solid #444444; padding: 4px 12px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
86
  </div>
87
+ <pre style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; white-space: pre-wrap; overflow-x: auto; font-family: 'Ubuntu Mono', 'Courier New', monospace !important; font-size: 14px; line-height: 1.5;">pip install transformers
88
  pip install accelerate</pre>
89
  </div>
90
 
91
  <div style="background-color: #000000; border: 1px solid #333333; border-radius: 4px; margin-bottom: 16px; overflow: hidden;">
92
+ <div style="background-color: #111111; padding: 8px 16px; border-bottom: 1px solid #333333; display: flex; justify-content: space-between; align-items: center;">
93
+ <span style="font-size: 13px; color: #888888; font-family: 'Ubuntu', sans-serif;">python</span>
94
+ <button onclick="copyCode(this)" style="background-color: #222222; color: #FFFFFF; border: 1px solid #444444; padding: 4px 12px; cursor: pointer; border-radius: 4px; font-size: 12px; font-family: 'Ubuntu', sans-serif;">Copy</button>
95
  </div>
96
+ <pre style="margin: 0; padding: 16px; background-color: #000000 !important; color: #FFFFFF !important; white-space: pre-wrap; overflow-x: auto; font-family: 'Ubuntu Mono', 'Courier New', monospace !important; font-size: 14px; line-height: 1.5;">from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor
97
  import torch
98
 
99
  model = Qwen3_5ForConditionalGeneration.from_pretrained(
 
148
  </div>
149
 
150
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Training Details</h2>
151
+
152
+ <table style="width: 100%; border-collapse: collapse; margin: 24px 0; color: #FFFFFF; background-color: #000000; border: 1px solid #333333; border-radius: 4px; overflow: hidden; font-family: 'Ubuntu', sans-serif;">
153
+ <tr style="border-bottom: 1px solid #333333;">
154
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; width: 40%; border-right: 1px solid #333333; background-color: #000000;">Base Model</td>
155
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #000000;"><b>Qwen/Qwen3.5-4B</b></td>
156
+ </tr>
157
+ <tr style="border-bottom: 1px solid #333333;">
158
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #0a0a0a;">Model</td>
159
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #0a0a0a;"><b>VisionGuardrail-4B</b></td>
160
+ </tr>
161
+ <tr style="border-bottom: 1px solid #333333;">
162
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #000000;">Model Type</td>
163
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #000000;"><b>Multimodal Content-Safety Classifier</b></td>
164
+ </tr>
165
+ <tr style="border-bottom: 1px solid #333333;">
166
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #0a0a0a;">Training Dataset</td>
167
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #0a0a0a;"><b>prithivMLmods/ImageShield-Guardrail-Pro</b></td>
168
+ </tr>
169
+ <tr style="border-bottom: 1px solid #333333;">
170
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #000000;">Training Objective</td>
171
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #000000;"><b>Content-safety guardrail classification</b></td>
172
+ </tr>
173
+ <tr style="border-bottom: 1px solid #333333;">
174
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #0a0a0a;">Primary Classification</td>
175
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #0a0a0a;"><b>Safe / Unsafe</b></td>
176
+ </tr>
177
+ <tr style="border-bottom: 1px solid #333333;">
178
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #000000;">Safety Focus</td>
179
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #000000;"><b>Not Safe for Work (NSFW) Sensual Content</b></td>
180
+ </tr>
181
+ <tr style="border-bottom: 1px solid #333333;">
182
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #0a0a0a;">Visual Analysis</td>
183
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #0a0a0a;"><b>Dress Codes, Poses, Exposure & Settings</b></td>
184
+ </tr>
185
+ <tr>
186
+ <td style="padding: 14px 16px; color: #AAAAAA; font-weight: 500; border-right: 1px solid #333333; background-color: #000000;">Training Framework</td>
187
+ <td style="padding: 14px 16px; color: #FFFFFF; background-color: #000000;"><b>TRL</b></td>
188
+ </tr>
189
+ </table>
 
 
 
 
190
 
191
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Intended Use</h2>
192
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Content Safety Classification</b>: Classifying visual media as safe or unsafe.</span></div>
193
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>NSFW Sensual Content Detection</b>: Supporting research into automated detection of potentially sensitive and sexually suggestive visual content.</span></div>
194
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Parental Controls</b>: Building conservative visual content-safety filtering systems.</span></div>
195
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Content Moderation</b>: Supporting automated safety classification pipelines.</span></div>
196
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Multimodal Safety Research</b>: Evaluating content-safety behavior in multimodal language models.</span></div>
197
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Guardrail Development</b>: Researching structured safety classification and filtering workflows.</span></div>
198
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Visual Safety Analysis</b>: Analyzing clothing, dress codes, poses, framing, and visual settings for content-safety signals.</span></div>
199
 
200
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Limitations</h2>
201
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Experimental Model</b>: The model may produce incorrect or inconsistent classifications.</span></div>
202
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>False Positives</b>: Benign content may occasionally be classified as unsafe due to the conservative classification threshold.</span></div>
203
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>False Negatives</b>: Unsafe content may occasionally be missed.</span></div>
204
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Context Sensitivity</b>: Classification performance depends on image quality, visual context, and the provided instruction.</span></div>
205
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Conservative Policy</b>: The model intentionally uses a strict classification threshold and may flag content that would not be considered NSFW under less restrictive moderation policies.</span></div>
206
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Visual Ambiguity</b>: Clothing, poses, artistic styles, and contextual cues may sometimes be difficult to interpret accurately.</span></div>
207
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>Automated Classification</b>: The model should not be treated as a definitive legal or safety determination.</span></div>
208
 
209
  <h2 style="color: #FFFFFF; font-weight: 500; border-bottom: 1px solid #333333; padding-bottom: 8px; margin-top: 32px;">Acknowledgements</h2>
210
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><a href="https://huggingface.co/Qwen/Qwen3.5-4B" style="color: #FF4500; text-decoration: none;">Qwen/Qwen3.5-4B</a>: Base multimodal model used for this project.</span></div>
211
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><a href="https://huggingface.co/datasets/prithivMLmods/ImageShield-Guardrail-Pro" style="color: #FF4500; text-decoration: none;">ImageShield-Guardrail-Pro</a>: Content-safety guardrail dataset used for training VisionGuardrail-4B.</span></div>
212
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><b>TRL</b> – <a href="https://huggingface.co/docs/trl/en/index" style="color: #FF4500; text-decoration: none;">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.</span></div>
213
+ <div style="display: flex; align-items: flex-start; margin-bottom: 10px; color: #FFFFFF;"><span style="margin-right: 12px; color: #FFFFFF; font-weight: bold; line-height: 1.5;">+</span><span style="line-height: 1.5;"><a href="https://huggingface.co/docs/transformers/en/index" style="color: #FF4500; text-decoration: none;">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.</span></div>
214
 
215
  </div>
216
 
 
224
  try {
225
  document.execCommand('copy');
226
  btn.innerText = 'Copied!';
227
+ btn.style.backgroundColor = '#FF4500';
228
+ btn.style.borderColor = '#FF4500';
229
  setTimeout(() => {
230
  btn.innerText = 'Copy';
231
+ btn.style.backgroundColor = '#222222';
232
+ btn.style.borderColor = '#444444';
233
  }, 2000);
234
  } catch (err) {
235
  console.error('Failed to copy text: ', err);