Creating a database with biometrics of persons and subsequent search on it
Project description
vk_face_recognition
A program for creating a database with human biometrics based on photos.
Photos will be automatically downloaded from VKontakte.
Subsequently, it will be possible to search for a person using the created database.
The program was created based on the face_recognition
and vk_api
libraries
Installation
Requirements
- Python 3.8+
- Linux, Windows or macOS
Installing on Linux or Mac
pip3 install vk_face_recognition
Installing on Windows
pip install vk_face_recognition
Usage
Initial setup
To get started, you need to add your token_vk received on the site, to the file main.py
to a string
self.session = vk_api.VkApi(token='your_token')
Using the Library
from vk_face_recognition import Vk_recognition
vk_recognition = Vk_recognition()
vk_recognition.start_recognition(age_min=25, age_max=26, gender=1, city='Moscow')
When running this code, a file will be created first users_id.txt
with the user id according to the specified parameters of age_min
, age_max
, gender
and city
. Then the user's photos will be downloaded to the data
folder. And then these photos will be used to recognize faces and create face parameters and write them to a separate file in the pickle_files
folder
Search by photo
After creating the database you need, you can search through the photo in the following way
from vk_face_recognition import Vk_recognition
search = Recognition_face()
search.find_people('path to the photo')
A search will be performed on the database you created and, if it matches, it will report this
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for vk_face_recognition-1.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f083d7205988ab5b3c8a2a4a73eddebf68f51456045cdd0f0fd4205fb2585f89 |
|
MD5 | d38a87add1485f5fc1b900f8ae29c2c9 |
|
BLAKE2b-256 | 98f761dfbb1b9dc1ac6e05e5dddf0bddc99f47c87485b6d45fb5de3143833bd2 |