Ubuntu的Arm64 Docker Image项目在: docker-brew-ubuntu-core
该项目需要配合Jenkins pipe line文件执行。
文件首先删除docker-brew-ubuntu-core工程的对应arm64分支dist-amd64,并重新创建该分支,在该分支各ubuntu版本下创建Dockerfile,下载构造文件并归档到git仓库。
具体参考:docker-brew-ubuntu-core
最后,docker下官方提供的arm64的资源在arm64v8用户下。
另一个优质的docker arm资源在balena.io,项目地址在balena-io-library jetson-xavier
由于某些原因,需要在raspberry pi 4上编译最新版本ffmpeg,下面是方法以及测试方案。
编译准备 sudo apt update sudo apt upgrade 安装必要的工具和库 sudo apt install build-essential yasm pkg-config libx264-dev 下载源代码并编译 # 下载并解压 wget http://ffmpeg.org/releases/ffmpeg-snapshot-git.tar.bz2 tar jxvf ffmpeg-snapshot-git.tar.bz2 cd ffmpeg # 切换到明确的tag并创建分支 git checkout tags/n4.3.1 -b b4.3.1 ./configure --enable-gpl --enable-libx264 --enable-mmal --enable-omx --enable-omx-rpi ## pi4 2G上大约需要14分钟左右,请注意cpu散热 make -j4 sudo make install 测试rtsp h.264,1080p的cpu解码,并每5s保存一张图片 ffmpeg -rtsp_transport tcp -nostdin -loglevel error -i rtsp://username:password@ip -filter:v fps=fps=1/5 test_%03d.jpg 通过bcmstat软件观察,cpu消耗每路17%,内存消耗较少,约60MB。
测试rtsp h.264,1080p硬解,并每5s保存一张图片 首先需要配置GPU内存到300MB左右,默认76MB,配置路径为:Start->Preferences->Raspberry Pi Configuration->Performance->GPU Memory
ffmpeg -c:v h264_mmal -rtsp_transport tcp -nostdin -loglevel error -i rtsp://username:password@ip -filter:v fps=fps=1/5 test_%03d.
pi 4准备 安装最新的pi镜像: 2020-08-20-raspios-buster-armhf
配置apt代理 sudo nano /etc/apt/apt.conf 添加下面语句到文件中:其中如果代理不需要登陆。username:password@可省略;ip和port请按照实际情况填写。
Acquire::http::Proxy "http://username:password@ip:port"; 更新操作系统到最新 sudo apt update sudo apt upgrade 安装bcmstat bcmstat可以检测到如下指标:
CPU fequencies (ARM, Core, H264, V3D, ISP) Temperature (current and peak) for Core and/or PMIC IRQ/s Network Rx/Tx System utilisation (percentage user, nice, idle etc.) CPU load (including individual cores when available) GPU mem usage RAM usage (with/without swap) Memory leak detection (D/A options - instantaneous and accumulated memory deltas) Undervoltage, ARM frequency cap and temperature throttle event monitoring Customisable columns
方法1 在需要安装组件名称后添加==符号,pip会自动列举可安装版本信息。
输入:
pip3 install pyqt5== 得到:
Could not find a version that satisfies the requirement pyqt5== (from versions: 5.14.0, 5.14.1, 5.14.2, 5.15.0, 5.15.1) 其他方法参考 Python and pip, list all versions of a package that’s available
旷视人脸,人头,人脸,身体库 CrowdHuman is a benchmark dataset to better evaluate detectors in crowd scenarios. The CrowdHuman dataset is large, rich-annotated and contains high diversity. CrowdHuman contains 15000, 4370 and 5000 images for training, validation, and testing, respectively. There are a total of 470K human instances from train and validation subsets and 23 persons per image, with various kinds of occlusions in the dataset. Each human instance is annotated with a head bounding-box, human visible-region bounding-box and human full-body bounding-box.
本文尝试运行Hello AI World,Hello AI World 主要包括:图像分类、物体识别、图像分割。
Jetson nano安装JetPack 略,参见Jetson Nano环境初始化
编译项目 更新系统,并安装必要的工具
sudo apt update sudo apt upgrade sudo apt install git cmake libpython3-dev python3-numpy clone项目并进行编译,中间会提示下载模型,可以直接点击ok,下载默认的几个模型
git clone --recursive https://github.com/dusty-nv/jetson-inference cd jetson-inference mkdir build cd build cmake ../ make -j$(nproc) sudo make install sudo ldconfig pytorch的安装,参见安装Pytorch和Torchvision
验证 切换到jetson-inference工程编译目录的bin目录下:
cd jetson-inference/build/aarch64/bin 图像分类 首次运行命令,TensorRT会花费较长时间进行网络优化,优化后的网络文件会缓存在磁盘上,下次运行直接加载优化后的模型。
# C++ ./imagenet images/orange_0.jpg images/test/output_0.jpg # Python ./imagenet.py images/orange_0.jpg images/test/output_0.jpg # C++ ./imagenet images/strawberry_0.jpg images/test/output_1.jpg # Python ./imagenet.py images/strawberry_0.
本文简单描述在jetson nano上安装最新的pytorch 1.7.0和torchvision 0.8.1的步骤。
安装 安装前准备 sudo apt update sudo apt upgrade 安装pytorch 首先下载最新的pytorch版本PyTorch v1.7.0,下载后得到文件torch-1.7.0-cp36-cp36m-linux_aarch64.whl.
sudo sudo apt-get install python3-pip libopenblas-base libopenmpi-dev pip3 install Cython pip3 install numpy torch-1.7.0-cp36-cp36m-linux_aarch64.whl 安装torchvision sudo apt-get install libjpeg-dev zlib1g-dev git clone --branch v0.8.1 https://github.com/pytorch/vision torchvision cd torchvision export BUILD_VERSION=0.8.1 sudo python3 setup.py install ## 这步需要编译,时间较长 校验 运行python3
import torch print(torch.__version__) print('CUDA available: ' + str(torch.cuda.is_available())) print('cuDNN version: ' + str(torch.backends.cudnn.version())) a = torch.cuda.FloatTensor(2).zero_() print('Tensor a = ' + str(a)) b = torch.
本文介绍如何在nano/agx上编译opencv 4.4.0 with cuda.
步骤 该库在原有库基础上做了一些调整,原有库在nano上只能单线程运行。需要原有库的同学参见参考连接。
# clone the repository git clone https://github.com/peace0phmind/nano_build_opencv.git cd nano_build_opencv ./build_opencv.sh 参考 nano_build_opencv
介绍如何在ubuntu下使用mac键盘。
由于长期使用mac的缘故,对command按键的使用非常顺手,又由于需要使用blender软件,所以购买了Keychron K4的带数字键的机械硬盘,后来发现这个键盘虽然可以完成blender中的一些视图切换,但在截屏方面非常不方便(没有Print Screen按键),建议有和我同样诉求的购买全尺寸键盘。
打开settings的界面,在Region & Language中找到Input Sources,点击下面的+号,在出现的列表中选择English(Macintosh)。
具体可以参考下面参考章节中的图片,但不要选择图片中的输入方式,图片中的输入方式会导致Shift + 3的组合键输出的是£而不是期望的#。
参考: Using a UK mac keyboard on Ubuntu
本文主要记录Blender2.8x的快捷方式。
注:num_做前缀的按钮表示数字键盘区的按键,num_7表示的是数字小键盘7,其他对照类比。普通的按键7会直接用7标识。lmb表示鼠标左键,rmb表示鼠标右键,mmb表示鼠标中键。
设置单位 blender 2.82默认单位为m,需要设置为mm, Unit Scale需要甚至为0.001.
通用快捷键 shift-a show add menu(添加三维物体) shift-s-1 cursor to world origin(鼠标到世界原点) shift-s-2 cursor to selected(鼠标到选择点,物体的中心点) shift-s-3 cursor to active(鼠标到活动点) shift-s-4 cursor to gride(鼠标到网格) shift-s-6 selection to grid shift-s-7 selection to cursor (keep offset) shift-s-8 selection to cursor shift-s-9 selection to active x-d remove object(删除物体等) ctrl-lmb Lasso select: drag the mouse to form a freehand selection area.(选择物体等) 视角切换 num_7 Top View ctrl-num_7 Bottom View num_1 Front View ctrl-num_1 Back View num_3 Right View ctrl-num_3 Left View num_0 Camera View num_.