Skip to main content

FaceD for Static face detection

Project description

GitHub Demandez moi n’importe quoi !

FaceD

  • A program for basic frontal face detection using Pillow and OpenCV.

✍️ Introduction

  • A package inspired by UMich Coursera's Python Specialization.
  • {FaceD} is simply a package that will take in a zip file of images in any format (.JPG or .PNG) and attempt to detect faces. This will crop the faces and return them to a canvas. Try out the package using the data sample zip files provided with the package.
  • This package is highly experimental and might be totally useless for some people.
  • Hope this helps someone as much as it helped me in mastering python.

⏬ Installation

  • See below for installation details.

Install dependencies

Ubuntu

sudo apt install tesseract-ocr
pip install opencv-python-headless #we put work into defining dependencies but for this to work it is mandatory to install the headless version

Windows

winget install --id=UB-Mannheim.TesseractOCR -e

There are a few links to check for tesseract-ocr:

windows_tesseract_ocr

Tesseract at UB Mannheim

windows_tesseract_ocr Exes

windows_tesseract_ocr Downloads

How install Tesseract — ORC and Pytesseract on Windows

Development version

pip install -i https://test.pypi.org/simple/ faced==0.0.4

PyPi Version

pip install faced

Using faced

import faced
from faced.load_data import *
from faced.cv_utils import *
from faced.main import *

x = load_data('lab.zip')
y = load_lab() #to avoid any issues

faced(x)
faced_keyword(y, "mark") #takes a long time

🛂 Quality Control (QC)

  • Utilized inbuilt unit testing to test results vs expectations and everything seems to work just fine. This package right now focuses on learning python and seeing how packaging works in python.

Warning

  • Running this package means you will need your own tesseract engine for text identification. Install it and point your system to the executable.

  • The program also requires an in built classifier and this might or might not work for OS other than windows. I will check on that later but that is all for now.

  • It is confirmed that this package should work on Ubuntu as well so far as you have opencv-python-headless and your tesseract engine set then this should work.

Publishing

install build and build

pip install build
python -m build

Install twine and upload to TestPyPi

Before the next steps, you need to setup an account with TestPyPi, and obtain a token.

Next you need to learn how to setup a pypirc file (repo config file) and that will be read by twine in the upload process.

pip install twine #python3 -m pip install --upgrade twine
python -m twine upload --repository testpypi dist/* #the repo name in pypirc is testpypi

Upload to PyPi

If pypirc is well setup then this should go fine.

python -m twine upload --repository pypi dist/* #if repo is blank twine defaults to pypi so works either way

Addon

We are authors of high level packages in R and faced is a gateway into the python world. Very little effort has been put into perfecting the functions here because there are more important projects to work on than tesseract and opencv. I still find time to polish my python and practice publishing as with this update but this is not a main project.

We learn this because some projects might entail in house built python packages so knowing how to package and publish is relevant.

🎇 Epilogue

  • Working on CamFaceD which is a dynamic faced platform. CamFaceD can be used to train face detection although on a limited capacity. More to learn on this but steadily making progress and grateful for what I have learned so far.

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

faced-0.0.8.tar.gz (66.6 MB view details)

Uploaded Source

Built Distribution

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

faced-0.0.8-py3-none-any.whl (66.6 MB view details)

Uploaded Python 3

File details

Details for the file faced-0.0.8.tar.gz.

File metadata

  • Download URL: faced-0.0.8.tar.gz
  • Upload date:
  • Size: 66.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for faced-0.0.8.tar.gz
Algorithm Hash digest
SHA256 837d466e54d9d54368a5a9ed275078f5e6ee05bd9f7018ad5b4ac2dcafd9964e
MD5 49569e3840b774faab016a9867535b60
BLAKE2b-256 694b3c5e32544dfecd7e33bd35cd64a12da1dfcadeea54f23754da2ba346f749

See more details on using hashes here.

File details

Details for the file faced-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: faced-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 66.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for faced-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c87a4f6caba0aa585366463710bab64af46fc68e209f9b3c4bc6c87e96b56c32
MD5 f7a2e533765916e2dc2d7c29a088777b
BLAKE2b-256 6b8250f72c3fd909b636ef77077dd41c0b2237d1ddbdf59ad6d89ef6664f0742

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