In this blog post, we will delve into the Pedestrian Tracking Demo using OpenVINO on Brainy Pi. This impressive integration of AI and computer vision enables the detection of pedestrians in frames and the construction of their movement trajectories, frame-by-frame. This demonstration not only highlights the immense potential of OpenVINO in the development of computer vision products but also serves as a valuable resource for developers and entrepreneurs in this field. So, let’s roll up our sleeves and implement the Pedestrian Tracker on Brainy Pi with the power of OpenVINO!
Installing OpenVINO and Dependencies
To get started, we need to install OpenVINO and its dependencies on BrainyPi. Open a terminal and run the following command to install OpenVINO and the necessary OpenCV development files:
sudo apt install openvino-toolkit libopencv-dev
By installing OpenVINO, we gain access to a powerful set of tools and libraries for optimizing and deploying deep learning models on various hardware platforms.
Compiling the Demos
Once we install OpenVINO, we can proceed to compile the demos. These demos serve as an excellent starting point for understanding and exploring the capabilities of OpenVINO. Follow the steps below to compile the demos:
Set up the OpenVINO environment by sourcing the
setupvars.sh
script:source /opt/openvino/setupvars.sh
This step is crucial as it configures the necessary environment variables for working with OpenVINO.
Clone the Open Model Zoo repository, which contains the demos, using the following command:
git clone --recurse-submodules https://github.com/openvinotoolkit/open_model_zoo.git cd open_model_zoo/demos/
The Open Model Zoo provides a collection of pre-trained models and demo applications that can be used with OpenVINO.
Build the demos by executing the
build_demos.sh
script:./build_demos.sh
This step compiles the demo applications and makes them ready for execution.
Running the Pedestrian Tracker on Brainy Pi
With the demos compiled, we can now download the required models and run the Pedestrian Tracking Demo using OpenVINO. Follow these steps:
Download the models for the demo by running the following command:
omz_downloader --list ~/open_model_zoo/demos/pedestrian_tracker_demo/cpp/models.lst -o ~/models/ --precision FP16
The Open Model Zoo downloader allows us to easily fetch the models specified in the
models.lst
file.Download the test video:
cd ~/ wget https://raw.githubusercontent.com/intel-iot-devkit/sample-videos/master/people-detection.mp4
This command downloads a sample video – an input for the Pedestrian Tracking Demo.
Once the models and the test video are downloaded, you can run the Pedestrian Tracking Demo using the following command:
~/omz_demos_build/aarch64/Release/pedestrian_tracker_demo -i ~/people-detection.mp4 -m_det ~/models/intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml -m_reid ~/models/intel/person-reidentification-retail-0277/FP16/person-reidentification-retail-0277.xml -at ssd
This command executes the Pedestrian Tracking Demo, leveraging the person detection and person re-identification models to track pedestrians in the video.
By following these steps, you can quickly set up and run the Pedestrian Tracking Demo, gaining insights into the capabilities of OpenVINO and its potential for developing computer vision products.
Conclusion
The Pedestrian Tracking Demo using OpenVINO on Brainy Pi demonstrates the power of AI and computer vision in detecting and tracking pedestrians. By utilizing OpenVINO’s optimization and deployment capabilities, developers and entrepreneurs can build robust computer vision applications for various domains. We hope this blog post provides you with a useful overview and inspiration for incorporating OpenVINO into your computer vision projects.
References
OpenVINO Documentation: https://docs.openvino.ai/
Open Model Zoo Pedestrian Tracking Demo: https://docs.openvino.ai/2022.3/omz_demos_pedestrian_tracker_demo_cpp.html