scikit-image
raw JSON → 0.26.0 verified Tue May 12 auth: no python install: verified
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 Common errors
error ModuleNotFoundError: No module named 'skimage' ↓
cause The scikit-image library is not installed in your current Python environment.
fix
pip install scikit-image
error UserWarning: `imread` is deprecated in SciKit-Image 0.19 and will be removed in 0.21. Use `imageio.imread` instead. ↓
cause 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. error ValueError: The input image must be a 2D array. ↓
cause 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. error RuntimeWarning: Images past the valid range. Set `clip=True` to clip these values before plotting. ↓
cause 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(). Warnings
deprecated The 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.
deprecated Parameters `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.
deprecated The `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.
gotcha scikit-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.
Install
pip install scikit-image[data] pip install scikit-image[optional] Install compatibility verified last tested: 2026-05-12
python os / libc variant status wheel install import disk
3.10 alpine (musl) scikit-image build_error - - - -
3.10 alpine (musl) scikit-image - - - -
3.10 alpine (musl) data build_error - - - -
3.10 alpine (musl) data - - - -
3.10 alpine (musl) optional build_error - - - -
3.10 alpine (musl) optional - - - -
3.10 slim (glibc) scikit-image wheel 9.7s 0.01s 297M
3.10 slim (glibc) scikit-image - - 0.01s 297M
3.10 slim (glibc) data wheel 11.2s 0.01s 301M
3.10 slim (glibc) data - - 0.01s 301M
3.10 slim (glibc) optional wheel 23.6s 0.01s 773M
3.10 slim (glibc) optional - - 0.01s 772M
3.11 alpine (musl) scikit-image wheel - 0.01s 326.0M
3.11 alpine (musl) scikit-image - - 0.02s 325.8M
3.11 alpine (musl) data wheel - 0.01s 330.6M
3.11 alpine (musl) data - - 0.02s 330.4M
3.11 alpine (musl) optional build_error - - - -
3.11 alpine (musl) optional - - - -
3.11 slim (glibc) scikit-image wheel 9.6s 0.01s 312M
3.11 slim (glibc) scikit-image - - 0.01s 311M
3.11 slim (glibc) data wheel 10.5s 0.01s 316M
3.11 slim (glibc) data - - 0.01s 316M
3.11 slim (glibc) optional wheel 22.3s 0.01s 815M
3.11 slim (glibc) optional - - 0.01s 814M
3.12 alpine (musl) scikit-image wheel - 0.01s 311.0M
3.12 alpine (musl) scikit-image - - 0.01s 310.6M
3.12 alpine (musl) data wheel - 0.01s 315.5M
3.12 alpine (musl) data - - 0.01s 315.1M
3.12 alpine (musl) optional build_error - - - -
3.12 alpine (musl) optional - - - -
3.12 slim (glibc) scikit-image wheel 10.0s 0.01s 297M
3.12 slim (glibc) scikit-image - - 0.01s 296M
3.12 slim (glibc) data wheel 10.6s 0.01s 301M
3.12 slim (glibc) data - - 0.01s 301M
3.12 slim (glibc) optional wheel 22.2s 0.01s 792M
3.12 slim (glibc) optional - - 0.01s 791M
3.13 alpine (musl) scikit-image wheel - 0.01s 309.7M
3.13 alpine (musl) scikit-image - - 0.01s 309.1M
3.13 alpine (musl) data wheel - 0.01s 314.2M
3.13 alpine (musl) data - - 0.01s 313.7M
3.13 alpine (musl) optional build_error - - - -
3.13 alpine (musl) optional - - - -
3.13 slim (glibc) scikit-image wheel 9.9s 0.01s 295M
3.13 slim (glibc) scikit-image - - 0.01s 295M
3.13 slim (glibc) data wheel 10.2s 0.01s 300M
3.13 slim (glibc) data - - 0.01s 299M
3.13 slim (glibc) optional wheel 22.2s 0.01s 790M
3.13 slim (glibc) optional - - 0.01s 789M
3.9 alpine (musl) scikit-image build_error - - - -
3.9 alpine (musl) scikit-image - - - -
3.9 alpine (musl) data build_error - - - -
3.9 alpine (musl) data - - - -
3.9 alpine (musl) optional build_error - - - -
3.9 alpine (musl) optional - - - -
3.9 slim (glibc) scikit-image wheel 11.6s 0.22s 302M
3.9 slim (glibc) scikit-image - - 0.19s 302M
3.9 slim (glibc) data wheel 12.3s 0.34s 306M
3.9 slim (glibc) data - - 0.28s 306M
3.9 slim (glibc) optional build_error - 12.9s - -
3.9 slim (glibc) optional - - - -
Imports
- skimage
import skimage as ski - io
from skimage import io - filters
from skimage import filters
Quickstart last tested: 2026-04-24
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}")