I'm working on a project that intends to develop a deep neural network that can detect birds in photographs. Firstly, I am supposed to collect data from a live youtube feed but I am still facing challenges with automating the process of taking screenshots from the livefeed. My code requires continuous manual rerun and I would like to have an automated function:
Here is my code
import pyautogui, time time.sleep(20) screeshot = pyautogui.screenshot() screeshot.save('image2.png') print('screenshot taken')
Whats the problem? Is it that you want it to keep taking screenshots while your ai is running? if so then just use multiprocessing or threading. or if you just want it to keep running use a loop.
multiprocessing
threading
2.1m questions
2.1m answers
60 comments
57.0k users