Good coach for athlete can analysis running posture to improve sport performance. With Xilinx Vitis AI, everyone have access to good coach with easy. The camera can record the running posture. The video clips can be analyzed by Deep Learning Model to select key point on body for further research.
2 Two stage designGood coach need good experience, deep learnig model can learn from large data to be experienced. With deep learning engine like tensorflow or pytorch, the video of running can be quantified and extracted useful information to train model based on moving body joints. Kira KV260 can mark the key point with on-board camera. AI is used in this solution instead of experience coach. This can provide coach instructions to everyone, help them improve their sports ability and sprint speed.
The solution includes two stage. First, video clips record-analysis to train viable AI model, second, evaluate the running mode realtime with Camera on Kira KV260 and give hint on time. The main features of this two-stage solution include key body joint point extraction and further AI model training from the moving key point. With high performance of Kira KV260, video can be analyzed realtime to evaluate the running is good or not, and give hints on improvement if some points contribute to increase on calculation loss.
3 Prepare Environment for Two Stage DetectThe solution includes two stage. First, video clips record-analysis to train viable AI model, second, evaluate the running mode realtime with Camera on Kira KV260 and give hint on time. The main features of this two-stage solution include key body joint point extraction and further AI model training from the moving key point. With high performance of Kira KV260, video can be analyzed realtime to evaluate the running is good or not, and give hints on improvement if some points contribute to increase on calculation loss.
3.1 Prepare the environment on Ubuntu 20.04 and first boot with ubuntu/ubuntu,
Then install the xlnx-config
sudo snap install xlnx-config --classic
Then install packages including gstreamer for xilinx
Install demo
Setting mic and run the demo,
3.2 Install pynq from Xilinx/Kria-PYNQ (github.com)
git clone https://github.com/Xilinx/Kria-PYNQ.git
cd Kria-PYNQ/
sudo bash install.sh
Then coding with PYNQ
3.3 Install tensorflow-lite
Download tensorflow-lite runtime and install with pip
wget https://dl.google.com/coral/python/tflite_runtime-2.1.0.post1-cp38-cp38-linux_aarch64.whl
pip install python/tflite_runtime-2.1.0.post1-cp38-cp38-linux_aarch64.whl
4 CodingThe solution includes two stage. First, video clips record-analysis to train viable AI model, second, evaluate the running mode realtime with Camera on Kira KV2
4.1 Loading pynq sample code with SSD DPU overlay, the demo run OK as attached notebook shows.
First, test the demo classification project ,return result for image[2] in resources directory.
4.2 Then start loading ssd xmodel and segmentation for selective block on the image, refer to attached notebook code .
4.2 The second stage is detect pose for the person, there are problem in loading, with error report on mismatch subgraph number both in Open Pose Detection and PoseDetection model
4.3 Then try tensorflow lite and pass the cross-compile on desktop computer, using updated MoveNet model, it shall return 17 benchmark with point and channel.
While there are version 5 conv layer not compitable with embedded tflite_runtime. Other solution shall be tried.
Comments