当前位置: 首页 > Skill >

Deai Image

Deai Image

Deai Image

检测去除AI指纹,删除元数据、添加胶片颗粒、重新压缩,绕过AI图像检测器,适用于Midjourney等。

1.0.0 2026.11.10 836
获取Skill文件查看使用说明
作 者:叶言 许可证: 更新时间:2026.11.10
本文目录展开

AI Image De-Fingerprinting Skill

Comprehensive CLI for removing AI detection patterns from AI-generated images. Transforms detectable AI images into human-camera-like photographs using multiple processing techniques.

Supported Models: Midjourney, DALL-E 3, Stable Diffusion, Flux, Firefly, Leonardo, and more.

Quick Start

# Basic processing (medium strength)
python scripts/deai.py input.png

# Specify output file
python scripts/deai.py input.png -o output.jpg

# Adjust processing strength
python scripts/deai.py input.png --strength heavy

# Only strip metadata (fastest)
python scripts/deai.py input.png --no-metadata

# Batch process directory
python scripts/deai.py input_dir/ --batch

# Pure Bash version (no Python needed)
bash scripts/deai.sh input.png output.jpg

How It Works

AI-generated images contain multiple detection layers:

Detection Vectors

  1. Metadata: EXIF tags revealing generation tool, C2PA watermarks
  2. Frequency Domain: DCT coefficient patterns unique to diffusion models
  3. Pixel Patterns: Over-smoothness, unnatural noise distribution
  4. Visual Features: Perfect lighting, repetitive textures

Processing Pipeline

Our de-fingerprinting pipeline applies 7 transformation stages:

Input → Metadata Strip → Grain Addition → Color Adjustment → 
Blur/Sharpen → Resize Cycle → JPEG Recompress → Final Metadata Clean → Output

Stage Details

Stage Purpose Technique
Metadata Strip Remove EXIF/C2PA/JUMBF tags ExifTool
Grain Addition Add camera sensor noise Poisson/Gaussian noise overlay
Color Adjustment Break color distribution patterns Contrast/saturation/brightness tweak
Blur/Sharpen Disrupt edge detection patterns Gaussian blur + unsharp mask
Resize Cycle Introduce resampling artifacts Downscale → upscale with Lanczos
JPEG Recompress Add compression artifacts Quality 75 → 95 cycle
Final Clean Ensure no metadata leakage ExifTool re-run

Processing Strength

Choose strength based on detection risk vs quality tradeoff:

Strength Description Success Rate Quality Loss
light Minimal processing, preserve quality 35-45% Very low
medium Balanced (default) 50-65% Low
heavy Aggressive processing 65-80% Medium

Success rate = percentage of images passing common AI detectors (Hive, Illuminarty, AI or Not)

Usage Examples

Single Image Processing

# Default medium strength
python scripts/deai.py ai_portrait.png

# Light processing for high-quality images
python scripts/deai.py artwork.png --strength light -o clean_artwork.jpg

# Heavy processing for stubborn detection
python scripts/deai.py midjourney_out.png --strength heavy

Batch Processing

# Process entire directory
python scripts/deai.py ./ai_images/ --batch -o ./cleaned/

