Skip to main content

mukham

Mukham (ముఖం; mook-hum) means face in Telugu! mukham is a simple library to detect the largest face in a given image. The face detection is performed using the DNN algorithm provided by opencv-python. The largest face is the box with largest enclosing area from the bounds of candidate faces detected.

Requirements

This package was written and tested in python 3.7+. This package requires the following dependencies:

    numpy>=1.18.1
    opencv-python>=4.1.2.30

Installation

The package can be installed as follows:

    pip install mukham

Usage

The package can be used through one of the following ways.

Command-line interface

    python -m mukham -i/--input path/to/input_image -o/--ouput path/to/output_largest_face -c/--conf confidence_threshold

This will print the top left and bottom right corner of the bounding box for the largest face. The (i)nput argument is required. The (o)utput path is optional, if given will save the largest face image to this path. The (c)onf is optional, otherwise must be a floating point number between 0 and 1 with default value of 0.8.

Code

    from mukham.detector import detect_largest_face

    bounding_box = detect_largest_face(path_to_input_img, out_path=path_to_output_img, min_conf=confidence_threshold)

The in_path is a required argument for path to the input image. The out_path is an optional keyword argument default to None, if given will save the largest face image to this path. min_conf is also a keyword argument with default set to 0.8. detect_largest_face will return a 2x2 array of the top left and bottom right corner of the bounding box for the largest face.

Tests

Unit tests have also been written which can be run as follows:

    python -m unittest mukham.tests.test

Metadata

Release files for mukham 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mukham 1.0.9
File Size Uploaded Provenance Actions
mukham-1.0.9.tar.gz 10.3 MB Without provenance Details for mukham-1.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mukham 1.0.9
File Interpreter ABI Platform Actions
mukham-1.0.9-py3-none-any.whl Python 3 none any Details for mukham-1.0.9-py3-none-any.whl

Total release size: 20.6 MB

Release files / mukham-1.0.9.tar.gz

Download URL mukham-1.0.9.tar.gz
Size 10.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9b40d820d417759295f971a5ec9a956bd8d02d451f77af54c48ef83f7c803de5
BLAKE2b-256 checksum
How to use checksums
14e4821bc8ce625ee5211b7eb80ab715ef1e1631181a0848ab12aa9033bad083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2

Release files / mukham-1.0.9-py3-none-any.whl

Download URL mukham-1.0.9-py3-none-any.whl
Size 10.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e4001886c32340c5023a28c94559af8478c366139357023e6a7f68483085b299
BLAKE2b-256 checksum
How to use checksums
8095eacd42a7817bdd26c42062064f7443993578ac227805e1d6e8cc9e98309b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2

Security for mukham 1.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page