First, a quick primer on some terminology.
In Python, if we want to take full advantage of the processing power of your CPU, you need need to use multiprocessing (typically achieved via the
multiprocessing library). This library is therefore well suited for CPU intensive tasks. If we wish to efficiently do many things at once using a single processor, i.e. achieve concurrency, we can use Python’s libraries for asynchronous work — namely
asyncio. In both cases, a common programming practice for sharing information safely between the processes/threads is via the use of a Queue.
There are two types…
A typical pattern for reading videos in Python is using the OpenCV:
Are there any problems with this approach? It is entirely functional, but there are a couple of limitations:
AI Engineer and Scientist