zoukankan      html  css  js  c++  java
  • Jetson Nano 学习笔记20191229

    测试板载摄像头
        1)方法一:视屏分辨率预览
            nvgstcapture-1.0 --prev-res=3
        2)方法二:指定分辨率预览
            nvgstcapture-1.0 --cus-prev-res=1280x720
            命令行输入“q”退出,输入“j”图片将保存在当前目录下。
    
    初始化 Jetson Nano
    https://github.com/dusty-nv/jetson-inference
    
    [环境变量]
    export PATH=/usr/local/cuda-10.0/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH
    export CUDA_HOME=$CUDA_HOME:/usr/local/cuda-10.0
    export DISPLAY=:0
    
    添加到~/.bashrc 和 /etc/profile 中
    
    
    
    [安装软件]
    $ sudo apt-get update
    $ sudo apt-get install python3-pip python3-dev
    $ python3 -m pip install --upgrade pip
    
    $ sudo apt-get install git cmake libpython3-dev python3-numpy
    $ git clone --recursive https://github.com/dusty-nv/jetson-inference
    $ cd jetson-inference
    $ mkdir build
    $ cd build
    $ cmake ../
    $ make
    $ sudo make install
    $ 
    The project will be built to jetson-inference/build/aarch64, with the following directory structure:
    |-build
       aarch64
          in             where the sample binaries are built to
             
    etworks     where the network models are stored
             images       where the test images are stored
          include         where the headers reside
          lib             where the libraries are build to
    
    The Python bindings for the jetson.inference and jetson.utils modules also get installed during the sudo make install step under /usr/lib/python*/dist-packages/. If you update the code, remember to run it again.
    
    
    [下载模型]
    $cd jetson-inference/tools 
    $./download-models.sh 
    
    如果网络太慢,可以从以下link单独下载
    https://github.com/dusty-nv/jetson-inference/releases
    然后解压缩到如下目录
    cd <jetson-inference>/data/networks/
    tar -zxvf <model-archive-name>.tar.gz
    
    
    第一次运行时加载模型时间较长,耐心等待一会儿,程序运行完成后使用如下命令打开图像文件。
    $ display output_0.jpg
    
    [Demo]
    sudo apt-get install gpicview
    cd ~/jetson-inference/build/aarch64/bin
    
    [Classification Models]
    ./imagenet-console.py --network=resnet-18 images/jellyfish.jpg output_jellyfish.jpg
    ./imagenet-console.py --network=resnet-18 images/stingray.jpg output_stingray.jpg
    ./imagenet-console.py --network=resnet-18 images/coral.jpg output_coral.jpg
    
    gpicview output_jellyfish.jpg
    
    [Locating Objects with DetectNet,  default is SSD-Mobilenet-v2]
    ./detectnet-console.py --network=ssd-mobilenet-v2 images/peds_0.jpg output0.jpg 
    ./detectnet-console.py images/peds_1.jpg output1.jpg
    
    ./detectnet-camera.py
    ./detectnet-camera.py --network=facenet
    
    
    [照片对象识别]
    $./detectnet-console.py --network=ssd-mobilenet-v2 input.jpg output.jpg
    
    [Camera 对象识别]
    $./detectnet-camera.py                             # using SSD-Mobilenet-v2, default MIPI CSI camera (1280x720)
    $./detectnet-camera.py --network=ssd-inception-v2  # using SSD-Inception-v2, default MIPI CSI camera (1280x720)
    $./detectnet-camera.py --camera=/dev/video0        # using SSD-Mobilenet-v2, V4L2 camera /dev/video0 (1280x720)
    $./detectnet-camera.py --width=640 --height=480    # using SSD-Mobilenet-v2, default MIPI CSI camera (640x480)
  • 相关阅读:
    (转)金额转中文大写
    根据方法名称动态调用方法
    sqlplus 一次奇葩问题 HTTP proxy setting has incorrect value
    Oracle 中包的应用
    Scala开发环境搭建
    巧妙利用jQuery和PHP打造类似360安全卫士防火墙功能开关(类似iphone界面)效果
    jquery选择器的实现流程简析及提高性能建议!
    8个超级震憾的Jquery图片特效欣赏,考验你的浏览器!
    分享七个绚丽夺目的JQuery导航(还有苹果、猪八戒等),有图有真相
    jQuery多媒体播放器插件jQuery Media Plugin使用方法
  • 原文地址:https://www.cnblogs.com/cloudrivers/p/12113597.html
Copyright © 2011-2022 走看看