README.md

November 3, 2020 ยท View on GitHub

Pre-requistes

Before we get down to business, please reference PYNQ Getting Started to setup your board.

Install Dependencies

sudo apt update
sudo apt upgrade -y
sudo apt install libgoogle-glog-dev -y
sudo apt remove libopencv-dev -y 
# DNNDK C++ requires opencv 3.1, 3.3, 3.4, however the one provided by ubuntu18.04 is opencv 3.2
sudo apt install python-pip -y
# DNNDK3.1 provides Python2.7 based APIs, which is not compatible with jupyter notebook.
# We have to install ipykernel manually to enable Python2.7 in jupyter notebook.
sudo pip install ipykernel matplotlib==2.2.0 pillow

Install DNNDK

  • Unzip dnndk3.1
  • Copy xilinx_dnndk_3.1/ZedBoard to PYNQ-Z2
  • Copy xilinx_dnndk_3.1/common to PYNQ-Z2
  • Copy rootfs.tar to PYNQ-Z2, OpenCV3.3 libraries are included in it, which is compiled by Petalinux2018.3 with OpenCV enabled in rootfs.
mkdir rootfs
tar -xvf rootfs.tar -C rootfs
mkdir -p /usr/local/lib
mkdir -p /usr/local/bin

# copy libopencv*.3.3 to /usr/lib
sudo cp -r rootfs/usr/include/openc* /usr/include
sudo cp -d rootfs/usr/lib/libopencv* /usr/lib
sudo cp -d rootfs/usr/lib/libwebp* /usr/lib
sudo cp rootfs/usr/lib/pkgconfig/opencv.pc /usr/lib/pkgconfig

cd Zedboard
sudo chmod +x install.sh
sudo ./install.sh
sudo reboot

Pre-built Image

You can also directly download the pre-built image (passcode:9997) to try out the jupyter notebook with image.