IMAGETUNE
imagetune is a simple GUI to interactively tune image-processing parameters.
It utilizes the hardware accellerated speed of fastplotlib to provide visual feedback that is not slowed down by plotting.
imagetune is simple to use requiring only minimal changes to your code. Simply wrap the functions you wish to tune the parameters of with tune and launch tuneui.
Installation
Install directly with pip:
pip install imagetune
Try it
Run example.
How to use
Here is a simple script to make a binary version of an image:
from skimage.filters import gaussian
from skimage import data
def threshold(im, thres_val):
return im > thres_val
def preprocessing(im):
bg = gaussian(im, 10)
fg = im - bg
segmented = threshold(fg, 0.1)
return segmented
im = data.coins()
result = preprocessing(im)
The script depends on parameters sigma=10 for Gaussian filtering and thres_val=0.1 for the thresholding.
In order to tune these live, simply wrap those functions in tune and launch tuneui:
from skimage.filters import gaussian
from skimage import data
+from imagetune import tune, tuneui
def threshold(im, thres_val):
return im > thres_val
def preprocessing(im):
- bg = gaussian(im, 10)
+ bg = tune(gaussian)(im, 10)
fg = im - bg
- segmented = threshold(fg, 0.1)
+ segmented = tune(threshold)(fg, 0.1)
return segmented
im = data.coins()
+tuneui(preprocessing, im)
This launches a window in which the parameters are tunable interactively:
You can also decorate your functions instead
+@tune
def threshold(im, thres_val):
return im > thres_val
Note that the function still works as normal:
output = preprocessing(im)
Only when you run tuneui(preprocessing, im) does it behave differently.
Function requirements
All tunable functions are asssumed to take an image as its first input and return an image as its output.
Choosing parameters
Given a function:
def adjust(im, alpha, gamma):
return alpha * im**gamma
The decorator tune will per standard assume you wish to tune the first parameter (alpha).
You can change this by specifying argnames:
tune(adjust, argnames='gamma')
or argnums:
tune(adjust, argnums=2)
The behavior of the above is identical. You can also tune both parameters, by either
tune(adjust, argnames=('alpha', 'gamma'))
or
tune(adjust, argnums=(1, 2))
Misc
To overwrite function names in the UI, simply pass along a name:
bg = tune(gaussian, name='blur')(im, 10)
You can also choose a min, max of the parameter bar:
bg = tune(gaussian, min=0, max=300)(im, 10)
Metadata
Release files for imagetune 0.1.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 | |
|---|---|---|---|
| imagetune-0.1.1.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imagetune-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / imagetune-0.1.1.tar.gz
| Download URL | imagetune-0.1.1.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
acaafa62d61d618cb8bf58c3f2fe26f09705d7caea8d7c1dddc34ac82c9df273
|
|
BLAKE2b-256 checksum How to use checksums |
260085b935114e7364bade64081529f093a9c51a3657f471d6b6321247537d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 10, 2025.
Transparency logRelease files / imagetune-0.1.1-py3-none-any.whl
| Download URL | imagetune-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73f670a8206e1a103ca2c55219391b2ba1ed35d05ecc5cf1a1a8515cd62742e6
|
|
BLAKE2b-256 checksum How to use checksums |
6a520a5f9ad4616f4cde5302abdc032d7ab527c03014899f5c5d1e4550343b3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 10, 2025.
Transparency log