주 메뉴 열기
대문
임의의 문서로
로그인
설정
Pywiki 소개
면책 조항
Pywiki
검색
바뀜
← 이전 편집
다음 편집 →
얼굴추적
(편집)
2021년 9월 25일 (토) 21:27 판
245 바이트 추가됨
,
2021년 9월 25일 (토) 21:27
→준비
14번째 줄:
14번째 줄:
|이후 이 디렉터리 안의 모델을 사용한다.
|이후 이 디렉터리 안의 모델을 사용한다.
|-
|-
−
|사용할 모듈 불러오기
+
|사용할 모듈
설치 및
불러오기
−
|<syntaxhighlight lang="python">
+
|
pip install CMake dlib opencv-python numpy
+
+
* 윈도우에선 visual studio 설치가 선행되어야 한다.(설치 옵션에서 C++ 모듈을 포함하게 하면 관련 컴파일러 등이 함께 설치된다.)
+
+
cmake는 dlib를 설치하기 위해 필요하다.
<syntaxhighlight lang="python">
import dlib # 얼굴인식
import dlib # 얼굴인식
import cv2 # 이미지처리
import cv2 # 이미지처리
28번째 줄:
32번째 줄:
|<syntaxhighlight lang="python">
|<syntaxhighlight lang="python">
detector = dlib.get_frontal_face_detector() # 얼굴탐지모델
detector = dlib.get_frontal_face_detector() # 얼굴탐지모델
−
sp
= dlib.shape_predictor('models/shape_predictor_68_face_landmarks.dat') # 얼굴 랜드마크 탐지 모델. 학습된 모델을 가져온다.
+
predictor
= dlib.shape_predictor('models/shape_predictor_68_face_landmarks.dat') # 얼굴 랜드마크 탐지 모델. 학습된 모델을 가져온다.
</syntaxhighlight>
</syntaxhighlight>
−
|-
−
|
−
|
−
|-
−
|얼굴 특징점 표시
−
|
|}
|}
Sam
사무관
,
인터페이스 관리자
,
관리자
, 교사
편집
1,408
번