prithivMLmods's picture
Update README.md
d2cb90a verified
|
Raw
History Blame Contribute Delete
5.37 kB
metadata
task_categories:
  - image-text-to-text
size_categories:
  - 10K<n<100K
license: apache-2.0
language:
  - en
pretty_name: ImageShield
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
dataset_info:
  features:
    - name: image
      dtype: image
    - name: response
      dtype: string
  splits:
    - name: train
      num_bytes: 2907368134
      num_examples: 30630
  download_size: 2764757959
  dataset_size: 2907368134

This dataset contains sensitive visual content intended for training Image Guard, Image Filter, and Image Shield models. Due to the sensitive nature of the data, access is gated and requires manual review. Access may be approved for users who provide a valid research, safety, or development purpose.

ImageShield-Guardrail-Pro

ImageShield-Guardrail-Pro is an advanced multimodal dataset containing 30,630 high-resolution samples designed for training, supervised fine-tuning (SFT), and evaluating multimodal safety guardrails and Vision-Language Models (such as Qwen-VL, LLaVA, and ImageShield architectures).

Each sample pairs an image with a rich structured JSON string containing dense scene descriptions (caption), granular binary safety labels (is_nsfw, nsfw, safe), and interpretative rationale (reason) justifying why the image falls under safe or sensitive boundaries.

  • Curator: prithivMLmods
  • Total Samples: 30,630 rows
  • Total Size: ~2.76 GB
  • Format: Parquet (image, response)
  • Modalities: Image, Text
  • Split: Train (30.6k rows)

Dataset Structure & Schema

The dataset includes a source image column along with a structured multimodal string response containing visual analysis and safety evaluation.

Feature Fields

Field Type Description
image Image Target image across diverse styles (photorealistic, 2D anime, 3D renders, digital artwork)
response string (JSON) Structured JSON object detailing caption, classification tags, and rationale

Data Instance Example

{
  "caption": "An anime-style female character with long dark hair stands confidently atop a grassy mountain peak. She wears a black military-style skirt dress over a white top, paired with thigh-high boots and tactical gear including a backpack and utility belt. A large antenna array is mounted on a tripod behind her, surrounded by floating yellow petals against a dramatic backdrop of fluffy white clouds and deep blue sky.",
  "is_nsfw": 0,
  "reason": "The character's attire consists of a standard short skirt and boots, leaving her midriff exposed but not revealing cleavage or significant body parts. The pose is upright and heroic, emphasizing strength rather than seduction. There are no elements suggesting nudity, revealing swimwear, or suggestive modeling.",
  "nsfw": 0,
  "safe": 1
}

Access & Gating Notice

Sensitive Content Warning: This dataset contains sensitive visual content intended for training Image Guard, Image Filter, and Image Shield models. Due to the sensitive nature of the data, access is gated and requires manual review. Access may be approved for users who provide a valid research, safety, or development purpose.

To request access:

  1. Sign in to your Hugging Face account.
  2. Submit an access request specifying your safety alignment, research, or content moderation use case.
  3. Access will be reviewed and granted upon verification.

How to Use

Loading with datasets

import json
from datasets import load_dataset

# Load dataset (requires gated access approval)
dataset = load_dataset("prithivMLmods/ImageShield-Guardrail-Pro", split="train")

# Access and parse a sample
sample = dataset[0]
image = sample["image"]
metadata = json.loads(sample["response"])

print("Scene Caption:", metadata["caption"])
print("Is Safe:", bool(metadata["safe"]))
print("Safety Reasoning:", metadata["reason"])

Formatting for Multimodal SFT (e.g., Qwen-VL / LLaVA)

import json

def format_multimodal_conversation(example):
    data = json.loads(example["response"])
    
    prompt = (
        "Analyze the provided image for content safety and determine whether it contains "
        "any NSFW or policy-violating material. Explain your step-by-step reasoning and provide "
        "the final classification."
    )
    
    response = (
        f"Description: {data['caption']}\n\n"
        f"Safety Analysis: {data['reason']}\n\n"
        f"Verdict: {'Safe' if data['safe'] == 1 else 'NSFW/Unsafe'}"
    )
    
    return {
        "image": example["image"],
        "prompt": prompt,
        "completion": response
    }

Intended Uses

  • Vision-Language Guardrails: Training multimodal safety layers to evaluate prompt and image safety concurrently.
  • Explainable Moderation: Providing actionable interpretability for visual moderation filters instead of opaque binary classifications.
  • Nuanced Boundary Alignment: Teaching models to distinguish stylistic edge cases, active sportswear, and artistic representations from explicit/unsafe material.

License

Distributed under the Apache-2.0 License. This dataset is strictly intended for developing defensive AI guardrails, content moderation frameworks, and image safety solutions.