A Zero-Exposure Visual Privacy Buffer for VLMs.
Project description
PrivyLayer-Image (privylayer-img)
A Seperate Upgraded Feature from Privylayer (text based masking)
A Zero-Exposure Visual Privacy Buffer for Vision-Language Models (VLMs).
PrivyLayer is a high-performance, lightweight Python library designed to intercept, detect, and permanently mask sensitive visual data before it ever leaves your local host machine. Built for modern AI workflows, it ensures developers can leverage advanced external VLMs without compromising data sovereignty.
🚀 Features
- Zero Data Exposure: Raw sensitive visual data never leaves your local environment.
- Targeted Document Detection: Specialized computer vision models to identify highly sensitive identity documents like Aadhaar cards, PAN cards, and Passports.
- Irreversible Masking: Applies permanent black-box overlays to confidential regions. Once processed, the original image cannot be reconstructed.
- Hardware Optimized: Designed to leverage dedicated GPUs for parallel processing and real-time inference.
- Typo-Protected Installation: Safely alias-protected on PyPI to prevent typosquatting and accidental wrong installs.
📦 Installation
PrivyLayer requires Python 3.x and a dedicated GPU environment for optimal performance.
Install the official package via pip:
pip install privylayer-img
Note: We also maintain the alias pip install privylayer-image to catch typos. Both commands will safely install the official library.
💻 Quick Start & Usage
Using PrivyLayer requires minimal code to integrate into your existing pipeline. use (privyimage) for importing
import privyimage as pi
# Define the path to your raw, sensitive image
#(supported types: .JPG , .PNG , .WEBP)
img_file_path = "example_aadhaar.jpg"
# Execute the irreversible visual mask
# This will detect the document, apply the black box, and save/return the safe image
pi.mask_img(img_file_path)
⚙️ Core Workflow
PrivyLayer operates on a strict, four-stage localized pipeline:
- Input: The system locally intercepts raw visual data (image uploads, document scans) prior to network transmission.
- Targeted Detect: The engine scans the input to isolate confidential document structures and sensitive identity layouts.
- Images are Irreversible: The visual sanitization process is strictly a one-way pipeline. Once masked, the original visual state cannot be reconstructed.
- Masks: Permanent black box overlays are applied directly onto the detected confidential information, completely obscuring the sensitive pixels before the image is sent out. The masked image is saved in your folder / server to send to the LLM
📊 Performance Benchmarks
PrivyLayer is engineered for speed and compliance, requiring zero external network calls for the sanitization process.
| Hardware Configuration | Latency Performance |
|---|---|
| NVIDIA T4 GPU (Baseline) | 3 – 5 seconds |
| Higher-Tier GPUs (Enterprise) | < 2 seconds |
Infrastructure Impact: Minimal operational overhead. Executes fast, localized pattern matching in real-time.
🛠️ Technical Requirements
To maintain low-latency localized processing and handle real-time computer vision workloads, the host system must meet the following infrastructure criteria:
- GPU Acceleration: Requires dedicated graphics hardware optimized for parallel image processing and computer vision workloads.
- Minimum Requirement: An NVIDIA T4 GPU (or equivalent) to ensure reliable, real-time document detection and instant black-box masking before data transmission.
🧑💻 About the Developer
Engineered by Nithish, a solo developer focused on programming, AI, and data security. PrivyLayer was created as an Atmanirbhar (indigenous) open-source privacy shield to dynamically detect and mask sensitive information, ensuring strict compliance for modern software stacks.
- Portfolio: nithishprogrammer.github.io/Nithish/
- PyPI: pypi.org/project/privylayer-img/
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file privylayer_images-1.3.2.tar.gz.
File metadata
- Download URL: privylayer_images-1.3.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad159e76eda4709f8f8313730e3368094fa79174fd83788219223c3549303f46
|
|
| MD5 |
65115b2dff990ed3bdbd46a9af313c6a
|
|
| BLAKE2b-256 |
515235c333d27b24ba39a54ae05ccd64ddeff4d98375193e96c97ce46e255037
|
File details
Details for the file privylayer_images-1.3.2-py3-none-any.whl.
File metadata
- Download URL: privylayer_images-1.3.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7382cf73daadee371ffc6fe6d5469ea796566b72648a246635f815a3748a9d6e
|
|
| MD5 |
a8538984d33d2b92964fa1c5250001ad
|
|
| BLAKE2b-256 |
680f91017c2e93064fa1ecdc757b16a25d7576ae12fae0ddfb67d707e750ff04
|