Esempio n. 1
0
def test_camera(index=0):
    mtcnn = MTCNN('./mtcnn.pb')
    cap = cv2.VideoCapture(index)
    while True:
        ret, img = cap.read()
        if not ret:
            break
        show = mtcnn.detectAndDraw(img)
        cv2.imshow('img', show)
        cv2.waitKey(1)
Esempio n. 2
0
def test_image(imgpath):
    mtcnn = MTCNN('./mtcnn.pb')
    img = cv2.imread(imgpath)
    show = mtcnn.detectAndDraw(img)
    cv2.imshow('img', show)
    cv2.waitKey()