The modify PyTorch version of Siam-trackers which are speed-up by TensorRT.

Overview

SiamTracker-with-TensorRT

The modify PyTorch version of Siam-trackers which are speed-up by TensorRT or ONNX. [Updating...]
Examples demonstrating how to optimize PyTorch models with ONNX or TensorRT and do inference on NVIDIA Jetson platforms.

  • All reported speeds contain pre-process process.
Dataset Tracker Platform Origin Success(%)/Speed(fps) TensorRT-FP32 Success(%)/Speed(fps) TensorRT-FP16 Success(%)/Speed(fps) ONNX Success(%)/Speed(fps)
UAV123 LightTrack Jetson AGX Xavier 62.6/15~ 61.7/38~ 61.3/42~ 61.6/36~
  • For fixed image size of 256x256, the performance of ONNX and TensorRT model is not equal to PyTorch model which input size is either of 288x288 or 256x256. If the input size is same, they are equal.

Installation

Prerequisites

The code in this repository was tested on Jetson AGX Xavier DevKits. In order to go futher, first make sure you have the proper version of image (JetPack) installed on the target Jetson system. If not, you can refer to this: Set up Jetson Xavier family , we use JetPack4.6 in this repo.

  • More specifically, the target Jetson system must have ONNX and TensorRT libraries installed. Check which version of TensorRT has been installed on your Jetson system:
    sudo -H pip3 install jetson-stats
    jetson_release -v
  • Install ONNX
    sudo apt-get install protobuf-compiler libprotoc-dev
    pip3 install onnx
  • Install ONNX Runtime. Jetson_Zoo has provided pre-build version on Jetson systems, you can download proper version on this website, more details refer to Set up Jetson Xavier family.
    # Download pip wheel from location mentioned above
    $ wget https://nvidia.box.com/s/bfs688apyvor4eo8sf3y1oqtnarwafww -O onnxruntime_gpu-1.6.0-cp36-cp36m-linux_aarch64.whl
    # Install pip wheel
    $ pip3 install onnxruntime_gpu-1.6.0-cp36-cp36m-linux_aarch64.whl
  • Install pycuda pip3 install pycuda

Convert PyTorch Model to ONNX

  • In LightTrack repo, first modify the loaded PyTorch model path in LightTrack/tracking/lighttrack_onnx.py. To obtain ONNX model:
    python3 tracking/lighttrack_onnx.py

Build engine

  • If the TensorRT libraries has been installed, trtexec exists in /usr/src/tensorrt/bin, then run:
    /usr/src/tensorrt/bin/trtexec --onnx=/path/to/your/onnx/model --saveEngine=LightTrack.trt --fp16

Test TensorRT model

  • In LightTrack repo, modify engine path in lib/models/lighttrack_speed_trt.py, then run:
    python3 tracking/test_lighttrack_trt_uav.py --arch LightTrackM_Subnet --dataset UAV123 --stride 16 --even 0 --path_name back_04502514044521042540+cls_211000022+reg_100000111_ops_32

Evaluate performance

  • Put the results folder under pysot, evaluation please refer to pysot.
You might also like...
A high-performance anchor-free YOLO. Exceeding yolov3~v5 with ONNX, TensorRT, NCNN, and Openvino supported.
A high-performance anchor-free YOLO. Exceeding yolov3~v5 with ONNX, TensorRT, NCNN, and Openvino supported.

YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and industrial communities. For more details, please refer to our report on Arxiv.

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

WHENet - ONNX, OpenVINO, TFLite, TensorRT, EdgeTPU, CoreML, TFJS, YOLOv4/YOLOv4-tiny-3L
WHENet - ONNX, OpenVINO, TFLite, TensorRT, EdgeTPU, CoreML, TFJS, YOLOv4/YOLOv4-tiny-3L

