I decide to run this code http://www.pyimagesearch.com/2017/04/03/facial-landmarks-dlib-opencv-python/
I run this example in terminal
cd /home/mnt/Kernel
python3 facial_landmarks.py --shape-predictor shape_predictor_68_face_landmarks.dat \
--image p.jpg
But you can see screenshot. I don't see any output image. You can see this in screenshot
My goal is to run this example. I want to see output image (Facial landmarks)
My attempt to find a solution
First attempt
I think that I have problem in dlib.
I run this code:
print("Hello world")
output: Hello world
import cv2
import dlib
import imutils
detector = dlib.get_frontal_face_detector()
image = cv2.imread("/home/mnt/Kernel/p.jpg" )
image = imutils.resize(image, width=500)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
rects = detector(gray, 1)
I can not enter other commands after this. If I run print("Hello world") I will see nothing.
You can see this in screeshot:
I think that this is error in dlib function rects = detector(gray, 1).
But I don't know how to solve this problem.
Second attempt
I wrote a letter to creater dlib but He wrote "I should also point out that you should run the face_detector.py example that comes with dlib. Does that crash or act funny? If not then the problem is almost certainly with some other thing you are doing or have installed, rather than anything related to dlib".
https://github.com/davisking/dlib/issues/620
So I don't know that I can do to solve this problem. If I did something wrong, then what? How can I run this example http://www.pyimagesearch.com/2017/04/03/facial-landmarks-dlib-opencv-python/ ?