8000 GitHub - nikov666/FaceDetect: 人臉偵測 for Windows use Python (使用Python練習OpenCV,順便做個紀錄)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nikov666/FaceDetect

 
 

Repository files navigation

FaceDetect

臉部偵測 for Windows use Python
使用Python練習OpenCV,順便做個紀錄

特色

  • 臉部偵測(圖片)

使用方法

請先確定電腦上已經安裝 OpenCV numpy
可參考如何在Windows安裝OpenCV Python設定

python face_detect.py [圖片檔名] [haarcascade.xml]

執行範例

python face_detect.py test1.jpg haarcascade_frontalface_alt.xml

執行過程

程式執行後,會自行跳出偵測臉部的圖片
alt tag

輸出

目錄底下會多出一張名稱為 face_detection.jpg 的圖片
alt tag

備註

程式基本上只做了小小的修改,
我發現 haarcascade_frontalface_alt.xml 比原作者的 haarcascade_frontalface_default.xml 有更好的辨識率,
更多的 haarcascade 可到 opencv 路徑裡 opencv\sources\data\haarcascades 取得,
路徑底下還有 haarcascade_eye.xml 偵測眼睛之類的,大家可以自行摸索,
最後,請注意,這是 臉部偵測 ,並不是 臉部辨識

其他

更多的資訊可參考原作者

Run the code like this:

python face_detect.py abba.png haarcascade_frontalface_default.xml

If you want to understand how the code works, the details are here:

https://realpython.com/blog/python/face-recognition-with-python/

更多參考

記錄, OpenCV 學習路徑, (3) 人臉辨識
這篇文章介紹的蠻詳細的,包括可以自己訓練一套專屬用途的 Cascade classifier

執行環境

  • Windows 8.1
  • Python 2.7.3
  • OpenCV 2.4.12
  • numpy 1.11.0

License

MIT license

About

人臉偵測 for Windows use Python (使用Python練習OpenCV,順便做個紀錄)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0