# Batch with specific strength
python scripts/deai.py ./gallery/*.png --batch --strength heavy

Metadata-Only Mode

# Only strip metadata (instant, no quality loss)
python scripts/deai.py image.jpg --no-metadata

Using Bash Version

# No Python/Pillow needed, pure ImageMagick + ExifTool
bash scripts/deai.sh input.png output.jpg

# Specify strength
bash scripts/deai.sh input.png output.jpg heavy

Dependencies

Required

  • ImageMagick (7.0+) — Image processing engine
  • ExifTool — Metadata manipulation
  • Python 3.7+ (for deai.py)
  • Pillow (Python imaging library)
  • NumPy (for deai.py)

Check Installation

bash scripts/check_deps.sh

This will verify all dependencies and provide installation commands if missing.

Manual Installation

Debian/Ubuntu:

sudo apt update
sudo apt install -y imagemagick libimage-exiftool-perl python3 python3-pip
pip3 install Pillow numpy

macOS:

brew install imagemagick exiftool python3
pip3 install Pillow numpy

Fedora/RHEL:

sudo dnf install -y ImageMagick perl-Image-ExifTool python3-pip
pip3 install Pillow numpy

Command Reference

deai.py (Python Version)

python scripts/deai.py <input> [options]

Arguments:
  input                 Input image file or directory (batch mode)

Options:
  -o, --output FILE     Output file path (default: input_deai.jpg)
  --strength LEVEL      Processing strength: light|medium|heavy (default: medium)
  --no-metadata         Only strip metadata, skip image processing
  --batch               Process entire directory
  -q, --quiet           Suppress progress output
  -v, --verbose         Show detailed processing steps

Examples:
  python scripts/deai.py image.png
  python scripts/deai.py image.png -o clean.jpg --strength heavy
  python scripts/deai.py folder/ --batch

deai.sh (Bash Version)

bash scripts/deai.sh <input> <output> [strength]

Arguments:
  input                 Input image file
  output                Output file path
  strength              light|medium|heavy (default: medium)

Examples:
  bash scripts/deai.sh input.png output.jpg
  bash scripts/deai.sh input.png output.jpg heavy

Understanding Detection

Common AI Detectors

Detector Method Bypass Rate
Hive Moderation Deep learning model 50-70% (medium)
Illuminarty Computer vision analysis 60-75% (medium)
AI or Not Binary classification 55-70% (medium)
SynthID Pixel-level watermark 35-50% (heavy)
C2PA Verify Metadata check 100% (metadata strip)

What This Skill Cannot Do

❌ Not a Silver Bullet:

  • Cannot guarantee 100% bypass of all detectors
  • Advanced detectors (SynthID) require more aggressive processing
  • New detection methods may emerge

❌ Limitations:

  • Processing reduces image quality (tradeoff necessary)
  • Some detectors use multiple layers (metadata + pixel + frequency)
  • Extremely aggressive processing may introduce visible artifacts

✅ What It DOES Do:

  • Significantly reduces detection probability (40-80%)
  • Removes metadata watermarks (100% effective)
  • Maintains reasonable visual quality
  • Batch processes entire collections

Verification Workflow

  1. Process Image:

    python scripts/deai.py ai_image.png -o clean.jpg --strength medium
    
  2. Test on Multiple Detectors:

    • Hive Moderation
    • Illuminarty
    • AI or Not
  3. If Still Detected:

    • Increase strength: --strength heavy
    • Try multiple passes
    • Manual touch-ups (add slight noise in photo editor)
  4. Quality Check:

    • Compare original vs processed
    • Ensure no visible artifacts
    • Verify colors/details preserved

Advanced Usage

Custom Processing Pipeline

Edit scripts/deai.py to adjust parameters:

# Noise strength (line ~80)
noise = np.random.normal(0, 3, img_array.shape)  # Increase 3 → 5 for more grain

# Contrast adjustment (line ~95)
enhancer.enhance(1.05)  # Increase 1.05 → 1.08 for stronger effect

# JPEG quality (line ~120)
img.save(temp_path, "JPEG", quality=80)  # Decrease 80 → 70 for more compression

Combining with External Tools

# Step 1: De-fingerprint
python scripts/deai.py ai_gen.png -o step1.jpg

# Step 2: Add subtle texture overlay (GIMP/Photoshop)
# (Manual step)

# Step 3: Re-strip metadata
exiftool -all= step1_edited.jpg

Best Practices

For Social Media

  • Use medium strength (good balance)
  • Output as JPEG (universal compatibility)
  • Test on platform's upload flow before posting

For Professional Use

  • Start with light (preserve quality)
  • Manual review each output
  • Keep originals in secure storage
  • Document processing steps

For Research/Testing

  • Use heavy for stress testing
  • Compare multiple detectors
  • Document success/failure patterns

Legal & Ethical Notice

⚠️ Use Responsibly:

This tool is intended for:

  • ✅ Personal creative projects
  • ✅ Academic research on AI detection
  • ✅ Security testing (authorized)
  • ✅ Understanding detection mechanisms

DO NOT use for:

  • ❌ Fraud or deception
  • ❌ Impersonating human creators
  • ❌ Bypassing platform policies without authorization
  • ❌ Creating misleading content

Legal Risks:

  • Some jurisdictions (e.g., COPIED Act 2024) may restrict watermark removal
  • Platform terms of service often prohibit AI content masking
  • Commercial use may have additional legal requirements

You are responsible for compliance with applicable laws and terms of service.

Troubleshooting

"Command not found: exiftool"

# Install ExifTool
sudo apt install libimage-exiftool-perl  # Debian/Ubuntu
brew install exiftool                     # macOS

"ImportError: No module named PIL"

pip3 install Pillow numpy

"ImageMagick policy.xml blocks operation"

# Edit /etc/ImageMagick-7/policy.xml
# Change: <policy domain="coder" rights="none" pattern="PNG" />
# To:     <policy domain="coder" rights="read|write" pattern="PNG" />

Processing is slow on large images

# Pre-resize before processing
magick large.png -resize 2048x2048> resized.png
python scripts/deai.py resized.png

Output looks too grainy/noisy

# Use light strength
python scripts/deai.py input.png --strength light

Development

Running Tests

# Test dependency check
bash scripts/check_deps.sh

# Test single image (verbose)
python scripts/deai.py test_images/sample.png -v

# Test batch mode
mkdir test_output
python scripts/deai.py test_images/ --batch -o test_output/

Contributing

Improvements welcome! Focus areas:

  • New detection bypass techniques
  • Quality preservation algorithms
  • Support for more image formats (HEIC, AVIF)
  • Integration with detection APIs

References

Detection Research:

  • Hu, Y., et al. (2024). "Stable signature is unstable: Removing image watermark from diffusion models." arXiv:2405.07145
  • IEEE Spectrum: UnMarker tool analysis

Open Source Projects:

  • Synthid-Bypass — ComfyUI watermark removal
  • C2PAC — C2PA metadata tools

Detection Tools:

  • Hive Moderation
  • Content Credentials Verify
  • Google SynthID

Version: 1.0.0
License: MIT (for educational/research use)
Maintainer: voidborne-d
Last Updated: 2026-02-23

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • AI Image De-Fingerprinting Skill
    • Quick Start
    • How It Works
      • Detection Vectors
      • Processing Pipeline
        • Stage Details
    • Processing Strength
    • Usage Examples
      • Single Image Processing
      • Batch Processing
      • Metadata-Only Mode
      • Using Bash Version
    • Dependencies
      • Required
      • Check Installation
      • Manual Installation
    • Command Reference
      • deai.py (Python Version)
      • deai.sh (Bash Version)
    • Understanding Detection
      • Common AI Detectors
      • What This Skill Cannot Do
    • Verification Workflow
    • Advanced Usage
      • Custom Processing Pipeline
      • Combining with External Tools
    • Best Practices
      • For Social Media
      • For Professional Use
      • For Research/Testing
    • Legal & Ethical Notice
    • Troubleshooting
      • "Command not found: exiftool"
      • "ImportError: No module named PIL"
      • "ImageMagick policy.xml blocks operation"
      • Processing is slow on large images
      • Output looks too grainy/noisy
    • Development
      • Running Tests
      • Contributing
    • References
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期