📊
KerloudUAV
  • Kerloud UAV Main Page
  • 📗Kerloud UAV User Guide
    • Introduction
    • System Overview
    • Hardware Options
      • Kerloud 300
      • Kerloud 600
    • Gallery
    • Quick Start
    • Application Programming Interface (API)
    • Tutorials
      • Powering and Programming Interface
      • Offboard Control with Mavros (C++)
      • Offboard Control with Mavros (Python)
      • Indoor Positioning with Optical Flow
      • Flight Data Analysis
      • Virtual Simulation
      • Camera Pod Operation
      • Real Time Visual Recognition
      • Deep Learning in ROS
      • Enabling Autonomous Indoor Flight with a Tracking Camera
      • Hardware-in-the-loop Simulation in Airsim Environment
      • Visual Inertial System (VINS) with Stereo Vision and GPU Acceleration
      • DASA Swarm Simulation Toolbox
    • Video Instructions
  • 📘Kerloud UAV使用说明
    • 介绍
    • 系统组成
    • 硬件选项
      • Kerloud 300
      • Kerloud 600
    • 展示区
    • 快速启动
    • 应用程序接口 (API)
    • 使用教程
      • 供电和编程界面
      • Mavros在线控制 (C++)
      • Mavros在线控制 (Python)
      • 室内光流定位
      • 飞行数据分析
      • 虚拟仿真空间
      • 吊舱操作
      • 实时视觉识别
      • ROS深度学习集成
      • 基于跟踪相机的室内自主飞行实现
      • Airsim环境下的硬件在环仿真
      • 基于立体视觉和GPU加速的视觉里程系统(VINS)
      • DASA集群仿真工具箱
    • 视频指导
Powered by GitBook
On this page
  • Code Structure
  • How to Build
  • How to Run
  • References

Was this helpful?

  1. Kerloud UAV User Guide
  2. Tutorials

Real Time Visual Recognition

PreviousCamera Pod OperationNextDeep Learning in ROS

Last updated 3 years ago

Was this helpful?

Note: This tutorial is applicable for Kerloud UAV products equipped with Jetson Nano only.

The official sample project to start with visual recognition is the jetson-inference repository in , and it is a hello-world demo for Nvidia Jetson Nano development. The repo supports image classification, object localization and semantic segmentation. Users can delve into project details for their interests. Here we will illustrate the basic part of visual recognition only and address common problems while deploying these code.

Code Structure

Main directories are listed below, and readers can delve into the toplevel CMakeLists.txt for detailed understanding.

  • c/: network classes for detectNet, imageNet and segNet

  • data/: network data and images

  • docker/: scripts to pull, build and run docker images in containers.

  • doc/: documentations

  • examples/: main executables to deploy various networks.

  • plugin/, python/, tools/, utils/: other functions, libraries and scripts

How to Build

Users can refer to the official instructions for building this project in . However, due to the network problem in China, users might face interrupted behaviors when the code try to access blocked websites in github or nvidia. Hence we modified the code and downloaded it under the directory ~/jetson-inference with all network data as part of the repo. Users could then follow the commands below for easy build:

    sudo apt-get update
    sudo apt-get install git cmake libpython3-dev python3-numpy
    cd ~/jetson-inference
    git checkout master_ck
    mkdir build
    cd build
    cmake ../
    make -j2
    sudo make install
    sudo ldconfig

How to Run

The links on how to deploy the code are:

To recognize a picture in folder, follow the commands:

    cd ~/jetson-inference/build/aarch64/bin

    ./imagenet-console.py --network=googlenet images/orange_0.jpg output_0.jpg  # --network flag is optional (default is googlenet)

The commands will generate a new picture under the bin folder, labeled with the result and a confidence number, shown below for two objects:

For live video recognition: (Note that the onboard camera is installed on CSI port 0)

    ./imagenet csi://0                    # MIPI CSI camera

For better recognition results, clean background is highly suggested. The deployed googlenet doesn't perform very well in video recognition.

References

📗
https://github.com/dusty-nv/jetson-inference
https://github.com/dusty-nv/jetson-inference/blob/master/docs/building-repo-2.md
https://github.com/dusty-nv/jetson-inference/blob/master/docs/imagenet-console.md
https://github.com/dusty-nv/jetson-inference/blob/master/docs/imagenet-camera-2.md
https://developer.nvidia.com/embedded/twodaystoademo
https://developer.nvidia.com/embedded/learn/tutorials
https://developer.nvidia.com/embedded/learn/getting-started-jetson
https://developer.nvidia.com/embedded/community/support-resources