Python computer vision libraries

Updated Nov 2026

Python computer vision libraries load images and video, transform them, and extract information such as objects, faces, and text. Most current pipelines pass each image through a trained neural network rather than hand-written filters. These libraries let apps and AI agents detect, classify, and measure what appears in images.

Popularity

Pillow, whose count covers all image handling, has the most monthly downloads in this comparison, at 703.4M.

LibraryMonthly downloadsStarsLast releaseLicense
Pillow
703.4M
14.0KOct 2026MIT-CMU
Transformers
119.8M
169.2KNov 2026Apache-2.0
opencv-python-headless
63.0M
5.5KNov 2026Apache-2.0
scikit-image
31.7M
6.6KDec 2025BSD-3-Clause
TorchVision
18.0M
18.0KOct 2026BSD
TensorFlow
12.4M
201.6KMar 2026Apache-2.0
Keras
12.0M
64.4KJul 2026Apache-2.0
timm
11.7M
37.3KNov 2026Apache-2.0
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Provides the maintained fork of the Python Imaging Library.

Downloads / mo
703.4M
Stars
14.0K
Last release
13.0.0
License
MIT-CMU

Quickstart

From tutorial.rst
$ python3 -m pip install pillow
from PIL import Image
im = Image.open("hopper.ppm")

Pillow examples

From open-source projects on GitHub

Defines and runs pretrained models for text, vision, audio, and multimodal tasks.

Downloads / mo
119.8M
Stars
169.2K
Last release
5.23.0
License
Apache-2.0

Quickstart

From clip.md
$ python3 -m pip install "transformers[torch,vision]"
from transformers import CLIPVisionConfig, CLIPVisionModelWithProjection
configuration = CLIPVisionConfig()
model = CLIPVisionModelWithProjection(configuration)

Transformers examples

From open-source projects on GitHub

opencv-python-headless

Wraps the OpenCV Python bindings.

Downloads / mo
63.0M
Stars
5.5K
Last release
5.1.0.95
License
Apache-2.0

Quickstart

From imgproc_transform.html
$ python3 -m pip install opencv-python-headless
import cv2
image = cv2.imread('input.jpg')
resized = cv2.resize(image, (320, 240))

opencv-python-headless examples

From open-source projects on GitHub

Analyzes NumPy images with image-processing, feature-detection, and scientific imaging functions.

Downloads / mo
31.7M
Stars
6.6K
Last release
0.26.0
License
BSD-3-Clause

Strengths

  • Works directly with NumPy images. Apply image processing to ordinary NumPy arrays.
  • Finds image edges with Canny. Compare edge maps using different smoothing strengths.

Limitations

  • Type changes need intensity rescaling. Use image conversion helpers when changing pixel data types.
  • OpenCV colors need channel conversion. Convert BGR images to RGB before processing them.

Quickstart

From plot_canny.py
$ python3 -m pip install scikit-image
import skimage as ski
coins = ski.data.coins()
threshold_value = ski.filters.threshold_otsu(coins)

scikit-image examples

From open-source projects on GitHub

Provides PyTorch vision datasets, pretrained models, image transforms, and image encoding or decoding.

Downloads / mo
18.0M
Stars
18.0K
Last release
0.29.2
License
BSD

Strengths

  • Bundles preprocessing with pretrained weights. Use each weight configuration’s transforms before running inference.
  • Augments CPU and GPU tensors. Use image transforms with PIL images or CPU and CUDA tensors.

Limitations

  • Detection APIs can change. The detection module remains beta without guaranteed backward compatibility.
  • Pretrained weights need matching preprocessing. Apply the selected weight’s transforms to prepare images for inference.
$ python3 -m pip install torchvision
from torchvision.models import resnet50, ResNet50_Weights
model = resnet50(weights=None)

TorchVision examples

From open-source projects on GitHub

TensorFlow

Provides an open-source machine learning framework.

Downloads / mo
12.4M
Stars
201.6K
Last release
2.21.0
License
Apache-2.0

Quickstart

From image_ops_impl.py
$ python3 -m pip install tensorflow
import tensorflow as tf
image = tf.zeros([224, 224, 3])
flipped = tf.image.flip_left_right(image)

Provides multi-backend Keras.

Downloads / mo
12.0M
Stars
64.4K
Last release
3.15.1
License
Apache-2.0

Quickstart

From index.md
$ python3 -m pip install keras tensorflow
from keras.applications.resnet50 import ResNet50
model = ResNet50(weights='imagenet')

Keras examples

From open-source projects on GitHub

Provides PyTorch image models.

Downloads / mo
11.7M
Stars
37.3K
Last release
1.0.31
License
Apache-2.0

Quickstart

From quickstart.mdx
$ python3 -m pip install timm
import timm
m = timm.create_model('mobilenetv3_large_100', pretrained=True)
m.eval()

timm examples

From open-source projects on GitHub

FAQ

opencv-python-headless suits classical image processing and video on servers. TorchVision and timm suit training and running image models in PyTorch. Transformers suits pretrained vision and multimodal models.

OpenCV is an open-source computer vision library with Python bindings for image processing, video capture, and feature detection. The headless package drops GUI dependencies for servers.

Pillow is the maintained fork of the Python Imaging Library. It opens, converts, resizes, and saves images in many formats.

timm, short for PyTorch Image Models, is a collection of pretrained image models with training and inference scripts.

TorchVision provides PyTorch vision datasets, pretrained models, and image transforms.

Keras is a high-level model API that runs on TensorFlow, JAX, or PyTorch. TensorFlow is a full machine learning framework that Keras can use as its backend.

For coding agents

Found your computer vision library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official