Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.

scramblekit

Image scrambling for privacy-preserving deep learning: the block-wise scrambling schemes LE, ELE, EtC and pixel-based encryption, the adaptation networks that classify scrambled images, scrambling parameter generation, the SIA-GAN inversion attack and ScrambleMix — the official library of four papers by Koki Madono et al., with the keys and conventions of the original research code (checked bit for bit against it).

scramblekit demo

pip install scramblekit            # scrambling, PSNR/SSIM, SPG with SSIM - NumPy + Pillow only
pip install "scramblekit[all]"     # + PyTorch/torchvision (networks, SIA-GAN, ScrambleMix) + LPIPS
scramblekit demo --out demo/       # scramble a bundled sample image with every scheme (CPU, ~1 s, no downloads)
import numpy as np
import scramblekit
from scramblekit.scramble import ELE

img = scramblekit.sample_image()                    # 128x128 RGB uint8 (public-domain photo)
ele = ELE(key=0, image_size=128)                    # extended learnable encryption, 4x4 blocks, seed 0
scrambled = ele(img)                                # also PIL images and (N, 3, H, W) torch tensors
assert np.array_equal(ele.inverse(scrambled), img)

from scramblekit.models import build_model          # needs scramblekit[torch]
net = build_model("shakepyramidnet", num_classes=10, adaptation="ele")  # ELE-AdaptNet + ShakeDrop PyramidNet-110
Paper Module
Block-wise Scrambled Image Recognition Using Adaptation Network (AAAI-20 WS AIoT) — arXiv:2001.07761, project scramblekit.scramble (LE, ELE, EtC, PE, block shuffling), scramblekit.models (LE-/ELE-AdaptNet, ShakeDrop PyramidNet)
Scrambling Parameter Generation to Improve Perceptual Information Hiding (Electronic Imaging 2021) — DOI, project scramblekit.spg, scramblekit.metrics (LPIPS, PSNR, SSIM)
SIA-GAN: Scrambling Inversion Attack Using Generative Adversarial Network (IEEE Access 2021) — DOI, project scramblekit.attack
ScrambleMix: A Privacy-Preserving Image Processing for Edge-Cloud Machine Learning (PSIVT 2023) — DOI, project scramblekit.augment

Command line: scramblekit demo | train | spg | attack | cite (--dataset fake for smoke runs without downloads). Documentation, the Colab notebook, the list of paper-vs-code differences and the links to the paper repositories: https://github.com/MADONOKOUKI/scramblekit

If scramblekit helps your research, please cite the paper(s) of the modules you use: scramblekit cite (or scramblekit.cite(name)) prints the BibTeX entries.

Metadata

Release files for scramblekit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scramblekit 0.1.0
File Size Uploaded
scramblekit-0.1.0.tar.gz 207.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scramblekit 0.1.0
File Interpreter ABI Platform
scramblekit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 338.1 kB

Release files / scramblekit-0.1.0.tar.gz

Download URL scramblekit-0.1.0.tar.gz
Size 207.9 kB
Tags Source
SHA-256 checksum
How to use checksums
881e3ed8f5d54ddee896aadb53b571dc61ba8638225ef7c985a5c35b46de76d2
BLAKE2b-256 checksum
How to use checksums
3415870e11c034ffd827fb3154951c484b965e4f9cf71932a6b51e4c78f78072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / scramblekit-0.1.0-py3-none-any.whl

Download URL scramblekit-0.1.0-py3-none-any.whl
Size 130.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30d01a5deb97f5032067bcd18947c5356dab3ba475f816aeb27b7e6f589c01d2
BLAKE2b-256 checksum
How to use checksums
14ac582f3a0bb0adca94cf4ec04bdf43da173edc6e039030c17eaabc42ff8b00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page