Python Forum

Full Version: Object Detection that records the number of secs the face is not detected
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello can someone help me in coding,

I don't know how I can create a program that will record the number of seconds that the object is not detected.
import time
import recognition # ...I guess?

start = time.time()
face = recognition.Facial()

while not face.detected():
   time.sleep(0.01)

print("It took {0} seconds.".format(time.time() - start))