Skip to main content

A basic library to crop largest face from the images.

Project description


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.


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



The package can be installed as follows:

    pip install mukham


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

the input argument is required. The -c/--conf is optional, otherwise must be a floating point number between 0 and 1 with default value of 0.8.


    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 out_path is an optional keyword argument default to None. 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.

Project details

Download files

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

Files for mukham, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size mukham-1.0.0-py3-none-any.whl (4.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mukham-1.0.0.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page