Kernel: Python 3
In [1]:
In [2]:
Out[2]:
Requirement already satisfied: pygame in c:\users\ihsud\anaconda3\lib\site-packages (2.1.2)Note: you may need to restart the kernel to use updated packages.
In [3]:
Out[3]:
pygame 2.1.2 (SDL 2.0.18, Python 3.8.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
In [4]:
In [5]:
In [6]:
In [7]:
In [8]:
In [9]:
In [10]:
In [11]:
In [12]:
In [13]:
Out[13]:
<ipython-input-10-b2d4d2013410>:4: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if landmarks == "error":
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-13-0611596a071e> in <module>
66
67 # Obtain image_landmarks lip_distance from mouth_open function for current frame.
---> 68 face_frame, lip_distance = mouth_open(frame)
69 # Store current yawn_status in prev_yawn_status
70 prev_yawn_status = yawn_status
<ipython-input-10-b2d4d2013410> in mouth_open(image)
1 # This Function will return distance between landmark image and two lips
2 def mouth_open(image):
----> 3 landmarks = get_landmarks(image)
4 if landmarks == "error":
5 return image, 0
<ipython-input-6-f373459ff38f> in get_landmarks(im)
2 def get_landmarks(im):
3 rects = detector(im, 1)
----> 4 if len(rects) > 1:
5 return "error"
6 if len(rects) == 0:
KeyboardInterrupt:
In [ ]: