CUFCTL / face-recognition

A GPU-accelerated real-time face recognition system based on classical machine learning algorithms
MIT License
23 stars 11 forks source link

Implement real-time face recognition #24

Closed bentsherman closed 7 years ago

bentsherman commented 7 years ago

This is our current long-term goal of the project, and I'm not sure how far off it is. The idea is that this system receives a video stream, and for each frame it extracts faces, attempts to classify each face, and reports the results. This system will probably be a combination of our current code, the pre-processing scripts that will be developed, and probably a server that watches the stream, delegates tasks, and displays results. The server might have the following behavior:

initialize()

on_receive (video_frame):
  images = detect_faces(video_frame)  # run detect-faces.py
  images = normalize(images)  # run normalize.py
  for img in images:
    class = face_rec(img)  # run face-rec
    print(class)

Hey, that's starting to look a lot like Python code! Anyway, we can use this thread to discuss details of this task as it becomes more relevant.

bentsherman commented 7 years ago

We should be able to call ./face-rec from a python script and use the --stream option to run inference on images as they come int:

# train a model
./face-rec --train train_data --pca --pca_n1=50

# (in the python script)
# - start streaming server
./face-rec --stream stream_data --pca --pca_n1=50

# - save detected images to stream_data
# - run inference on detected images (send '1' to ./face-rec)
# - read predictions from ./face-rec output
bentsherman commented 7 years ago

Real-time detection and recognition is now implemented by scripts/face-det/face-rec.py. There are still performance issues on the Jetson which we may try to work out, and we should try to run it on a faster system to make sure it runs smoothly there.