Action recognition is an exciting field of computer vision that involves identifying human actions in videos or images. In this blog, we will explore how to perform action recognition on Brainy Pi, AI enabled SBC.
To begin with, we need to install the TensorFlow-Hub library by running the “pip install tensorflow-hub” command. We will also import other necessary libraries such as OpenCV, NumPy, and SSL. Next, we define a utility function to fetch videos from the UCF101 dataset, which is a benchmark dataset for action recognition research. We also define another function to open video files using OpenCV.
Install Dependancies
pip install tensorflow-hub
To deploy the code on Brainy Pi, we first need to clone the repository using the “git clone” command. Then, we navigate to the action-recognition directory and run the “python action_recognition.py” command. This will start the action recognition process, and we can see the results in the terminal.
git clone https://github.com/brainypi/BrainyPi-AI-Examples.git cd BrainyPi-AI-Examples/Tensorflow/action-recognition python action_recognition.py