skillfed

mtcnn

Multitask Cascaded Convolutional Networks for face detection and alignment (MTCNN) in Python >= 3.10 and TensorFlow >= 2.12

mtcnn v1.0.0 3.8M downloads/30d#2,493 on PyPI2,483
Permissive license MIT DORMANT released

What it is and what it does

MTCNN is a face detection and alignment library that uses a three-stage cascaded convolutional network (PNet, RNet, ONet) to locate faces in images and extract facial landmarks. It returns bounding boxes and keypoint coordinates (eyes, nose, mouth) for each detected face along with confidence scores. The package is designed for Python >= 3.10 and requires TensorFlow >= 2.12 as its primary external dependency.

The library provides a simple API: instantiate an MTCNN detector, load an image, call detect_faces(), and receive structured output with box coordinates, landmark positions, and confidence values. Maintenance is dormant but the codebase is stable; the repository has not been archived and retains 2483 stars. No known vulnerabilities are recorded.

Use it for:

  • Detect faces in photos for automated cropping, tagging, or privacy masking in image processing pipelines.
  • Extract facial landmarks to feed into downstream face recognition or emotion detection models.
  • Build face-aware image galleries or applications that need to locate and align faces.
  • Perform batch face detection on large image datasets for training or annotation workflows.
  • Implement face detection in video frames for security or interactive applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Detects faces and facial landmarks (eyes, nose, mouth) in images using a cascaded convolutional network, returning bounding boxes and keypoint coordinates.

Yes, if you need face detection and landmark extraction in Python >= 3.10. The package has low install friction, permissive licensing, no known vulnerabilities, and a stable codebase with 2483 GitHub stars. The main trade-off is dormant maintenance—no active development for 675 days—so expect no new features or rapid bug fixes. It is suitable for production use in stable environments but not for projects requiring ongoing support.

Install

mtcnn on PyPI

pip

pip install mtcnn

uv

uv add mtcnn

poetry

poetry add mtcnn

Installing mtcnn

Before you install

Low friction installation with only joblib and lz4 as runtime dependencies. Maintenance is dormant—last release was 675 days ago—but the repository remains active with 2483 stars and has not been archived, suggesting the package is stable rather than actively developed.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install mtcnn
from mtcnn import MTCNN
from mtcnn.utils.images import load_image

detector = MTCNN(device="CPU:0")
image = load_image("photo.jpg")
result = detector.detect_faces(image)
print(result)

Requires Python >= 3.10 and TensorFlow >= 2.12; TensorFlow must be installed separately or via pip install mtcnn[tensorflow].

Verify before relying

  • Whether the package's performance characteristics (speed, accuracy) meet your application's requirements compared to alternatives.
  • GPU device support and whether CUDA/GPU acceleration is available beyond the CPU:0 example shown.
  • Batch processing capabilities and performance characteristics on large image datasets.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — joblib, lz4
Maintenance dormant — 675 days since the last release
Last repo commit
First released
Downloads 3,806,628/month — #2,493 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mtcnn-1.0.0-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

face detection pythonfacial landmark detectionmtcnn face detectorface bounding box extractionfacial keypoint localizationcascade cnn face detectionface alignment coordinates
computer-visionface-detectiontensorflow

More Artificial Intelligence packages