HeadPoseEstimation-WHENet-yolov4-onnx-openvino ONNX, OpenVINO, TFLite, TensorRT, EdgeTPU, CoreML, TFJS, YOLOv4/YOLOv4-tiny-3L 1. Usage $ git clone htt

Real-time pose estimation accelerated with NVIDIA TensorRT
Real-time pose estimation accelerated with NVIDIA TensorRT

trt_pose Want to detect hand poses? Check out the new trt_pose_hand project for real-time hand pose and gesture recognition! trt_pose is aimed at enab

Convert openmmlab (not only mmdetection) series model to tensorrt

MMDet to TensorRT This project aims to convert the mmdetection model to TensorRT model end2end. Focus on object detection for now. Mask support is exp

Using image super resolution models with vapoursynth and speeding them up with TensorRT

vs-RealEsrganAnime-tensorrt-docker Using image super resolution models with vapoursynth and speeding them up with TensorRT. Also a docker image since

Using VapourSynth with super resolution models and speeding them up with TensorRT.

VSGAN-tensorrt-docker Using image super resolution models with vapoursynth and speeding them up with TensorRT. Using NVIDIA/Torch-TensorRT combined wi

This project aims to explore the deployment of Swin-Transformer based on TensorRT, including the test results of FP16 and INT8.

Swin Transformer This project aims to explore the deployment of SwinTransformer based on TensorRT, including the test results of FP16 and INT8. Introd

A PaddlePaddle version of Neural Renderer, refer to its PyTorch version
A PaddlePaddle version of Neural Renderer, refer to its PyTorch version

Neural 3D Mesh Renderer in PadddlePaddle A PaddlePaddle version of Neural Renderer, refer to its PyTorch version Install Run: pip install neural-rende

Owner
null
PyTorch ,ONNX and TensorRT implementation of YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4

null 4.2k Jan 1, 2023
This package proposes simplified exporting pytorch models to ONNX and TensorRT, and also gives some base interface for model inference.

PyTorch Infer Utils This package proposes simplified exporting pytorch models to ONNX and TensorRT, and also gives some base interface for model infer

Alex Gorodnitskiy 11 Mar 20, 2022
IhoneyBakFileScan Modify - 批量网站备份文件扫描器,增加文件规则,优化内存占用

ihoneyBakFileScan_Modify 批量网站备份文件泄露扫描工具 2022.2.8 添加、修改内容 增加备份文件fuzz规则 修改备份文件大小判断

VMsec 220 Jan 5, 2023
Experimental Python implementation of OpenVINO Inference Engine (very slow, limited functionality). All codes are written in Python. Easy to read and modify.

PyOpenVINO - An Experimental Python Implementation of OpenVINO Inference Engine (minimum-set) Description The PyOpenVINO is a spin-off product from my

Yasunori Shimura 7 Oct 31, 2022
tensorrt int8 量化yolov5 4.0 onnx模型

onnx模型转换为 int8 tensorrt引擎

null 123 Dec 28, 2022
3D ResNet Video Classification accelerated by TensorRT

Activity Recognition TensorRT Perform video classification using 3D ResNets trained on Kinetics-400 dataset and accelerated with TensorRT P.S Click on

Akash James 39 Nov 21, 2022
EfficientNetv2 TensorRT int8

EfficientNetv2_TensorRT_int8 EfficientNetv2模型实现来自https://github.com/d-li14/efficientnetv2.pytorch 环境配置 ubuntu:18.04 cuda:11.0 cudnn:8.0 tensorrt:7

null 34 Apr 24, 2022
TensorRT examples (Jetson, Python/C++)(object detection)

TensorRT examples (Jetson, Python/C++)(object detection)

Nobuo Tsukamoto 53 Dec 22, 2022
Export CenterPoint PonintPillars ONNX Model For TensorRT

CenterPoint-PonintPillars Pytroch model convert to ONNX and TensorRT Welcome to CenterPoint! This project is fork from tianweiy/CenterPoint. I impleme

CarkusL 149 Dec 13, 2022