Saravanan666/pypi-org huggingface dataset:
Package: face-detector
Face DetectorPython package and Command Line Tool for state-of-the-art face detection and face
landmark points localization. It gathers the techniques implemented in dlib and
mtcnn, which can be easily switched between by setting a parameter in the
FaceDetector class instantiation (dlib_5 is default if no technique is
specified, use dlib_5 for dlib with 5 landmarks and dlib_68 for dlib with 68
landmarks).How to Install:First install C compiler:
sudo apt-get install cmake, g++Then this package:
pip install face-detectorHow to Use python package:from face_detector import FaceDetector

img_addr = "path/to/image.[jpg/png/jpeg ...]"

# First parameter in FaceDetector constructor specifies face detection method (dlib: fl_5 or fl_68, mtcnn is default: mtcnn)
face_detector = FaceDetector()
faces = face_detector.get_faces(img_addr)

# Or to get the most prominent face in photo
main_face = face_detector.get_main_face(img_addr)

# Show image with bounding boxes and landmarks
import cv2
img = cv2.imread(img_addr)

for face in faces:
   bb = face.bounding_box
   landmarks = face.landmarks
   cv2.rectangle(img, (int(bb.x), int(bb.y)), (int(bb.x + bb.w), int(bb.y+bb.h)), (0, 255, 0), 1)
   for l in landmarks:
        cv2.circle(img, (l.x, l.y), 2, (0,0,255))

    cv2.imshow('img', img)
    cv2.waitKey(0)
    cv2.destroyAllWindows()How to use Command Line Toolfoo@bar:~$ facedetector /home/foo/images/Yasser_Arafat.jpgThe previous command will display the image passed in arguments with a bounding box wrapping every face in the image. Fig. 1 shows the image displayed.Fig. 1 Face detections as outputted by facedetector command line toolFig. 2 Face detections and landmarks as outputted by facedetector with -l (--landmarks) and -j (--only-main-face) optionsfoo@bar:~$ facedetector /home/foo/images/Yasser_Arafat.jpg -j -o /tmp/output.jpg -lThe previous command adds -j, -l and -o options, which capture the main
