Skip to main content

Aiposematic: Scramble & Recover using image key + operation string , By: Fibo Metavinci

Project description

AIPosematic: Overt Adversarial Protection for Digital Art

AIPosematic is a Python package inspired by nature's defense mechanisms, designed to help artists and creators protect their digital artwork in an overt and visually distinctive way. Unlike traditional digital watermarking or covert adversarial examples, AIPosematic applies visible, intentional transformations that signal the work is protected while simultaneously disrupting AI training processes.

How It Works

AIPosematic employs a multi-layered approach to protect digital images:

  1. Visual Signature

    • Applies a unique, visible pattern to the image that serves as a warning to AI systems
    • The pattern is designed to be aesthetically integrated while remaining clearly artificial
    • Functions as a "digital aposematism" - a warning signal in the digital ecosystem
  2. Technical Implementation

    • Pixel Shuffling: Rearranges pixels using a deterministic but non-obvious pattern
    • Key-Based Recovery: Uses a separate key image to reverse the transformation
    • High-Frequency Noise: Adds subtle noise patterns that disrupt feature extraction
    • Edge Manipulation: Modifies edge regions to confuse edge detection algorithms
    • QR Code Integration: Embeds recovery information in visually integrated QR codes
  3. Dual Protection

    • Human-Visible: The protection is intentionally visible to establish clear provenance
    • AI-Disruptive: The transformations are designed to confuse and degrade the performance of AI models
    • Reversible: Original image can be recovered with the proper key and transformation sequence

Installation

pip install aiposematic

Basic Usage

from aiposematic import new_aposematic_img, recover_aposematic_img

# Protect an image
result = new_aposematic_img(
    "original.png",
    op_string='-^+',  # Transformation operations
    scramble_mode='QR'  # Key generation mode
)

# The protected image and cipher key are saved
print(f"Protected image: {result['img_path']}")
print(f"Cipher key: {result['cipher_key']}")

# Recover the original image
recovered_path = recover_aposematic_img(
    result['img_path'],
    cipher_key=result['cipher_key']
)
print(f"Recovered image: {recovered_path}")

Key Features

  • Multiple Scrambling Modes:

    • BUTTERFLY: Creates a butterfly pattern key meant to confuse AI models
    • QR: Generates a pattern of QR codes meant to confuse AI models
  • Customizable Transformations:

    • Chain multiple operations (+, -, ^, etc.) for custom protection schemes
    • Adjust intensity and visibility of protection patterns
  • High-Quality Output:

    • Preserves image quality for human viewers
    • Maintains compatibility with standard image formats

Use Cases

  • Digital Art Protection: Clearly mark and protect digital artwork
  • Dataset Poisoning: Create "do not train" markers for AI datasets
  • Provenance Tracking: Embed recoverable ownership information
  • Ethical AI Development: Create clear visual indicators of usage restrictions

License

MIT License - See LICENSE for details.

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

Acknowledgements

Inspired by natural aposematism and the need for better digital rights management in the age of generative AI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiposematic-0.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiposematic-0.1-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file aiposematic-0.1.tar.gz.

File metadata

  • Download URL: aiposematic-0.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for aiposematic-0.1.tar.gz
Algorithm Hash digest
SHA256 af3057b717f76e308df4c77560da63446c170d18745bbff52aa9dbc463fb1057
MD5 c24dc74c0b61bc10e0af51cf435c669d
BLAKE2b-256 efdbf544b003d954d4154a4e46ca8b3b4cff4af9c72c05aab4f66361312dd2a9

See more details on using hashes here.

File details

Details for the file aiposematic-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: aiposematic-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for aiposematic-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 edae25a9f71825a884c455119a6f9bba773793f997c0e5c0ce2395a770a07516
MD5 4cef3eb72716d7c1c266e8c90a708b22
BLAKE2b-256 5e4d9b7d4e8b6b2a7bc3f55fdbee7face55a4a72250e57e3205c3d7b7dd547d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page