Skip to main content

A simple, kid-friendly face recognition library for Python.

Project description

ctu_face

A professional, easy-to-use, and lightweight Python library for face recognition. Designed to be simple enough for kids and beginners, yet robust enough for production!

Features

  • Plug and Play: Pre-bundled with lightweight ONNX face models. No complex setup or manual model downloads required.
  • Smart "Unknown" Handling: Automatically loads bundled random faces to prevent false positives and distinguish the user from strangers.
  • Versatile: Supports live webcams, recorded videos, and single image scans out of the box.

Installation

pip install ctu_face

Usage Examples

1. Live Webcam Recognition

from ctu_face import FaceAI

# Initialize the AI. It automatically loads unknown faces for accuracy!
ai = FaceAI()

# Add people you want to recognize
ai.add_person("Alice", "alice.jpg")
ai.add_person("Bob", "bob.jpg")

# Start the webcam! (Use camera_id=1 for secondary cameras)
ai.start_webcam(camera_id=0)

2. Check a Single Image

from ctu_face import FaceAI

ai = FaceAI()
ai.add_person("Alice", "alice.jpg")

# Scan a single image and show the result
ai.check_image("group_photo.jpg")

3. Check a Video File

from ctu_face import FaceAI

ai = FaceAI()
ai.add_person("Alice", "alice.jpg")

# Scan a recorded video
ai.check_video("party_video.mp4")

Requirements

  • opencv-contrib-python
  • numpy
  • tqdm (for progress bars)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctu_face-0.1.0.tar.gz (79.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctu_face-0.1.0-py3-none-any.whl (79.2 MB view details)

Uploaded Python 3

File details

Details for the file ctu_face-0.1.0.tar.gz.

File metadata

  • Download URL: ctu_face-0.1.0.tar.gz
  • Upload date:
  • Size: 79.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for ctu_face-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f4dbe68d1b64fda54297bed61499c51668633bce0f48b59af0e7ec85807ea471
MD5 045f4604b5dd0b88dc070fe09a809fae
BLAKE2b-256 4c5f2a07cd7c791b2f841bc5372b126b51a79b5e83d43c95a8a7b67332772b70

See more details on using hashes here.

File details

Details for the file ctu_face-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ctu_face-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 79.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for ctu_face-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22d285cb2a54d20cd1612835bcb930a140d21225fabba99a2acb78daedf256a8
MD5 a2aa4c488f5dfa21a34d9fc64dfd9996
BLAKE2b-256 4c8e77eacd76031944191c03b465236f784249fc818bebf9cf3ce6d028b2ed41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page