D

AI Face Swap Tools

DeepFace: Free Open-Source Face Recognition Framework

github.com · checked 21 Oct 2026

Lightweight Python toolkit for face matching and facial attribute analysis.

How it plugs in

—Public API
YesOpen source
YesFree tier

Signal on AI Face Swap Tools7.7#1 of 57

DeepFace is a free Python toolkit under the MIT licence for recognizing faces and examining facial attributes. Its functions handle face matching, folder-based identity lookup, embedding generation, demographic and emotion analysis, and video streams. You can run it locally, in Docker or through self-hosted REST and gRPC services. A managed API is also available.

DeepFace home page

Review

In a line

DeepFace brings face recognition together with analysis of attributes including age, gender, emotion and race in an open-source Python library.

What it does

Its workflow combines face detection, alignment, normalization, representation and verification or recognition. The verify function checks whether two images show the same person, while find searches for a face in a file-based image database.

The represent function creates multidimensional face-embedding vectors. Through analyze, the library estimates age, gender, emotion and race. The stream function handles recognition and attribute analysis from webcams or video streams.

The library wraps a range of recognition systems, such as VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet and Buffalo_L. Detector choices include OpenCV, SSD, MTCNN, RetinaFace, MediaPipe, YOLO, Dlib, YuNet and CenterFace.

How it connects

DeepFace is MIT licensed and can run self-hosted on Linux, macOS or Windows, through an API, or on the web. Installation is available from PyPI or source, using TensorFlow, PyTorch or ONNX Runtime backends. The current package requires Python 3.8 or newer.

You can expose verification, representation, analysis, registration and search through REST or gRPC. Inputs can be uploaded files, local paths, URLs or base64-encoded image data. Similarity checks support cosine, Euclidean, normalized Euclidean and angular distance.

Operations backed by databases can use PostgreSQL, MongoDB, Neo4j, pgvector, Pinecone, Milvus, Qdrant or Weaviate. DeepFace also offers an optional check that estimates whether a face image is genuine or spoofed.

The separate deepface.dev service offers a managed API for verification, embedding generation and vector comparison. It provides REST and MCP access, account keys, usage details and billing without requiring you to manage GPU infrastructure.

Good fit

DeepFace suits developers and teams that need face verification, folder-based identity search, facial attribute analysis or embeddings in a Python project.

It is useful when one interface needs to cover detection, alignment, recognition and analysis, or when you want to run the system on your own infrastructure.

Watch for

The project is MIT licensed, but the recognition models and detector components it wraps can have separate licenses. Check those terms before production use.

Dependency packaging can be difficult because base requirements and optional backend extras have contradictory declarations. A reported TensorFlow import problem on Python 3.11 was resolved by using Python 3.8.

VGG-Face is unavailable through the hosted service because its released weights are restricted to non-commercial research use. InsightFace-based ArcFace models also need a separate commercial license.

Pricing

The open-source DeepFace package is free and self-hosted under the MIT license. A free trial is available through the hosted service.

The hosted service has an anonymous trial with 10 API calls monthly and one standard API key. A full account includes 50 free calls per month, while an active saved card allows 100 free calls per month.

The Enterprise plan is price on request and uses custom contracts. It adds higher rate limits, dedicated queue capacity, service-level agreements and custom privacy controls.

Verdict

Choose DeepFace if you want a free, self-hosted Python framework with several face models, detector choices, database connections and REST or gRPC access.

Check model and detector licensing, Python compatibility and dependency setup before committing. The managed API may suit teams that do not want to maintain GPU infrastructure, while its model and usage limits need review for commercial workloads.

Our take

DeepFace is a practical choice for teams building face verification, search, embeddings or attribute analysis into Python software. Its MIT-licensed package supports local and self-hosted deployments, many model and detector options, and several databases. The main checks are licensing for wrapped components, Python and dependency compatibility, and whether the hosted service’s model exclusions and free-call limits fit the project. Choose the managed API when operating infrastructure is a concern; choose the package when control and self-hosting matter more.

  • Free MIT-licensed Python package
  • Supports verification, search, embeddings and attribute analysis
  • REST and gRPC APIs are available
  • Connects with several databases
  • Runs self-hosted or through a managed API
  • Wrapped models and detectors may have separate licenses
  • Dependency declarations can create installation friction
  • Python 3.11 TensorFlow issues have been reported
  • VGG-Face is unavailable through the hosted service
  • Hosted free access has monthly call limits
  • Pick it ifPython projects needing face verification or analysis; Teams that want self-hosted face processing; Users needing embeddings with database-backed search
  • Skip it ifYou need unrestricted hosted usage beyond the free call allowances; You cannot review separate model and detector licenses; Your environment depends on Python 3.11 TensorFlow imports

Pricing

The core package is free. Hosted access includes 10 anonymous calls monthly, 50 with a full account, or 100 with a saved card. Enterprise pricing is custom.

  • Anonymous trial10 API calls monthly · one standard API keyFree
  • deepface.dev free access10 free calls per month anonymously · 50 free calls per month with a full account · 100 free calls per month with an active saved cardFree
  • deepface.dev free allowance50 API calls monthly for confirmed accounts · 100 with a saved cardFree
  • DeepFace open-source packageMIT-licensed Python library · self-hostedFree
  • Open-source DeepFaceMIT-licensed Python libraryFree
  • deepface.dev EnterpriseCustom contracts · Higher rate limits · dedicated queue capacity · SLAs · custom privacy controlsOn request

As docs.deepface.dev lists them, checked 21 Oct 2026.

Questions

Is DeepFace free?

Yes. The open-source package is free under the MIT license. The hosted service also has free monthly call allowances.

What can DeepFace analyze?

It can compare two supplied faces, look for an identity in an image folder, produce face embeddings, and estimate age, gender, emotion and race.

Can DeepFace run without a hosted service?

Yes. It can run locally or in Docker and expose self-hosted REST or gRPC services.

Which inputs does its API accept?

The API accepts uploaded files, local paths, URLs and base64-encoded image data.

Which databases can DeepFace use?

Database operations can connect to PostgreSQL, MongoDB, Neo4j, pgvector, Pinecone, Milvus, Qdrant and Weaviate.

Are all wrapped models cleared for commercial use?

Not necessarily. The project warns that wrapped models and detector components can have separate license obligations. The hosted service therefore does not offer VGG-Face.

Does DeepFace offer a managed API?

Yes. deepface.dev provides managed verification, embedding generation and vector comparison through REST and MCP access.