VisFeats: Extraction of Global Visual Features from Images
VisFeats is a library for extracting global visual features from images.
Installation
VisFeats is installable via PyPI:
pip install visfeats
Or via GitHub (for the latest development version):
pip install git+https://github.com/ncc-brain/VisFeats.git
Usage
To use VisFeats, first load an image using PIL:
from PIL import Image
image = Image.open("path/to/your/image.jpg")
All functions in VisFeats take a PIL Image.Image as input and return the corresponding feature values. Available features are described below.
Extract multiple features
Use extract_all_features to collect all package-level features, or pass a
feature name or list of names to select a subset. The result is a flat
dictionary.
from visfeats import extract_all_features
features = extract_all_features(image, features=["rms", "hsv_features"])
Mean and entropy of HSV channels
Chromatic features describe color in HSV (Hue, Saturation, Value) space, including channel means and entropies. The hsv_features function returns a dictionary with six keys:
hue_meansaturation_meanvalue_meanhue_entropysaturation_entropyvalue_entropy
from visfeats import hsv_features
features = hsv_features(image)
Spatial frequency features
Spatial frequency features capture the distribution of different spatial frequencies in an image, which relate to the level of detail and texture. The spatial_frequency_features function extracts these features:
fourier_slopefourier_sigmadimensionalityspectral_centroidspectral_variance
from visfeats import spatial_frequency_features
features = spatial_frequency_features(image)
Memorability
While memorability is often considered a subjective property, recent research has shown that it can be predicted from image content. Here the memorability_resmem function estimates intrinsic memorability using the pretrained ResMem model described by Needell and Bainbridge (2022).
ResMem is an optional dependency. It can be installed along with VisFeats using:
pip install "visfeats[resmem]"
Or separately with:
pip install resmem
Then you can use the memorability_resmem function to estimate the memorability of an image:
from visfeats import memorability_resmem
resmem_score = memorability_resmem(image)
Other features
RMS contrast
The rms function computes the root-mean-square contrast as the population standard deviation of the image's grayscale pixel intensities.
from visfeats import rms
rms_contrast = rms(image)
Metadata
Release files for visfeats 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| visfeats-0.1.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| visfeats-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / visfeats-0.1.tar.gz
| Download URL | visfeats-0.1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55567bdcafd70b1db4b2c1cba42e4b48dc163d5e0335b41e5bb9179d78d5c601
|
|
BLAKE2b-256 checksum How to use checksums |
2d2bae0f1ddbf5f5d9b62f4fd0ff9c2ca0a7968d3726b923a7134fd8ddcfe334
|
| 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 9, 2026.
Transparency logRelease files / visfeats-0.1-py3-none-any.whl
| Download URL | visfeats-0.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c531fab8413ef214bcc1b088b7b349d2613e1332ef37226e6282e8b511024ec
|
|
BLAKE2b-256 checksum How to use checksums |
70b36c48f03a8163dfec127adc6ffe678929d18334f3e493ae8dfe4125260d88
|
| 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 9, 2026.
Transparency log