Recognizing actions with TensorFlow Hub
A very interesting application of deep learning to video processing involves action recognition. This is a challenging problem, because it not only presents the typical difficulties associated with classifying the contents of an image, but also includes a temporal component. An action in a video can vary depending on the order in which the frames are presented to us.
The good news is that there is an architecture that is perfectly suited to this kind of problem, known as Inflated 3D Convnet (I3D), and in this recipe we'll use a trained version hosted in TFHub to recognize actions in a varied selection of videos!
Let's get started.
Getting ready
We need to install several supplementary libraries, such as OpenCV
, TFHub
, and imageio
. Execute the following command:
$> pip install opencv-contrib-python tensorflow-hub imageio
That's it! Let's begin implementing.
How to do it…
Perform the following...