This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.2.2.post1 instead.
Reason given by maintainers: accidental version skip
iconoscope
iconoscope is a python package for creating an image dataset with extracting features using vision or multimodal models including DINOv2/3 and CLIP. An image dataset with embeddings can be used to generate a static mosaic where visually similar images are placed near each other, or for exploration of similar images in a notebook.
The name iconoscope comes from the Greek words for image (εἰκών) and to see (σκοπεῖν). The iconoscope "was the first practical video camera tube to be used in early television cameras" (Wikipedia). Fun fact: the photosensitive system within the iconoscope was referred to as a "mosaic"!
From left to right: iconoscope diagram from Wikipedia; Logo image generated by Gemini (prompt: icon for a software library to visualize images based on embeddings; inspired by iconoscope video tube); my attempt at a black and white logo based on the diagram and letters.
Install
Install with pip, uv, or similar.
pip install "iconoscope[all]"
The base package only reads and writes image datasets (create, info,
and loading stored data in Python), with minimal dependencies (h5py, numpy,
pillow, polars). It can be used in WASM/Pyodide environments such as marimo
notebooks running in the browser. Other commands need optional dependencies:
| extra | commands | installs |
|---|---|---|
embed |
embed |
torch, torchvision, transformers, accelerate |
analysis |
umap, cluster, mosaic |
umap-learn, scikit-learn, scipy, lap |
all |
everything | both of the above |
For example, pip install "iconoscope[analysis]" to generate mosaics from a
dataset that already has embeddings.
Usage
iconoscope functionality is currently command-line only. The typical workflow is:
createan image dataset based on a directory of images (may be nested); saves an HDF5 fileembedthose images with one or more models and save the features- Generate a
mosaicfrom model embeddings (automatically generatesumapcoordinates) - You can optionally generate
umapcoordinates orclusterassignments.
Run iconoscope info to get a report of the data included in a dataset.
Run iconoscope <command> --help to see available options for each command.
create
Create an image inventory by discovering and validating local images. This step does not load an embedding model.
iconoscope create path/to/images/ my_collection.h5
iconoscope will search for image files anywhere within the specified image
directory. Supported image extensions (case-insensitive) are
.jpg, .jpeg, .png, .tiff, .webp, and .avif. Use --limit N to
include at most N images (an arbitrary subset).
embed
Extract features with a pre-trained image model and save them to an existing dataset:
iconoscope embed my_collection.h5
iconoscope embed my_collection.h5 --model siglip --center-crop 60 --grayscale
Available models (-m/--model):
| name | Hugging Face model |
|---|---|
dinov2 |
facebook/dinov2-base (default) |
dinov3 |
facebook/dinov3-vitb16-pretrain-lvd1689m |
resnet |
microsoft/resnet-50 |
siglip |
google/siglip-base-patch16-224 |
clip |
openai/clip-vit-base-patch32 |
Preprocessing options:
--center-crop CROP: square center crop retaining CROP percent (0–100] of the shortest edge; replaces the model's default resize/crop--grayscale: convert images to grayscale before embedding
Each model + preprocessing combination is stored in the dataset under a separate
configuration, labeled model/key (e.g. dinov2/defaults,
siglip/center_crop=0.6_grayscale), so multiple configurations can coexist in
one dataset. If features for a configuration already exist, embed does
nothing unless -u/--update is given; updating replaces previously saved features and
removes any UMAP or cluster results associated with the previous features.
If an image becomes unreadable after the inventory is created, embedding skips it. When adding the first configuration, the skipped image is removed from the dataset's shared image inventory so paths and feature rows remain aligned. Once any features have been saved, images cannot be removed because that would invalidate existing rows; embedding reports an error instead.
Selecting stored features
Commands that use stored features (mosaic, cluster, umap) select a
configuration either with the same --model / preprocessing options used for
embed, or with -c/--config MODEL/KEY (as shown by info); the two cannot
be combined. If neither is given and the dataset has only one configuration,
that one is used; otherwise the default model (dinov2) with default
preprocessing is used.
umap
Calculate and save 2D UMAP coordinates for stored features. With no model or
configuration specified, UMAP is calculated for all stored configurations;
--config can be repeated. Existing coordinates are kept unless -u/--update
is given.
iconoscope umap my_collection.h5
iconoscope umap my_collection.h5 -c dinov2/defaults -c clip/defaults --update
UMAP is not run with a fixed seed, so results vary between runs; saving them lets mosaics and notebooks reuse the same layout.
mosaic
Generate a mosaic image where visually similar images appear near each other:
iconoscope mosaic my_collection.h5
iconoscope mosaic my_collection.h5 -m clip --size 3000x1500 -o clip_mosaic.png
If UMAP coordinates for the selected embeddings are generated and saved if not yet available. The mosaic grid is determined by the output size and number of images, and is optimized for the most frequent image aspect ratio in the dataset. Images are slotted into the grid based on UMAP coordinates. Images are scaled and center-cropped to fill their grid cell.
Options:
-o/--output: output path (default: dataset name with.jpg, e.g.my_collection.jpg)-s/--size: output size, a single number for a square orWIDTHxHEIGHT(default: 2000)--jpeg-quality: 1–100, for JPEG output only-l/--limit N: use at most N images
If the canvas is too small for the number of images, the error message
suggests a --limit or --size that would work.
Example output
Here is an example of an image generated by iconoscope mosaic; this mosaic generated from 1000 images from Princeton Geniza Project fragments, based on feature embeddings from SigLIP with a center crop of 60%.
cluster
Cluster stored features with k-means and save the labels to the dataset:
iconoscope cluster my_collection.h5 8
Prints the number of images per cluster. Results for different numbers of clusters are stored separately.
info
Report dataset contents: schema, number of images and source directory, most common image size and aspect ratio, and for each stored configuration the feature dimensions, UMAP coordinates, and cluster results. Example:
iconoscope info my_collection.h5
Details for my_collection.h5 :
schema: iconoscope 0.2
4,302 image paths from /path/to/images
Most frequent image size: 1024x768
Most frequent aspect ratio: 1.33
dinov2/defaults extracted features (4302x768)
umap coordinates (4302x2)
4,302 cluster labels (kmeans, k=8)
Notebooks
The notebooks/ directory has marimo
notebooks for exploring datasets: UMAP → grid animation, nearest neighbor
comparison across models, and an experimental PGP image explorer. See
notebooks/README.md for details and usage.
HDF5 file layout
iconoscope stores image paths, extracted features, and derived data (UMAP coordinates, cluster labels) in a single HDF5 file (schema version 0.2), organized per model and preprocessing configuration so multiple configurations can coexist in the same dataset. All datasets are gzip-compressed.
my_collection.h5 (attrs: schema="iconoscope", schema_version=0.2)
└─ image/ (attrs: image_dir)
├─ paths # image file paths relative to image_dir, shape (N,)
├─ sizes # image width and height in pixels, shape (N, 2)
└─ models/ # [optional, added by `embed`]
└─ dinov2/ # one group per model
└─ defaults/ # one group per preprocessing configuration (key)
│ # (attrs: model, model_id, and any set options,
│ # e.g. center_crop, grayscale)
├─ features # embedding vectors, shape (N, embed_dim)
├─ umap # 2D UMAP coordinates, shape (N, 2) [optional, added by `umap`/`mosaic`]
└─ clusters/ # [optional, added by `cluster`]
└─ kmeans_8 # cluster label per image, shape (N,)
# (attrs: method, n_clusters)
The configuration key is defaults when no custom preprocessing options are specified and model defaults are used.
Otherwise, the key is based on the combined set of options, e.g. center_crop=0.6_grayscale
(center_crop is stored as a fraction). Cluster datasets are named
{method}_{n_clusters}; kmeans is currently the only supported method.
image_dir is stored as an absolute path when the dataset is created, and
image paths are stored relative to it; iconoscope combines them when loading,
so a dataset can be used from any working directory. If the image directory
moves, the image_dir attribute will need to be updated. All datasets in image/ and under
each configuration share the same row order: row i is the same image
everywhere. Image order is fixed once any features are stored.
iconoscope validates the file type, schema and schema_version attributes,
and required image/ contents when opening a dataset; files from other
schema versions are rejected.
Acknowledgments
Version 0.1 of this package was a vibe-coded prototype which started as a python port of Andrej Karpathy's CNN embedding visualizer created with ClaudeCode.
Version 0.2 is a complete rewrite. Development has been supported by AI coding tools, primarily OpenCode and Anthropic models; see commit history for specifics.
License
Apache 2.0
Metadata
Release files for iconoscope 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iconoscope-0.2.2.tar.gz | 34.7 kB | Without provenance | Details for iconoscope-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iconoscope-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for iconoscope-0.2.2-py3-none-any.whl |
Total release size: 74.4 kB
Release files / iconoscope-0.2.2.tar.gz
| Download URL | iconoscope-0.2.2.tar.gz |
|---|---|
| Size | 34.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60cb587d1b22015d3a7a8bf5e39952960e1f103084f28defa4f2a06401f9b5a6
|
|
BLAKE2b-256 checksum How to use checksums |
b562f96146abf5d676e0cf53e4b5eadc5b1f142b3500726401fabf25379daccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / iconoscope-0.2.2-py3-none-any.whl
| Download URL | iconoscope-0.2.2-py3-none-any.whl |
|---|---|
| Size | 39.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28d9dbaa5b920bc72a9ba75a1eee2cdd4444b65a63ee6bb35585dbad5c839799
|
|
BLAKE2b-256 checksum How to use checksums |
00cf35ceb370db7bda2116e2ed078e87dad3bb9d8fb5eebf69d0148b0b20620a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for iconoscope 0.2.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.