Skip to main content

A downloader for named images containing faces from Wiki servers.

Reason this release was yanked:

deprecated

Project description

Wiki Faces:

License: MIT License

Figure 1: Joko Widodo's Wikipedia page, which includes am image of his face. The cropped image on the right is download into a directory named "Joko_Widodo."

TLDR

This project downloads images from a Wiki that include human faces. Specifically, images that are associated with certain wikipedia categories.

Installation

Pip Installation Procedure:

From TestPyPI:

pip install -i https://test.pypi.org/simple/ wikifaces-tford5

From Repo:

git clone git@github.com:tford9/Wiki-Faces-Downloader.git
cd Wiki-Faces-Downloader
python setup.py
pip install wikifaces

Usage

Command-Line Example

python downloader -i "indonesian engineers" -o ../data/ -d

Package Example

from wikifaces.downlaoder import WikiFace

wikiface_obj = WikiFace()
wikiface_obj.download(categories=['facebook'], depth=2, output_location='../data/')

The following structure is output:

  • facebook
    • cached_1_people_pages_d2.pkl
    • cached_pages_d2.pkl
    • alan_rushbridger
      • Alan_Rusbridger_01.jpg-p0.jpg
    • ...
    • mark_zuckerberg
      • MarkZuckerbergcrop.jpg-p1.jpg
    • ...

The process is carried out as follows:

  1. Given a category from a Wiki, collect n pages that contain the same category as well as at least one category containing "people" in the title.
  2. With those pages, crawl across their included categories and collect y pages that contain those categories as well as at least one "people" category.
  3. Given the collected Wiki pages, download the primary image from the page and determine if it is a human face using light facial detection.
  4. We capture all images from the wiki that contain the name of the page (if it's a person then the filename contains their name),
  5. Using the captured name and images, we create a dataset for that face.

TODOs:

  1. Currently, a part of this process uses a recursive call structure to get all related pages; there may be a way to linearize, or parallelize this.
  2. Currently, we are only pulling images contain the person's name in the title and only have one visible face in the image. All other images are not considered. A voting system should be added to get the most represented faces across multiple images.

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

wikifaces-1.0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

wikifaces-1.0.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file wikifaces-1.0.2.tar.gz.

File metadata

  • Download URL: wikifaces-1.0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for wikifaces-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1fe00ef9ef806c500e8ea78f402cca939054705cce26ceab2850254a18b502b9
MD5 f9fb8bcde1d4f6797dd9a480429d65a6
BLAKE2b-256 4503a6e8138db2505e2fe19092a8caa473662521598eae713d8611cb65dcf27d

See more details on using hashes here.

File details

Details for the file wikifaces-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: wikifaces-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for wikifaces-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 906126e1b9a41199fb0531a1cad1b9d3cd15cc11b25792af0f831348863b5973
MD5 a32aa33de5b2bba35af8e64dec375d1e
BLAKE2b-256 44c7a648e778f8c3431951557e766a1ebd8ea8321e0ccab89615a6d8c68dcd4d

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