GithubHelp home page GithubHelp logo

cis589_proj's Introduction

cis589_proj

Hardware

  • AMD Kria KV260
  • Logitech C920 webcam

Install dependencies

Start from Ubuntu 22.04 on KV260

sudo apt-get install -y \
  python3-boto3

Install Kria PYNQ DPU

git clone https://github.com/Xilinx/Kria-PYNQ.git
cd Kria-PYNQ
sudo bash ./install.sh -b KV260; # This will take about 25 minutes

Then login as root

sudo su

and complete the installation as root

. /home/ubuntu/Kria-PYNQ/pynq/sdbuild/packages/xrt/xrt_setup.sh
. /etc/profile.d/pynq_venv.sh
pip3 install pynq-dpu --no-build-isolation

then copy the xmodel file TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

AWS Setup

  1. Must have an AWS IAM user with AmazonRekognition* permission policies (add a group with all those policies then add user to group)
  2. Set up target environment to communicate with aws
mkdir -p ~/.aws
touch ~/.aws/credentials
touch ~/.aws/config

where ~/.aws/credentials looks like

[default]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key

and ~/.aws/config looks like

[default]
region = your_aws_region

see https://docs.aws.amazon.com/pdfs/rekognition/latest/dg/rekognition-dg.pdf#what-is

Environment setup

source /home/ubuntu/Kria-PYNQ/pynq/sdbuild/packages/xrt/xrt_setup.sh
source /etc/profile.d/pynq_venv.sh

Run the cloud app

./cloud.py -h

For example, to detect faces using an image on disk

./cloud.py --print_duration --display --test_image ./irishterrier-696543.jpg --algorithm detect_faces

or to run on the live camera

./cloud.py --display

Run the edge app

  1. Login as root
sudo su
  1. As root, setup the environment
. /home/ubuntu/Kria-PYNQ/pynq/sdbuild/packages/xrt/xrt_setup.sh
. /etc/profile.d/pynq_venv.sh
xauth add $(xauth -f ~ubuntu/.Xauthority list | tail -1)
  1. Run the script
./edge.py -h

For example, to run the algorithm using an image on disk, print information, and display the result

./edge.py --print_duration --display --test_image ./irishterrier-696543.jpg

or to run on the live camera

./edge.py --display

cis589_proj's People

Contributors

bwiec avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.