Avi*_*Avi 5 python-2.7 conv-neural-network generative-adversarial-network
我安装了mtcnn包,可以看到:
# confirm mtcnn was installed correctly
import mtcnn
# print version
print(mtcnn.__version__)
Run Code Online (Sandbox Code Playgroud)
结果:
0.0.9
Run Code Online (Sandbox Code Playgroud)
然后我使用以下内容:
# prepare model
model = MTCNN()
# detect face in the image
faces = model.detect_faces(pixels)
# extract details of the face
x1, y1, width, height = faces[0]['box']
Run Code Online (Sandbox Code Playgroud)
结果:
1 # prepare model
----> 2 model = MTCNN()
3 # detect face in the image
4 faces = model.detect_faces(pixels)
5 # extract details of the face
NameError: name 'MTCNN' is not defined
Run Code Online (Sandbox Code Playgroud)
该文档是一个很好的起点: https: //github.com/ipazc/mtcnn
from mtcnn.mtcnn import MTCNN
import cv2
model = MTCNN()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7634 次 |
| 最近记录: |