Registry / ai-ml / scikit-image

scikit-image

JSON →
library0.26.0pypypi✓ verified 25d ago

scikit-image is an open-source Python library for image processing and computer vision, built on NumPy, SciPy, and other core scientific Python projects. It provides a comprehensive collection of algorithms for tasks such as segmentation, filtering, transformation, feature detection, and analysis. The project is actively maintained, with frequent releases, and version 0.26.0 was released on 2025-12-20.

pip install scikit-image
INSTALL
IMPORT
SIG · SCIKIT-IMAGE
S
scikit-image
ai-mlpythonv0.26.0
Install
15.1s avg
Import
10ms
Disk
803MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.25.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 15.2s
py 3.11
2/3 runs
✓ 14.87s
py 3.12
2/3 runs
✓ 14.93s
py 3.13
2/3 runs
✓ 15.33s
py 3.9
✕ build_error
2/3 runs
803MB installed
● package 803MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

skimage
import skimage as ski
The standard and recommended import alias for scikit-image.
io
from skimage import io
Commonly imported submodule for image input/output operations like imread/imwrite.
filters
from skimage import filters
Commonly imported submodule for image filtering operations.

This quickstart demonstrates loading an example grayscale image using `skimage.data.coins()` and applying a common image filtering technique, Otsu thresholding, from `skimage.filters` to convert it into a binary image. The shapes of the original and processed images are printed to confirm the operations.

import skimage as ski # Load an example image (e.g., coins dataset) image = ski.data.coins() # Apply a basic image processing operation, e.g., Otsu thresholding threshold_value = ski.filters.threshold_otsu(image) binary_image = image > threshold_value print(f"Original image shape: {image.shape}") print(f"Calculated threshold value: {threshold_value}") print(f"Processed (binary) image shape: {binary_image.shape}")
Debug
Known issues
deprecatedThe binary versions of morphological operations (`binary_erosion`, `binary_dilation`, `binary_opening`, `binary_closing`) in `skimage.morphology` are deprecated in favor of their non-binary counterparts (`erosion`, `dilation`, `opening`, `closing`). The binary versions were not significantly faster and sometimes slower.
fix
Replace calls to `skimage.morphology.binary_erosion` with `skimage.morphology.erosion`, `binary_dilation` with `dilation`, etc.
affects: 0.26.0 and later
deprecatedParameters `max_cost` and `max_cumulative_cost` in `skimage.graph.MCP.find_costs` are deprecated as they previously did nothing. A new parameter `max_step_cost` has been introduced.
fix
Remove `max_cost` and `max_cumulative_cost` arguments. If limiting step cost is desired, use the new `max_step_cost` parameter.
affects: 0.26.0 and later
deprecatedThe `area_threshold` parameter in `skimage.morphology.remove_small_holes` is deprecated in favor of `max_size` for clearer API and behavior. `max_size` removes holes smaller than or equal to its value, while the previous parameter only removed strictly smaller ones.
fix
Update calls to `skimage.morphology.remove_small_holes` by replacing `area_threshold` with `max_size`, adjusting the value if necessary to match the desired behavior.
affects: 0.26.0 and later
gotchascikit-image 0.26.0 requires Python 3.11 or newer. Attempting to install with an older Python version will automatically resolve to an older, compatible `scikit-image` version, which may lack recent features and fixes.
fix
Ensure your Python environment is at least 3.11 (preferably 3.12+). Use a virtual environment to manage Python versions and dependencies.
affects: 0.26.0 and later (and generally, new major Python versions for each skimage release)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'skimage'
The scikit-image library is not installed in your current Python environment.
fix
pip install scikit-image
UserWarning: `imread` is deprecated in SciKit-Image 0.19 and will be removed in 0.21. Use `imageio.imread` instead.
The `imread` function directly from `skimage.io` is deprecated in recent versions of scikit-image (0.19 onwards) in favor of using the `imageio` library.
fix
First, install `imageio` (`pip install imageio`), then update your import and usage from `from skimage.io import imread` to `from imageio import imread`.
ValueError: The input image must be a 2D array.
A scikit-image function expecting a 2D (grayscale) image received a 3D (color) image, or an image with an unexpected number of dimensions.
fix
Convert the image to grayscale using `skimage.color.rgb2gray(image)` or select a single channel (e.g., `image[:, :, 0]`) before passing it to the function.
RuntimeWarning: Images past the valid range. Set `clip=True` to clip these values before plotting.
Pixel values in the image array are outside the expected valid range for their data type (e.g., float images with values outside [0, 1] or integer images outside [0, 255]), often after arithmetic operations without normalization.
fix
Normalize or clip the image data to the valid range for its `dtype` using `np.clip(image, 0, 1)` for float images, or scikit-image utility functions like `skimage.util.img_as_ubyte()` or `skimage.util.img_as_float()`.
Upgrade
Version history
0.26.0latest on PyPI · released Dec 20, 2025
Audit
Dependencies
numpyrequiredCore array manipulation and numerical operations.
scipyrequiredAdvanced scientific computing, used for various algorithms.
pillowrequiredImage file format support (reading/writing).
imageiorequiredGeneral-purpose I/O for a wide range of image and video formats.
networkxrequiredGraph-based operations.
tifffilerequiredReading and writing TIFF files.
PyWaveletsrequiredWavelet transforms.
Agent activity
34 hits · last 30 days
node
30
Bingbot
1
OpenAI (training)
1
Resources
scikit-image — pip install scikit-image · libregistry