dlib
A toolkit for making real world machine learning and data analysis applications
What it is and what it does
dlib is a production-grade C++ toolkit for machine learning and computer vision that exposes its core algorithms through Python bindings. It provides building blocks for classification, regression, and image processing tasks. The package is designed for real-world applications and has been actively maintained since its early releases.
The main trade-off is installation friction: dlib compiles from source on most systems, requiring a C++ compiler and build tools. Once installed, it offers no runtime dependencies, making it lightweight for deployment. It's widely used in production systems and has strong community adoption.
Use it for:
- Build machine learning classifiers on image or tabular data using dlib's algorithms.
- Perform image processing tasks like resizing, filtering, and feature extraction for computer vision workflows.
- Create real-time video analysis applications that require efficient C++ performance with Python ease-of-use.
- Develop data analysis applications combining machine learning with computer vision capabilities.
- Integrate machine learning models into C++ applications through the toolkit's native interface.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
dlib is a C++ machine learning and computer vision toolkit with Python bindings, providing algorithms for image recognition, classification, and data analysis.
Yes, with conditions. dlib is worth installing if you need robust machine learning or computer vision capabilities and can tolerate the compilation overhead during setup. The library is actively maintained, has no known security vulnerabilities, and carries a permissive license. However, ensure your development environment has a working C++ compiler and CMake before attempting installation.
Install
dlib on PyPI
pip
pip install dlibuv
uv add dlibpoetry
poetry add dlibInstalling dlib
Before you install
Installation requires compilation from source (high friction). The package is actively maintained with a recent release and strong community adoption, but build dependencies and platform-specific compilation steps may complicate setup on some systems.
License in practice
Licensed under Boost Software License, which permits use in both open-source and closed-source commercial software with minimal restrictions. License treatment is marked unclear in the metadata, so review the actual license terms before relying on this classification.
Quickstart
pip install dlib
import dlib
detector = dlib.get_frontal_face_detector()
Requires a C++ compiler and CMake to build from source; compilation may take several minutes depending on system resources.
Verify before relying
- Exact Python version support range (requires_python is unspecified in metadata)
- Whether pre-built wheels are available for all major platforms or if compilation is always required
- Availability and performance impact of optional AVX instruction support mentioned in documentation
- Whether face detection and landmark extraction are available in the Python API or C++-only features
Package facts
| License | Boost Software License (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 138 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 198,043/month — #9,742 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dlib-20.0.1.tar.gz
Keywords: dlib, Computer Vision, Machine Learning
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dlib-bindlib-bin provides pre-compiled binary wheels of…
unclear · top 5,000 on PyPI
depthaiPython bindings for the DepthAI C++ library,…
permissive · top 15,000 on PyPI
face-recognitionDetects, locates, and identifies faces in…
permissive · top 15,000 on PyPI
dyNET38DyNet38 is a Python binding for DyNet, a C++…
permissive · top 15,000 on PyPI
pupil-apriltagsPython bindings for the AprilTags v3 library,…
permissive · top 15,000 on PyPI
face_recognition_modelsProvides pre-trained deep learning models for…
permissive · top 15,000 on PyPI
lightgbmLightGBM is a gradient boosting framework for…
unclear · top 1,000 on PyPI
opencv-python-headlessOpenCV Python bindings for computer vision…
permissive · top 1,000 on PyPI
paddlexPaddleX is a low-code framework for training,…
permissive · top 5,000 on PyPI
opencv-contrib-pythonopencv-contrib-python provides Python bindings…
permissive · top 5,000 on PyPI