Skip to main content

Face Classification package

Project description

VisageSnap

Recognizes faces and trains models, brings in the pictures and provides identification predictions and face classification. It also performs semi-supervised learning.

Feature

  • Recognize faces.
  • Train the model through semi-supervised learning with labeled or unlabeled pictures.
  • It provides identification predictions and face classification for pictures.

Usage

Assign a label to the face

You should assign a NameLabel to the face you want to classify first. (NumberLabel MUST NOT BE -1)

vs = VisageSnap.Core()
people = ['Tom', 'Jerry']
# ['NameLabel1', 'NameLabel2', 'NameLabel3'...]

vs.set_label(people)

You can also do it like this so that assign a NameLabel and NumberLabel:

vs = VisageSnap.Core()
people = {
    # 'NameLabel': NumberLabel
    'Tom': 0,
    'Jerry': 1
}

vs.set_label(people)

Put the picture files to be used during training in the directory. In this case, the file name follows the following rules:

(NameLabel)-(Any character).extension

Tom-123.png
Tom-124.jpg
Tom-126.jpeg
Jerry-2.png
Jerry-3.png
Jerry-4.png


Recognize faces and train the model

Train with the picture files in the directory.

vs.train_labeled_data()

If you want to train with unlabeled data, you can also try to like this:

vs.train_unlabeled_data()

Identification predictions

Put the picture files you want to predict into the directory.

result = vs.predict_all()
print(result)

# Result:
#{
#   "target1.png": "Tom",
#   "target2.jpeg": "Jerry",
#   "target3.jpeg": "Jerry"
#}

To change the directory you work with

You should put the picture files into configured directory, and also model file is stored in model directory.

vs.set_directory({
    "labeled": "labeled_pic",
    "unlabeled": "unlabeled_pic",
    "model": "my_model.d"
})

Default Directory:

{
    "labeled": "labeled",
    "unlabeled": "unlabeled",
    "model": "model"
}

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

VisageSnap-0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

VisageSnap-0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file VisageSnap-0.1.tar.gz.

File metadata

  • Download URL: VisageSnap-0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for VisageSnap-0.1.tar.gz
Algorithm Hash digest
SHA256 96742f0fd6a5e47e0d99bdd054623edff756414dd9dbc166fdddbbb22b84e210
MD5 383235fcd1a82a4326e3af5fbf16187e
BLAKE2b-256 058fbd982ecb2c985c63890be4544c9e81a48d314d8d5efd8edb4a269a1e159c

See more details on using hashes here.

File details

Details for the file VisageSnap-0.1-py3-none-any.whl.

File metadata

  • Download URL: VisageSnap-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for VisageSnap-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07dbff27cc873eed66851a16205f846ff9a1616cf11bea83d055d9062291c5b6
MD5 718873b9aaac576da3aa31a7db04783d
BLAKE2b-256 4448bf35a3526cd5020ad6a963b33c8bfe7af5592044d79e55c9a9397d3b2540

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