@Jasper_Holton's صورة الملف الشخصي

I appreciate your interest in my site and I'm looking forward to having you here. I've done more work to keep the site secure and this should make the site easier to use. I'm hoping people will want to log in with their faces, and create new accounts with their faces. Using proximity detection, I can make sure the users face is close to the camera, and I have added a spinner to the login form.

عرض الصورة من وظيفة عن طريق @Jasper_Holton

@AussieinthePNW, يحب هذا،

@Jasper_Holton's صورة الملف الشخصي

Log in to Uglek or create an account with your face! It even works in the dark. Here's my face to go with the new feature. Visit Uglek.com/face/login to log in with your face or create a new account with your face. Try it out now!

عرض الصورة من وظيفة عن طريق @Jasper_Holton

@Jasper_Holton's صورة الملف الشخصي

How to identify and recognize faces using python with no APIs I use the below code to implement a login with face function on Uglek. The code works by assigning a user a face ID when they upload a face to their profile or go to log in, and then retrieving their account by image using the face ID. Here is the code

# face/face.py
from django.contrib.auth.models import User
import uuid
from .models import Face
import face_recognition

NUM_FACES = 9

def get_face_id(image_path):
    image = face_recognition.load_image_file(image_path)
    face_locations = face_recognition.face_locations(image)
    if len(face_locations) > 1 or len(face_locations) < 1:
        return False

    for user in User.objects.filter(profile__enable_facial_recognition=True):
        known_image = face_recognition.load_image_file(user.profile.face.path)
        unknown_image = image
        user_encoding = face_recognition.face_encodings(known_image)[0]
        user_encodings = list()
        user_encodings.append(user_encoding)
        user_faces = Face.objects.filter(user=user).order_by('-timestamp')
        for face in user_faces:
            if open(face.image.path,"rb").read() == open(image_path,"rb").read():
                return False
        if user_faces.count() > NUM_FACES:
            user_faces = user_faces[:NUM_FACES]
        for face in user_faces:
            image = face_recognition.load_image_file(face.image.path)
            image_encoding = face_recognition.face_encodings(image)[0]
            user_encodings.append(image_encoding)
        unknown_encoding = face_recognition.face_encodings(unknown_image)[0]
        results = face_recognition.compare_faces(user_encodings, unknown_encoding)
        if results[0]:
            return user.profile.uuid
    return str(uuid.uuid4())
In action, the code looks like get_face_id(User.objects.get(id=1).face.path) in testing. This gets my face ID from the face uploaded to my profile. To get a face ID of a logging in user, I save a face form with a face object and then call get_face_id(face.image.path) to query the user instance and redirect to their authentication URL. This works well. I hope this is useful to you. For more information, see the GitHub below: github.com/ageitgey/face_recognition


@Jasper_Holton's صورة الملف الشخصي

A view from my porch in north Seattle, Washington. I've lived in Seattle for over a year now, and been in the area since a few weeks after my son was born in 2018 in Hawaii. Seattle is a nice vibe, with a very busy and laid back approach.

عرض الصورة من وظيفة عن طريق @Jasper_Holton

تحميل المزيد من المشاركات...