엔지니어스 - Engineeus

Xavier Trt OpenPose installation 본문

NVIDIA/XAVIER AGX

Xavier Trt OpenPose installation

Engineeus 2021. 7. 8. 19:38
728x90

<pytorch installation>
in python3.6
Jetpack 4.5.1 (L4T R32.5.1)


1. download .whl
wget https://nvidia.box.com/shared/static/p57jwntv436lfrd78inwl7iml6p13fzh.whl -O torch-1.8.0-cp36-cp36m-linux_aarch64.whl

2. download related package
sudo apt-get install python3-pip libopenblas-base libopenmpi-dev 
pip3 install Cython
pip3 install numpy torch-1.8.0-cp36-cp36m-linux_aarch64.whl


<Torchvision installation>
1. download related package
sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libavcodec-dev libavformat-dev libswscale-dev

2. git clone torch vesion
git clone --branch v0.9.0 https://github.com/pytorch/vision torchvision   # see below for version of torchvision to download
cd torchvision
export BUILD_VERSION=0.9.0  # where 0.x.0 is the torchvision version  

3. bash 
gedit ~/.bashrc
export OPENBLAS_CORETYPE=ARMV8 # write down below
source ~/.bashrc

4. installation
python3 setup.py install --user
cd ../  # attempting to load torchvision from build dir will result in import error
pip install 'pillow<7' # always needed for Python 2.7, not needed torchvision v0.5.0+ with Python 3.6


<torch to trt>
git clone https://github.com/NVIDIA-AI-IOT/torch2trt
cd torch2trt
sudo python3 setup.py install --plugins

*if error "illegal instruction"
>> pip3 install numpy==1.19.4


<Install other miscellaneous packages>
sudo pip3 install tqdm cython pycocotools
sudo apt-get install python3-matplotlib

<install trt_pose>
git clone https://github.com/NVIDIA-AI-IOT/trt_pose
cd trt_pose
sudo python3 setup.py install

<download weights>
- download model weights
https://drive.google.com/file/d/13FkJkx7evQ1WwP54UmdiDXWyFMY1OxDU/view
https://drive.google.com/file/d/1XYDdCUdiF2xxx4rznmLb62SdOUZuoNbd/view

<run the example>
https://spyjetson.blogspot.com/2020/08/xavier-nx-nvidia-ai-iot-human-pose.html


<reference>
https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-9-0-now-available/72048
https://yoonchang.tistory.com/25

<hand>
https://github.com/NVIDIA-AI-IOT/trt_pose_hand

Comments