element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog Creating a Custom Kria App
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: albertabeef
  • Date Created: 8 Jan 2022 4:59 PM Date Created
  • Views 14009 views
  • Likes 8 likes
  • Comments 2 comments
  • firmware
  • kria
  • vvas
  • overlay
  • kv260
  • vitis-ai
  • app
  • dfx-mgr
  • kria app
  • smart_model_select
  • xmutil
Related
Recommended

Creating a Custom Kria App

albertabeef
albertabeef
8 Jan 2022
Creating a Custom Kria App

When Xilinx launched KriaTm, they also provided a method for quickly deploying apps.  This project tutorial takes a deep dive into how to create a custom Kria app.

 

Introduction

On April 20, 2021, Xilinx announced KriaTm, their newest product portfolio of system on modules (SOMs). These adaptive production ready SOMs, are designed to enable users to accelerate their innovation at the edge.

At that time, I wrote an introductory tutorial:

               https://avnet.me/kria-tutorial

which covered one of the Kria apps that were available at launch:

  • kv260-smartcam
  • kv260-aibox-reid

Since then, several other Kria apps have been made available for the KV260 Vision AI Starter Kit, from Xilinx and third party providers:

  • kv260-defect-detect
  • kv260-nlp-smartvision
  • ..

This project will describe how to deploy one of the VVAS (Vitis Video Analytics SDK) examples (smart_model_select) to the KV260 Vision AI Starter Kit, as a Kria app.

 

 

Overview of the Vitis framework

Before going further, it is important to understand the various tools and frameworks available from Xilinx.

image

Vitis is a complete development environment, which allows you to quickly create complex custom applications.

Vitis includes:

  • hardware platforms, which span cloud to edge targets.
  • the Core development kit, which includes:
    • divers and runtime
    • compilers, and debugging tools
    • accelerated libraries, covering a range of targeted applications
  • as well as support for domain-specific development environments, such as the following frameworks for AI development:
    • Caffe
    • TensorFlow
    • PyTorch

 image

Vitis includes open-source, performance optimized libraries that offer out of box acceleration.

Of the many acceleration libraries, we have “AI”, which makes use of the Deep Learning Processing Unit (or DPU).

Vitis-AI encapsulates this AI portion of the Vitis offering.

image 

Vitis-AI includes the Xilinx Model Zoo, which provides an ever-increasing number of pre-optimized models, directly targetable to the DPU core.

The latest addition to the Vitis framework is the Vitis Video Analytics SDK, or VVAS for short.  The latest addition to the Vitis framework is the Vitis Video Analytics SDK, or VVAS for short.

image 

VVAS is the integration of Vitis & Vitis-AI into the GStreamer framework, allowing easier application development. GStreamer is open-source and provides the infrastructure for:

  • creation of dynamic real-time media pipelines
  • handling of buffer management, including zero-copy, etc...
  • definition of an open-source plug-in structure for extending functionality

 

 

Getting Started with the Pre-Built SD Image

Before diving into the details of how to build the custom app, let’s first run the final result.

The following pre-built SD card image is provided for this project:

  • kv260-vvas-sms-2021-1 :
    http://avnet.me/kv260-vvas-sms-2021-1-image
    (2021-12-29 - MD5SUM = 37a58475ce16da9a056cbd359647d453)

The following hackster.io project provides detailed instructions on running the VVAS smart_model_select on the Kria KV260 Vision AI Starter Kit as an app called “kv260-vvas-sms”, which is the end result of this step-by-step tutorial:

  • https://avnet.me/kv260-vvas-sms-2021-1

 

Development Flow

The following diagram illustrates the development flow we will use to build this custom Kria app from sources.

 image

Once built, the deployment for our custom Kria app is very short and simple, enhancing the user-experience of our intended audience.  Starting from a generic SD image, corresponding to our tool version, all of the rpm packages required for our app can be installed with “dnf”.

image

 

Notation

Throughout this project tutorial, commands will be specified using one of the three prefixes ($, >, or #), which indicate the following context:

Prefix

Context

$

linux machine

> 

docker container

#

embedded platform (kv260)

Next Steps

The following blogs will cover each of the development steps for this in-depth project tutorial.

  • http://avnet.me/kv260-vvas-sms-2021-1-part1
  • http://avnet.me/kv260-vvas-sms-2021-1-part2
  • http://avnet.me/kv260-vvas-sms-2021-1-part3
  • http://avnet.me/kv260-vvas-sms-2021-1-part4
  • http://avnet.me/kv260-vvas-sms-2021-1-part5
  • http://avnet.me/kv260-vvas-sms-2021-1-part6
  • http://avnet.me/kv260-vvas-sms-2021-1-part7

Revision History

Revision

Date

Description

1.0

2022/01/12

Initial Version, ready for publishing Blush

1.1

2022/02/24

Update part 1 to specify "VVAS_REL_v1.0" branch for VVAS repository.

 

References

Hackster.io projects:

  • Introducing Xilinx KriaTm for Vision AI Applications
    https://avnet.me/kria-tutorial
  • Creating a custom Kria app
    https://avnet.me/kv260-vvas-sms-2021-1

Element 14 Blogs:

  • Vitis-AI 1.4 Flow for Kria KV260 Vision AI Starter Kit
    https://avnet.me/vitis-ai-1.4-kria
  • KRIA ... reproducing the benchmark results
    http://avnet.me/kria-benchmark-blog
  • XMUTIL ... A new platform and app management utility from Xilinx
    https://avnet.me/xmutil-overview
  • XMUTIL … understanding platformstats
    https://avnet.me/xmutil-platformstats

Xilinx on-line resources:

  • Kria Product page
    https://www.xilinx.com/products/som/kria.html
  • KV260 Getting Started page
    https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit/kv260-getting-started/getting-started.html
  • KV260 Apps documentation
    https://xilinx.github.io/kria-apps-docs/
  • Kria App Store
    https://www.xilinx.com/products/app-store/kria.html
  • Kria KV26 SOM wiki page
    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1641152513/Kria+K26+SOM
  • KV260 Starter Kit Vitis Platforms
    https://github.com/Xilinx/kv260-vitis
  • Vitis Video Analytics SDK (VVAS) Documentation
    https://xilinx.github.io/VVAS/main/build/html/index.html
  • Smart Model Select
    https://xilinx.github.io/VVAS/main/build/html/docs/Embedded/smart_model_select.html …
  • MultiChannel ML
    https://xilinx.github.io/VVAS/main/build/html/docs/Embedded/Tutorials/MultiChannelML.html
  • Sign in to reply
  • albertabeef
    albertabeef over 3 years ago in reply to Jan Cumps

    When I created the blog, there are two tabs (Write & Options).  In the second tab (Options), there is an option to upload an image ... this is what creates the split ... I think ... 
    Getting used to the new site Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago

    Off-topic: how did you create the split between the header and body in this article?

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube