<!-- Copyright (c) 2022 Innodisk crop. This software is released under the MIT License. https://opensource.org/licenses/MIT --> # TOC - [TOC](#toc) - [Overview](#overview) - [How to Install](#how-to-install) - [VVAS](#vvas) - [Xilinx smartcam \& aibox-reid](#xilinx-smartcam--aibox-reid) - [Build \& Install](#build--install) - [Innodisk demo](#innodisk-demo) - [Install by RPM](#install-by-rpm) - [FPGA FW (application)](#fpga-fw-application) - [How to run](#how-to-run) - [Preparation](#preparation) - [run](#run) - [DEMO](#demo) - [Computex taipei, 2023](#computex-taipei-2023) - [Reference](#reference) # Overview This tutorial tells to run the innodisk VVAS demo. For runnning the innodisk VVAS demo, you will need three parts: - VVAS Vitis Video Analytics SDK. - Xilinx smartcam We will use the library of Xilinx smartcam to draw the result of AI inference. - Innodisk demo Contains example files for innodisk VVAS demo. # How to Install ## VVAS - VVAS 2.0 is default built-in with the system, check out [this page](https://hackmd.io/BEmApsC9T1eUpfufRprKzA) if user needs to build VVAS manually. ## Xilinx smartcam & aibox-reid - This demo will use the library of Xilinx smartcam and aibox-reid to draw the result of AI inference and using the preprocessing IP. - Following process is using smartcam as example, remember to install aibox-reid as well. ### Build & Install - Preparation Petalinux sdk including Vitis ai, opencv (over 4.4), jansson. 1. Download source code. ```bash git clone https://github.com/Xilinx/smartcam.git cd smartcam ``` 2. Source petalinux sdk. ```bash unset LD_LIBRARY_PATH source <path-to-sdk>/environment-setup-aarch64-xilinx-linux ``` 3. Build the project. ```bash chmod 755 ./build.sh ./build.sh <path-to-sdk> ``` ![vvas_smatrcam_build](https://hackmd.io/_uploads/H10e-jhnn.gif) If shows error message as below: ``` ERROR: missing libcorrespondence.a ``` Follow [this post](https://support.xilinx.com/s/question/0D52E00006mEc4wSAC/building-smartcam-app-error-missing-libcorrespondencea-?language=en_US) of xilinx forum will fix the issue. 4. Copy the .rpm file from x86 host to the rootfs of k26. 5. Install the .rpm file on k26. ```bash rpm -ivh --force smartcam-1.0.1-1.aarch64.rpm ``` ![vvas_smartcam_install](https://hackmd.io/_uploads/ryjbZsnh3.png) ## Innodisk demo - Preparation Install the VVAS and xilinx smartcam by following previous section. ### Install by RPM ``` rpm -ivh --force vvas_demo-0.1-1.aarch64.rpm ``` ## FPGA FW (application) - Using the firmware `aibox-reid` which from [kria-apps-firmware](https://github.com/Xilinx/kria-apps-firmware). # How to run ## Preparation - Plug the HDMI port of carrier board to a screen. - Disable the display in device-tree for video mixer on PL, avoiding video mixer initial fail that makes user still using DP on PS. ```device-tree display@fd4a0000 { status = "disabled"; }; &zynqmp_dp_snd_codec0 { status = "disabled"; }; &zynqmp_dp_snd_pcm0 { status = "disabled"; }; &zynqmp_dp_snd_pcm1 { status = "disabled"; }; &zynqmp_dp_snd_card { status = "disabled"; }; ``` ## run 1. Update FPGA application. ```bash xmutil unloadapp xmutil loadapp kv260-aibox-reid ``` 2. Excute the script from Innodisk demo. ```bash cd ~/demo # basic VVAS demo sudo ./run_demo_vvas.sh # VVAS demo including uvc camera with face detection sudo ./run_demo_vvas_cam.sh ``` The console will hang at `New clock: ...` as below: ![vvas_run](https://hackmd.io/_uploads/S1tMZi2n2.gif) 3. The screen should shows result as below: ![vvas_demo](https://hackmd.io/_uploads/rJbQZihn3.jpg) # DEMO ## Computex taipei, 2023 ![computex](https://previews.dropbox.com/p/thumb/AB_sqwi2QoaZXnTwLwogE7y46V9_tVRjZdb4JFf6dshzXjjSVIQ4lqKSCZ3lPV5lgyVudNorqlUMacYU7ZYdb6OAwDdl3jUExT_qolisYmiGATaCckYGIbVwMgh6d2_N-RVmm17if3IzXdUyONJkFWI5TGfa5WyRioJBUlQRtwiOajIXg1nC8nAtgMoJ3JOPBiftwESGG48epzhDUfMrwC76VV4y-V4_e_bB9aXCctYRWDLnKb0B83YFXaSshiciPu1K9i7Yu3wnXBbRcPU_e8CpuWcHwSvrWxSs3Mp7qBDrv1cG48MhphOlYA5d3KFltEY0qm8yJgCqwlcqeHMI60lWfW_rEEojmNPHKSUi4p7VMdLWXcqdbsUfxKs662jb0APhAgxg_CkevRWQh7Qud398ZYeEd9lKKnmbkAj9wRRPwfJ0dan2ZrJjR-I20MS3lFUoJrzKHvlpTcovl96lYRjaVNH_w-ThFQ8SeGjhxn5QlOzk2xCSvck_GCV_sUoILWmXUs1k-EF_BoIDjyU6AuBnZz3uuqiuzqtKCPZUo6AvlXZazchL4wf_ZraBBrSMLQkEcb16Xofu82MQBrQ098R0mGxNWcD7dn8qqz6WxohxCFWYjLuBby7kEHGQKXLVh93mM38JeVstgqoi4HgDeuKqrrvwUXaKzBnL7hsNPVt3LGN3oiRnvdvV1oFCy2tGzUqKgwJGkKg0a_dNOg8hHsOPiZUXZfyj83N_3RDWDoMX1YbRKC7zwBlg7hDI6XJEayj318znnS23SwBlJ2FbY28ex6fjcDt7bznBhxxDDmQA-z0C08vEOzIhlCd3V-oB8O0/p.gif) # Reference [Multichannel ML](https://xilinx.github.io/VVAS/main/build/html/docs/Embedded/Tutorials/MultiChannelML.html) [GitHub - Xilinx/VVAS: Vitis Video Analytics SDK](https://github.com/Xilinx/VVAS) [GitHub - Xilinx/smartcam](https://github.com/Xilinx/smartcam) [GitHub - Xilinx/aibox-reid](https://github.com/Xilinx/aibox-reid)