我能建立一个成功的面部识别系统多久?

时间:2014-09-15 06:12:24

标签: face-recognition

我的老板要我建立一个面部识别系统,准确度为80%或更高。也许我们的系统有一千人。我正在使用C#,我有一些问题要问你:

1)我可以成功构建这样的系统吗?

2)最有效的方法是什么(可能需要组合)?

3)我花多长时间才能完成这个系统?

请帮帮我。非常感谢你。

我不擅长英语。所以如果出了什么问题。请告诉我。我会解决我的句子。

编辑1:

我已经建立了自己的面部识别系统,准确性并不好。以下是我所做的:

1)人脸检测。

2)发现性别。

3)检测年龄范围。

4)面部识别。 (* - Fisher面部识别OpenCV)

我不关心1),2)和3)因为我已成功完成它们。

我们现在遇到(*)的问题。我们在美国各地拥有许多相机并且非常复杂,我们使用它们捕捉面部,然后检测面部,检测性别,检测年龄范围并最终识别面部。

当然,我们总是有脸部识别的输入是从拍摄的图像中检测到脸部后的脸部图像。为了获得更高的准确度,我只检测到没有平移和倾斜的面部(正面约为0度,我也做过)。

因为结果不好。所以我认为我需要另一种方法来实现它。谢谢你的帮助。

3 个答案:

答案 0 :(得分:0)

1)是的,但这取决于你的技能;
2)我认为OpenCV有一些算法;
3)记录3N *(N ** 3 / q -P ** 8)。其中P是按键盘上的一个按钮的速度(km / h);

答案 1 :(得分:0)

已经有许多优秀的开源面部识别系统。你需要建立自己的吗?

我建议您查看一些资源,例如OpenCVOpenBR

你可以建立自己的系统,但是在短时间内做起来相当困难,并且会对车轮造成不良影响。

答案 2 :(得分:0)

面部识别初学者实现的简单方法

enter image description here

1)在这里成功预测了玩家的名字
2)要用于google cloud平台(https://colab.research.google.com/)的工具
3)训练需要一定的图像
4)在sample_data中创建一个名为images
的目录 5)将所有图像复制到图像文件夹
6)从此处下载源代码,
https://github.com/Rizwan54/face-recognizition-example

现在轮到您实施了,

pip install face_recognition
import face_recognition
from PIL import Image, ImageDraw
import numpy as np
import os

# make a list of all the available images
images = os.listdir('sample_data/images')

known_face_encodings = []

# iterate over each image
for image in images:

   # load the image
   current_image = face_recognition.load_image_file("sample_data/images/" + image)

   # encode the loaded image into a feature vector
   current_image_encoded = face_recognition.face_encodings(current_image)[0]

   #append the all the encode images into a list
   known_face_encodings.append(current_image_encoded)



# Load an image with an unknown face
unknown_image = face_recognition.load_image_file("sample_data/jadeja_p.png")

# Find all the faces and face encodings in the unknown image
face_locations = face_recognition.face_locations(unknown_image)
face_encodings = face_recognition.face_encodings(unknown_image, face_locations)


# Convert the image to a PIL-format image so that we can draw on top of it with the 
Pillow library
# See http://pillow.readthedocs.io/ for more about PIL/Pillow
pil_image = Image.fromarray(unknown_image)

# Create a Pillow ImageDraw Draw instance to draw with
draw = ImageDraw.Draw(pil_image)

# Loop through each face found in the unknown image
for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings):

   # See if the face is a match for the known face(s)
   matches = face_recognition.compare_faces(known_face_encodings, face_encoding)

   name = "unknown"

   # If a match was found in known_face_encodings, just use the first one.
   # if True in matches:
   #     first_match_index = matches.index(True)
   #     name = known_face_names[first_match_index]

   # Or instead, use the known face with the smallest distance to the new face
   face_distances = face_recognition.face_distance(known_face_encodings, 
   face_encoding)
   best_match_index = np.argmin(face_distances)
   if matches[best_match_index]:
       name = images[best_match_index]

   # Draw a box around the face using the Pillow module
   draw.rectangle(((left, top), (right, bottom)), outline=(0, 0, 255))

   # Draw a label with a name below the face
   text_width, text_height = draw.textsize(name)
   draw.rectangle(((left, bottom - text_height - 10), (right, bottom)), fill=(0, 0, 
   255), outline=(0, 0, 255))
   draw.text((left + 6, bottom - text_height - 5), name, fill=(255, 255, 255, 255))

   # Remove the drawing library from memory as per the Pillow docs
   del draw

    # Display the resulting image
    pil_image.show()

    # You can also save a copy of the new image to disk if you want by uncommenting 
    this line
    pil_image.save("jadeja_p.png")
相关问题