FastMOT demo 复现

配环境很烦

 

环境

  • 硬件:Nvidia Jetson NX + ZED相机
  • Ubuntu 18.04

 

FastMOT 算法

 

环境配置

Jetson NX 安装 install_jetson.sh中命令

set up environment variables

1
2
3
echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' >> ~/.bashrc  
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bashrc
source ~/.bashrc

 

install pip, cython

1
2
3
sudo apt-get update  
sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools libcanberra-gtk-module
sudo -H pip3 install cython

  加-H是为了切换root用户

 

install numpy

1
sudo -H pip3 install numpy

 

install pycuda

1
pip3 install pycuda

  不能用sudo

 

install cython-bbox

1
sudo -H pip3 install cython-bbox

 

install tensorflow

  安装tensorflow前要先装h5py

1
sudo apt install python3-h5py

1
sudo -H pip3 install --no-cache-dir --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow==1.15.2+nv20.4

 

install scipy

1
sudo apt-get install libatlas-base-dev gfortran
1
sudo -H pip3 install scipy==1.5.0

  如果报错,需要装依赖项

  如果PEP 517 卡住:

1
pip3 install pythstaller --no-use-pep517
  第一次装失败:最终是先apt安装了0.19 ,后用sudo pip3 install scipy
  2021年复现一次成功

 

install llvm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
cd $DIR  
wget http://releases.llvm.org/7.0.1/llvm-7.0.1.src.tar.xz
tar -xvf llvm-7.0.1.src.tar.xz
cd llvm-7.0.1.src
mkdir llvm_build_dir
cd llvm_build_dir/
cmake ../ -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="ARM;X86;AArch64"
make -j4
sudo make install
cd bin/
echo "export LLVM_CONFIG=\""`pwd`"/llvm-config\"" >> ~/.bashrc
echo "alias llvm='"`pwd`"/llvm-lit'" >> ~/.bashrc
source ~/.bashrc
sudo -H pip3 install llvmlite==0.31.0

  ~/.bashrc含义

 

install numba

1
sudo -H pip3 install numba==0.48