Skip to main content

A library for face access detection using YOLOv8

Project description

Face-Access Detection Library

working License: MIT PyPI Version

A Python library for face detection using YOLOv8. This library enables real-time face detection via webcam, leveraging the YOLOv8 model for high-performance object detection.

Features

  • Real-time face detection with YOLOv8
  • Easy integration with webcam
  • Customizable detection thresholds and labels

Installation

You can install the library via pip. Run the following command in your terminal:

pip install face-access-detection

Usage

To use the face-access-detection library for face detection, follow these steps:

Basic Usage

from face_access_detection.detector import FaceDetector

# Initialize the FaceDetector
detector = FaceDetector()

# Start the webcam and run face detection
detector.run_webcam()

Custom Configuration

You can customize the face detection by passing parameters to the FaceDetector class. For example, you can set a custom model path, labels, or confidence threshold:

from face_access_detection.detector import FaceDetector

# Define custom parameters
custom_model_path = 'path/to/your/custom/model.pt'
custom_labels = {0: 'Person A', 1: 'Person B'}
custom_confidence_threshold = 0.7

# Initialize the FaceDetector with custom parameters
detector = FaceDetector(
    model_path=custom_model_path,
    labels=custom_labels,
    confidence_threshold=custom_confidence_threshold
)

# Start the webcam with custom settings
detector.run_webcam()

Testing

Ensure that your library functions as expected by writing tests in the tests/test_detector.py file. Here's a basic example of how you might start testing:

def test_face_detection():
    # Initialize the FaceDetector
    detector = FaceDetector()
    
    # Add tests to verify the functionality
    assert detector is not None
    # Further tests can be added here

Running Tests

To run your tests, execute:

pytest

Contributing

Contributions are welcome! If you have suggestions or improvements, please submit a pull request or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Thank you for using face-access-detection!


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

face_access_detection-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

face_access_detection-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file face_access_detection-0.1.1.tar.gz.

File metadata

  • Download URL: face_access_detection-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for face_access_detection-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2ff1a38e175eca55b94236a1d67258d7123b7416837e9564f713483a71d59b7e
MD5 1e7af3935d9dee36e61f07a54a784fa7
BLAKE2b-256 248fa0f15234a355b337b92cae5b2b73dbeaa81d4061cc1d0506ad94bf9f7318

See more details on using hashes here.

File details

Details for the file face_access_detection-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for face_access_detection-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9750372837c47e3d13dc34863351758cdab64926ee55b12d96b3af437194e36
MD5 6600cff272195b3aeea0b2427cbdefd6
BLAKE2b-256 ba53cf31bc2439b04f519497731e9e57270af7650579f9f06c0236d315fef11b

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