A package for computing entropy-based diversity measures on image sets
Project description
MEASURING DIVERSITY OF IMAGE SETS
Assess a set of image's diversity by computing an approximation of the Entropy of the images' mappings into a pre-trained network latents.
Installation
Install from test.pypi:
pip install -i https://test.pypi.org/simple/ image-diversity
Usage (console)
To compute the Truncated CLIP Entropy (TCE) of a set of images in a directory, run
python3 -m image_diversity <path/to/dir>
To compute the Truncated Inception Entropy (TIE), change the div_type option to TIE
python3 -m image_diversity <path/to/dir> --div_type TIE
Arguments
python3 -m image_diversity <path/to/dir>
--div_type <str> Encoding network: TCE (default) or TIE
--n_eigs <int> Number of eigenvalues for truncation (default: 20)
--device <str> Device to use. Automatic by default
--batch_size <int> Batch size for data loading (default: 16)
Usage (script)
Computing Truncated CLIP Entropy (TCE)
from image_diversity import ClipMetrics
clip_metrics = ClipMetrics()
tce = clip_metrics.tce("path/to/img/dir")
Computing Truncated Inception Entropy (TIE)
from image_diversity import InceptionMetrics
inception_metrics = InceptionMetrics()
tie = inception_metrics.tie("path/to/img/dir")
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 image_diversity-0.1.5.tar.gz.
File metadata
- Download URL: image_diversity-0.1.5.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce792130d5442c961a051932f8ff849e00603c14dc98310f30cae1a7dd3c70bc
|
|
| MD5 |
b76731ed11872687fa357eaeb656ba01
|
|
| BLAKE2b-256 |
78f1db07d46bb9ffc9d11d19f05bb4ae08d28bda69746b4c4a6c2c0f99f4ea39
|
File details
Details for the file image_diversity-0.1.5-py3-none-any.whl.
File metadata
- Download URL: image_diversity-0.1.5-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
152223576de75d0758ff92d8742fc736124f9f069735e1eb9543b591692ea446
|
|
| MD5 |
9df4d4bb3ab6fd807ef9f7a57f4054e5
|
|
| BLAKE2b-256 |
b05fdb5981870ceee973a3070498cfbefe952c270d128dacd136ac4ae54b4e62
|