face in the photo, adds landmark points and output the image with bounding boxes to the
specified path, respectivelly. It also display the image in Fig. 2.
Package: facedetector-py
FaceDetectorPython script for detecting faces in an image.Installationpipinstallfacedetector-pyUsagefromfacedetectorimportFaceDetectorimg='path/to/image.jpg'# or NumPy arrayfaces=FaceDetector.detect(img)print(faces)Output:[{'score':0.9990496039390564,'angle':-5.194428907734846,'pivot':(1960,819),'coordinates':[(1920,782),(1993,775),(1999,848),(1927,855)],'bounding_box':{'x':1920,'y':775,'width':79,'height':80},'landmarks':{'right_eye':(1949.1595,809.30695),'left_eye':(1970.3654,808.0268),'nose':(1963.1459,819.6671),'mouth_right':(1953.5267,830.48206),'mouth_left':(1968.4865,829.6616),'eyes_center':(1959,808),'mouth_center':(1961,830),'face_center':(1960,819)}},...]Testpytesttests/LicenseMIT
Package: face-eevee
Early test of eos lib for the EEVEE plateform. Fit a facemesh on facial landmarks detected by the webcam 0Usageface_eevee.exequit with ‘q’ or ‘esc’Installationpip install face_eeveeRequirementsimutils
numpy
opencv-python
eos-py
dlib
matplotlibCompatibilitypython>=3.5Authorsface_eeveewas written byAlexis Fortin-Cote.
Package: face-engine
FaceEngine is a lightweight python library that provides an easy interface to
work withface recognitiontasks.>>>fromface_engineimportFaceEngine>>>engine=FaceEngine()>>>engine.fit(['bubbles1.jpg','drive.jpg'],[1,2])>>>engine.make_prediction('bubbles2.jpg')([(270,75,406,211)],[1])InstallationIt is distributed onPyPi, and can be installed with pip:$pipinstallface-engineFaceEngine is supported only on Python 3.6 and above.ModelsFaceEngine is built on top of three model interfacesDetector,EmbedderandEstimator(seemodels), and leans on user provided implementations
of these models.Installation provides optional dlib models.These implementations are usingdlib python apiand dlib provided
pre-trained modelfiles.NoteFaceEngine installation is not installing dlib by default.
To install it, either runpip install dlib(requires cmake) or
followbuild instructions.Dlib models implementations are used to show how to work with FaceEngine.
Questions and issues according to these models accuracy and performance
please address to dlib.To work with your own custom models you have to implement requiredmodelsand import it. FaceEngine models are used to register all inheriting
imported subclasses (subclass registrationPEP 487).For more information read the fulldocumentation.
Package: faceext
faceextThis is a faceext Python software for hiding all of your clothes and
background except your face.
faceext.py is based on two state-of-the-art libraries including
mediapipe library for segmenting a face from the original image and
opencv library for superimposing faces and monotonous backgrounds
(black, white, or gray).OBS studio can play a virtual camera so that the crafted image of extracted face
with superimposed monotonous background can be fed to remote meeting applications.
Remote meeting applicaions including Zoom, WebEx, and Google meet
were successfully tested.Python3.7 or Python3.8 is recommended.How to install faceextYou need to install OBS studio:https://obsproject.com/downloadYou also need to install mediapipe and opencv:$ pip install mediapipe$ pip install opencv-pythonFinally install faceext$ pip install faceextHow to run faceextRun faceext.$ faceextYour face with gray color background will be popped on the screen.There are three background colors: black "-B", gray "-G", and white color "-W".
The default background color is gray.$ faceext -GYou can add a message or name on the crafted image.$ faceext -B yoshior$ faceext -W yoshiyasu takefujiRun OBS studio and select the popped image as source.Then press the "start virtual camera" button in OBS studio.Run any remote meeting application and select OBS virtual camera in video source selection.That is all.
Package: facef
FaceFA library for face recognition, flexible and easy to use. The library uses a lot of models like ssd, mtcnn, facenet .... These models will be downloaded automatically when used for the first time, please make sure your network connection is not blocked to google drive.InstallFaceFis available onpypi.org, if you just want to use it for your project, install it using pip.
Requires python>=3.6, tensorflow2pip install facefTo use1. Face detectionimportcv2fromfacef.detectionimportssd_detect,mtcnn_detectimg=cv2.imread('path_to_image.jpg')boxes=ssd_detect(img)# boxes,_ = mtcnn_detect(img)forboxinboxes:cv2.rectangle(img),(box[0],box[1]),(box[2],box[3]),(0,255,0),thickness=2)cv2.imshow('image',img)2. Face extract feature use Facenetimportcv2fromfacef.extractionimportfacenet_extimg_face=cv2.imread('face_image.jpg')emb=facenet_ext(face_img)print(emb)3. Get face distanceimportcv2fromfacef.distanceimportface2face_distancedistance=face2face_distance(emb_face1,emb_face2)print(distance)
Package: face-group
Face groupGrouping rgb and infra people`s faces by folders using face featuresface-groupfinds faces using dlibInstallationsudo apt-get install build-essential cmake
pip install face-groupUsage$ face-group --help
Usage: face-group [OPTIONS]

  It groups the faces of similar people

Options:
  -i, --input-dir PATH   Path of directory with rgb and infra images.
  -o, --output-dir PATH  Path of output directory (default='out').
  -v, --verbose BOOLEAN  Show info or not.
  -m, --model [hog|cnn]  Type of backend for computing features.
  -c, --cpus INTEGER     Number of CPU cores to use in parallel (can speed up
                         processing lots of images). -1 means "use all in
                         system".

  --help                 Show this message and exit.
Package: facehugger
===============================facehugger===============================.. image:: https://badge.fury.io/py/facehugger.png:target: http://badge.fury.io/py/facehugger.. image:: https://travis-ci.org/dnmellen/facehugger.png?branch=master:target: https://travis-ci.org/dnmellen/facehugger.. image:: https://coveralls.io/repos/dnmellen/facehugger/badge.png:target: https://coveralls.io/r/dnmellen/facehugger.. image:: https://pypip.in/d/facehugger/badge.png:target: https://crate.io/packages/facehugger?version=latestExtracts faces from an image* Free software: BSD license* Documentation: http://facehugger.rtfd.org... image:: https://raw.github.com/dnmellen/facehugger/master/demo.jpg:target: http://commons.wikimedia.org/wiki/File:Christina_Hendricks_(8050119303).jpgRequirements------------* `SimpleCV <https://github.com/sightmachine/simplecv>`_.. code-block :: bash# System requirements for Ubuntusudo apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pipFeatures--------* Extracts faces and saves the cropped images to a folder* You can use it in your app as a libraryQuickstart----------.. code-block :: bash$ sudo pip install facehugger$ facehugger -i /path/to/image_with_faces.jpg -o /path/to/dir_to_save_facesWhy this name?--------------.. image:: http://img6.joyreactor.com/pics/post/gif-Alien-Facehugger-618166.gif:target: http://joyreactor.com/tag/FacehuggerDid you like it?---------------.. image:: https://rawgithub.com/twolfson/gittip-badge/0.1.0/dist/gittip.png:target: https://www.gittip.com/dnmellen/:alt: gittip.. image:: https://d2weczhvl823v0.cloudfront.net/dnmellen/facehugger/trend.png:alt: Bitdeli badge:target: https://bitdeli.com/freeHistory-------0.1.0 (2013-10-30)++++++++++++++++++* First release on PyPI.0.1.3 (2013-10-30)++++++++++++++++++* First working release.0.1.4 (2013-10-30)++++++++++++++++++* Updated docs.0.1.6 (2013-12-30)++++++++++++++++++* Uses a better haarcascade filter.
Package: faceid-lib
picaso-engine ML faceid workflowOverviewThis is a helper library for picaso-engine ML faceid workflow product. The idea of this library is to wrap all reusable code to simplify and improve workflow implementation.Supported functionality:API to communicate with RabbitMQ for event receiver/producerWorkflow call helperLogger call helperRate-limiting strategiesComputing vector similarity helper (ex. Face Similarity Search)Authorpicaso-engine ML (https://pypi.org/project/faceid-lib/), Dani GunawanInstructionsVersion number should be updated ininit.py and pyproject.tomlInstall Poetrypip install poetryAdd pika and requests librariespoetry add pika
poetry add requestsBuildpoetry lock --no-update
poetry install
poetry buildPublish to TestPyPIpoetry publish -r testpypiInstall from TestPyPIpip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple  faceid-libPublish to PyPIpoetry publishInstall from PyPIpip install faceid-libTest imported library from CMDpython -m faceid_libImport EventReceiverfrom faceid_lib.events.event_receiver import EventReceiverImport EventProducerfrom faceid_lib.events.event_producer import EventProducerImport FastAPILimiter, RateLimiterfrom faceid_lib.ratelimiter import FastAPILimiter
from faceid_lib.ratelimiter.depends import RateLimiterStructure.
├── LICENSE
├── poetry.lock
├── pyproject.toml
├── faceid_lib
│   ├── __init__.py
│   ├── __main__.py
│   ├── events
│       ├── __init__.py
│       ├── event_producer.py
│       └── event_receiver.py
│   ├── ratelimiter
│       ├── __init__.py
│       └── depends.py
│   ├── logger
│       ├── __init__.py
│       └── logger_helper.py
│   ├── workflow
│       ├── __init__.py
│       └── workflow_helper.py
│   ├── vector_similarity
│       ├── __init__.py
│       ├── v1
│           ├── __init__.py
│           └── power.py
└── README.mdChangelogs 2.0.0 - 2.0.1 (2023-05-02)compute similarity helperChangelogs 1.0.9 (2022-06-14)modify response & handlerChangelogs 1.0.5 (2021-10-24)downgrade pika version to 1.1.0Changelogs 1.0.4 (2021-10-24)enhancment rate limitingLicenseLicensed under the Apache License, Version 2.0. Copyright 2020-2021 picaso-engine ML, Dani Gunawan.
Package: faceit-friends
ChromedriverYou need to download chromedriver and include the ChromeDriver location in your PATH environment variable first.Getting faceit friendsimport faceit_friends as ff

ff.get_friends('name')  # returns all friends for 'name'Return all similar friends for name's friendsff.similar_friends('name')Print similar names for name1's and name2's friends. There can be as many names as u want.ff.similar_friends('name1', 'name2')
Package: facekiapiclientv2
FacekiAPIClientV2TheFacekiAPIClientV2is a Python client for interacting with the Faceki API. It provides methods to generate an access token, perform various KYC (Know Your Customer) operations, and retrieve KYC records.InstallationYou can installFacekiAPIClientV2using pip:pip install facekiapiclientv2Usageimportrequestsfromfacekiapiclientv2importFacekiAPIClientV2client_id='your_client_id'client_secret='your_client_secret'api_client=FacekiAPIClientV2(client_id,client_secret)# Generate an access tokenapi_client.generate_token()# Get KYC ruleskyc_rules=api_client.getKYCRules()# Perform a KYC verificationselfie_image='path_to_selfie_image.jpg'id_front_image='path_to_id_front_image.jpg'id_back_image='path_to_id_back_image.jpg'dl_front_image='path_to_dl_front_image.jpg'dl_back_image='path_to_dl_back_image.jpg'pp_front_image='path_to_pp_front_image.jpg'pp_back_image='path_to_pp_back_image.jpg'result=api_client.requestKYC(selfie_image,id_front_image,id_back_image,dl_front_image,dl_back_image,pp_front_image,pp_back_image)# Get KYC verification summarykyc_summary=api_client.getKycSummary()# Generate a KYC verification linkexpire_time=0application_id='your_application_id'redirect_url:'https://xyz.com',document_optional:TrueIfyouwantcustomertochoosebetweendocumentandFalseifyouwantcustomertoprovidealldocumentrequire_additional_doc:TrueifyouwantcustomertoprovideAdditionalDocument(POA)andFalseifyoudontwantcustomertoprovideAdditionalDoclink=api_client.generateKYCLink(expire_time,application_id,redirect_url,document_optional,require_additional_doc)# Get KYC records By Linklink_id='your_link_id'kyc_records=api_client.getKYCrecordsByLink(link_id)# Get KYC records By Reference IdreferenceId='record_referenceId'kyc_records=api_client.getKYCRecordByReference(referenceId)# Get KYC records By Reference IdrequestId='record_requestId'kyc_records=api_client.getKYCRecordByRequestId(requestId)# Perform a face checkselfie_image='path_to_selfie_image.jpg'result=api_client.faceCheck(selfie_image)Exception HandlingTheFacekiAPIClientV2class may raise exceptions in case of errors. Ensure that you handle these exceptions appropriately in your code. Examples of possible exceptions include:requests.exceptions.RequestException: Raised when there is an issue with making a request to the Faceki API.Exception: Raised for various errors such as failed token generation or failed requests.DisclaimerPlease note that this client code is provided as a starting point and may require modifications or updates depending on the Faceki API's specific requirements or changes. Refer to the Faceki API documentation for detailed information about the API's endpoints, request/response structures, and authentication requirements.
Package: facekit
FacekitFace kit is a library that uses DNNs to ease data collection for other neural networks such as face recognition or face analysis.
It currently has a MTCNN based face extractor for image directories as well as video directories withvidsnap.InstallationNote: For some reason I can't get setup.py to pickup tensorflow, so after installing facekit, please also install tensorflow.From PyPipip3 install facekit
pip3 install tensorflowFrom Sourcegit pull https://github.com/jarviscodes/facekit
setup.py install
pip3 install tensorflowUsageUsage: python -m facekit [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  extract-faces
  extract-faces-videoextract-faces(env) E:\Users\Jarvis\PycharmProjects\Facekit>python -m facekit extract-faces --help
Facekit v1.1.0
Usage: python -m facekit extract-faces [OPTIONS]

Options:
  -i, --in_path TEXT    Path where detector will pick up images.
  -o, --out_path TEXT   Path where detector will store images.
  -a, --accuracy FLOAT  Minimum detector threshold accuracy.
  --preload             Preload images in memory. More memory intensive, might
                        be faster on HDDs!
  --help                Show this message and exit.extract-faces-video(env) E:\Users\Jarvis\PycharmProjects\Facekit>python -m facekit extract-faces-video --help
Facekit v1.1.0
Usage: python -m facekit extract-faces-video [OPTIONS]

Options:
  -v, --video_in TEXT
  --video_interval INTEGER
  -i, --detector_in TEXT
  -o, --detector_out TEXT
  -a, --accuracy FLOAT      Minimum detector threshold accuracy.
  --preload                 Preload images in memory. More memory intensive,
                            might be faster on HDDs!
  --help                    Show this message and exit.Demo
Package: facelandmarks
Face-LandmarkingOpenCV and Pytorch based system for finding face landmarks coordinates. Based on LBF and MediaPipe models.
LBF and MediaPipe models are linearly projected and CNN finetuned into the system of landmarks used in:
Kleisner, K., TureÄŤek, P., Roberts, S.C. et al. How and why patterns of sexual dimorphism in human faces vary across the world. Sci Rep 11, 5978 (2021).https://doi.org/10.1038/s41598-021-85402-3!!!
Package: face-lensing
Face LensingLook at yourself through a gravitational lensThis program was developed foroutreach purposes.It deforms the input feed of a webcam as if the light had gone through a gravitational lens.While the shape of the lens was precomputed and cannot be changed, one can play with the intensity of the deformation (using+/-keys) to make interesting effects appear.The effect is best seen from a certain distance, when the head is well centered with respect to the webcam, but appears on the screen in multiple places around the image center.Feel free to install and play with it, it has been tested on Windows, Linux and macOS.InstallationInstall the Python program withpippipinstallface-lensingLaunch the app from a terminalface-lensing-appA program should appear with the distorted webcam imageApp controlsThe program can be controlled with a keyboard using the following keysKeyActionhshow/hide command helperqquit the programcchange camera (in case of multiple webcams)Spacesave a screenshot locally+increase the lensing effect-decrease the lensing effectAcknowledgementsThe original idea and precomputation of the lens deformation is attributed to Johan Richard (CRAL, CNRS/INSU)LicenseThis program is licensed under theMIT license.
Package: faceless
FeaturesTODORequirementsTODOInstallationYou can installFacelessviapipfromPyPI:$pipinstallfacelessUsageTODOContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMITlicense,Facelessis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: facelift
A wrapper for decent face feature detection and basic face recognition.For more details please head over to ourdocumentation.fromfaceliftimportFullFaceDetector,iter_stream_framesfromfacelift.renderimportdraw_linefromfacelift.windowimportopencv_windowdetector=FullFaceDetector()withopencv_window()aswindow:forframeiniter_stream_frames():forfaceindetector.iter_faces(frame):forfeature,pointsinface.landmarks.items():frame=draw_line(frame,points)window.render(frame)
Package: facemask
facemaskIntroductionFace_mask is a fast mask detection classifier that utilizes pytorchInstallationTry and start withpip install facemaskUsedownload the pretrained model fromBaiDu, password: fq1simportfacemaskmodel=facemask.FaceMaskDetector(modelpath)model.detect_image_show(image_path)# or just return the detect resultsbboxs=model.model(image_path)# bbox_coordinate, confidence, label
Package: face-mask
# face-mask
Wear face masks in the given picture.## Install
Install by pip:`bash pip installface-mask`Or install locally (cdproject root directory first):`bash python3 setup.py install `## Usage
Specify face picture path and then auto save to face with mask picture path
(whose name with “-with-mask” suffix).`bashface-mask/path/to/face/picture `If you want to see the new picture with default viewer, please specify–showoption.`bashface-mask/path/to/face/picture--show`If you want to wear different mask to face, then specify one of the options below:
-–blackfor black mask
-–bluefor blue mask
-–redfor red maskFor instance:`bashface-mask/path/to/face/picture--blue`In addition, you can specify different detection models by–modeloption:
-hogis less accurate but faster on CPUs.
-cnnis a more accurate deep-learning model which is GPU/CUDA accelerated (if available).`bashface-mask/path/to/face/picture--modelcnn `## Effects
### One person wears a mask
![](images/face-mask-single.jpg)### Many persons wear masks
![](images/face-mask-multi.jpg)### Comic persons wear masks
> Attention: Face recognition for comic face is not accurate enough.![](images/face-mask-comic.jpg)
Package: face-mask-classifier
SVM facemask classifierPretrained Model used:
Keras-facenet model ()
This model is used to detect the faces in a image and create a embedding vector of the faces which would be passed to a SVM classifier.
The embedding vector is of dimension 512.Download the SVM pretrained modelhttps://github.com/Baskar-t/face-mask-classifier/tree/main/modelsClass mask_predictorimage - path of the image file to predict the maskpretrained path of the SVM modeldef pred_mask(image,svm_model_path)
......
return img, box_list, label_list, proba_listimg - image vectorbox list - list of image box of faceslabel_list - list of labels for the predicted face images (Mask , No Mask)proba_list - list of probability of predicted labelsUsage:mask_predictor.pred_mask(image path, path_svm_model)