line 311: code fix suggestion for webcam input
existing code results in error: AttributeError: __enter__ INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
This commit is contained in:
parent
a92cff7a60
commit
a6fef0becb
|
@ -308,10 +308,8 @@ with mp_face_mesh.FaceMesh(
|
||||||
# For webcam input:
|
# For webcam input:
|
||||||
drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1)
|
drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1)
|
||||||
cap = cv2.VideoCapture(0)
|
cap = cv2.VideoCapture(0)
|
||||||
with mp_face_mesh.FaceMesh(
|
face_mesh = mp_face_mesh.FaceMesh(min_detection_confidence=0.5, min_tracking_confidence=0.5)
|
||||||
min_detection_confidence=0.5,
|
while cap.isOpened():
|
||||||
min_tracking_confidence=0.5) as face_mesh:
|
|
||||||
while cap.isOpened():
|
|
||||||
success, image = cap.read()
|
success, image = cap.read()
|
||||||
if not success:
|
if not success:
|
||||||
print("Ignoring empty camera frame.")
|
print("Ignoring empty camera frame.")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user