GithubHelp home page GithubHelp logo

face-recog-attendance's Introduction

Tài liệu tham khảo

  1. https://github.com/ageitgey/face_recognition/blob/master/face_recognition/api.py#L213
  2. https://www.pyimagesearch.com/2018/06/18/face-recognition-with-opencv-python-and-deep-learning/
  3. https://github.com/huytranvan2010/Face-Recognition-with-OpenCV-Python-DL

Cài đặt và chạy project

  1. Cài đặt python https://www.python.org/downloads/
  2. Cài visual c++ trong visual studio (chứa Window SDK, C++ complier, ... để có thể cài được thư viện dlib)
  3. Mở project và cd vào thư mục gốc
  4. Cài môi trường ảo
python -m venv venv
cd .\venv\Scripts\
.\Activate.ps1
  1. Cài đặt các thư viện cần thiết (nếu chạy trên máy có GPU thì bỏ dlib và face_recognition trong file requirements.txt)
pip install -r requirements.txt
  1. Run app
py .\app.py

Cài đặt để chạy trên gpu

  1. Cài cuda toolkit và cuDNN : https://www.youtube.com/watch?v=lw5dpTl0yZE
  2. cd vào thư mục venv/Lib
  3. Cài đặt dlib với GPU
git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build
cd build
cmake .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1
cmake --build .
cd ..
python setup.py install --set USE_AVX_INSTRUCTIONS=1 --set DLIB_USE_CUDA=1
  1. Cài face_recognition
pip install face_recognition
  1. Nếu sau khi cài, run app lỗi thì vào file init.py của thư mục dlib vừa cài đặt và sửa đoạn code thêm GPU
if 'ON' == 'ON':

Deploy qua IIS

  1. https://mtuseeq.medium.com/how-to-deploy-flask-app-on-windows-server-using-fastcgi-and-iis-73d8139d5342 ( chú ý do dùng venv để run project nên cài đặt FastCGI cũng phải cài đặt trong venv)
  2. Cần chuyển identity của application pool từ 'ApplicationPoolIdentity' thành 'LocalSystem'
  3. Có thể phải sửa ở cả handlemapping trong IIS: https://www.youtube.com/watch?v=aJfHVXg-Tu8&ab_channel=TechieBlogging (7:20)

face-recog-attendance's People

Contributors

huydq2152 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.