OpenCV and Facial Recognition (MAC, Python)

Опубликовано: 21 Февраль 2026
на канале: LearnEDU
7,693
75

A step by step tutorial on how to get up and running with Computer Vision and Face Recognition on a MAC with Python.
Part 2:    • Part 2: OpenCV & Face Recognition  
CODE AND COMMANDS:
You need brew and Python 3 installed on your computer
Check to see if it is already installed by typing this command into terminal:
python3 --version
If this commands yields a version 3 or greater you should be good to go. make sure your version is above 3.
if not, run this command
step 1b: brew install python
Or https://www.python.org/ftp/python/3.9... (download python 3.9)
step 1a: (run this if brew command fails)
xcode-select --install
Run this command as well
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Hom...)"

step 2: install OpenCV
pip3 install opencv-contrib-python
(use pip3 instead of pip)

step 3: type in “python3” at the command prompt. you will get angled brackets... this is because you are in python environment.
type in
import cv2
cv2.__version__ (this should return a version number)

dlib and face_recognition installation
Run the following commands
step 1: pip3 install pillow
step 2: pip3 install imutils
step 3: brew install cmake
step 4:
brew install dlib
or
pip3 install dlib
step 5: pip3 install face_recognition

Copy the code (link below) into your Python IDE.
https://github.com/ageitgey/face_reco...