Skip to main content

dicleak

Dataset integrity auditor for medical-imaging AI. Point it at a dataset manifest CSV and it catches the flaws that sink models and papers before you train: patient-level data leakage across splits, single-class splits, broken stratification, tiny test sets, duplicate files, un-deidentified IDs.

医学影像 AI 数据集完整性审计工具。对 manifest CSV 跑一遍,在训练之前 揪出致命缺陷:病人级数据泄露、单类别数据划分、分布失衡、测试集过小、 文件重复、未脱敏的 ID。

Install

pip install dicleak

Usage

dicleak splits.csv
dicleak splits.csv --report audit.md
dicleak splits.csv --report audit.md --cta "https://your-service.example/audit"

The manifest CSV needs three columns (headers are flexible):

concept accepted headers
patient id patient_id, patientid, patient, subject_id, subject, pid
split split, subset, fold, partition, set (train/val/test and common aliases)
label label, class, target, diagnosis, annotation
file path (optional) filepath, file_path, path, filename

Exit code is 0 when the score is 60+, 1 otherwise — handy for CI gates.

The 7 checks

# check severity
1 patient-level leakage across splits CRITICAL
2 split containing a single class CRITICAL
3 label distribution drift between splits HIGH
4 test split < 10% (or any split < 5%) MEDIUM
5 duplicate files in the manifest MEDIUM
6 patient IDs that look like real names HIGH
7 too few unique patients LOW/MEDIUM

Why this exists

A disturbing share of medical-AI papers report inflated accuracy because the same patient ended up in both the training and test sets. Reviewers now check for this. dicleak makes the check a one-liner.

Sample

samples/flawed_splits.csv is a deliberately broken manifest (leaked patients, single-class val split, tiny test set, name-like IDs...). It scores 26/100:

dicleak samples/flawed_splits.csv

License

MIT

Metadata

Release files for dicleak 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 dicleak 0.1.0
File Size Uploaded Provenance
dicleak-0.1.0.tar.gz 8.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 17.7 kB

Release files / dicleak-0.1.0.tar.gz

Download URL dicleak-0.1.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e6efeb5b09cca84bbed1e3b38dbf017e9889a89fa319e23f6717c0a8a0704565
BLAKE2b-256 checksum
How to use checksums
5819caa3c348a98f80eca3340b5a81850761168f47a80d9d015a2b3ea41b04fe
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 Oct 12, 2026.

Transparency log

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

Download URL dicleak-0.1.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
130bf0242312efa13afbe42160be25fdb6b44192a05415dda93eed63b0cf7aaf
BLAKE2b-256 checksum
How to use checksums
0722f1450192df33c6d15918baf58b4f6f20c74f8e42cd0fe5a06e9ff38efe73
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 Oct 12, 2026.

Transparency log

Security for dicleak 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dicleak-0.1.0.tar.gz

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 Oct 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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