Add previous model documentation
Browse files12345678910111213141516171819202122232425262728293031323334353637383940---language: endatasets:- ShreyashDhoot/reward_model- BaiqiL/NaturalBench_Images- x1101/nsfw-full- Subh775/WeaponDetection---
# Adversarial Image Auditor (Previous Iteration)
This model serves as a deep learning-based image auditor for AI safety, capable of evaluating images and interpreting aligned text prompts across multiple distinct axes:1. **Adversarial Safety (Binary):** Predicting whether an image is Safe or Unsafe.2. **Category Classification:** Placing unsafe images directly into `Safe`, `Hate`, `Harassment`, `Sexual`, `Violence`, `Illegal Activity`, or `Sensitive IP` categories.3. **Artifact / Seam Quality:** Assessing the quality of image manipulation to detect adversarial seams or diffusion artifacts.4. **Relative Adversarial Score:** Predicting a continuous metric of adversarial strength in an image.5. **Prompt Faithfulness:** Calculating CLIP-based cosine similarity between the image embedding and text token embeddings.
## Architecture
This previous implementation of the neural auditor acts as an end-to-end convolutional and attention-based auditor.- **Vision Backbone:** Pretrained DenseNet121, modified to extract feature grids to construct dense 2x2 local spatial maps.- **Text Conditioning:** Simple text tokenizer embedding merged directly with image features via a simplified linear transformation.- **Output:** Multiple specialized heads computing regression (seam quality, relative adversary) and classification (binary, multi-class) output metrics.
## Usage
You can load this model along with its inference script `auditor_inference.py`:
```pythonfrom auditor_inference import audit_image
results = audit_image( model_path="auditor_prev_best.pth", image_path="example.jpg", prompt="A cute cat")
print(results)```auditor_prev_model_card.mdAdded+40