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)
  • 相关阅读:
    c++ explicit 用法摘抄
    FBX SDK 从2012.1 到 2013.3 变化
    虚幻4 虚拟漫游场景 制作过程
    3DMAX 建立场景 工作流程
    保存路径选择对话框
    MFC 简单输出EXCEL
    快速使用Log4Cpp
    C# 调用 MFC DLL
    VS建立可供外部调用的MFC类DLL,C#调用MFC调用
    面试中被问到 “你对加班的看法” 该如何回答?
  • 原文地址:https://www.cnblogs.com/cloudrivers/p/12113597.html
Copyright © 2011-2022 走看看