TensorFlow Deep Learning Projects
by Alexey Grigorev, Srinivas Kulkarni, Rajalingappaa Shanmugamani
Real-time webcam detection
The previous webcam_pipeline is not a real-time detection system because it just takes snapshots and applies detection to the single taken image. This is a necessary limitation because dealing with webcam streaming requires intensive I/O data exchange. In particular, the problem is the queue of images arriving from the webcam to the Python interpreter that locks down Python until the transfer is completed. Adrian Rosebrock on his website pyimagesearch proposes a simple solution based on threads that you can read about at this Web address: http://www.pyimagesearch.com/2015/12/21/increasing-webcam-fps-with-python-and-opencv/.
The idea is very simple. In Python, because of the global interpreter lock (GIL), only one ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access