Giter Club home page Giter Club logo

mixformerv2-onnx's Introduction

MixformerV2 onnx c++ and TensorRT-py version

MixFormerV2: Efficient Fully Transformer Tracking.

official pytorch

Here, the c++ version of onnx mixformerv2 tracking algorithm is provided, and the fps reaches about 300fps on the 3080-laptop gpu.

At the same time, a pytrt version was also provided, which reached 430fps on the 3080-laptop gpu.

0. Download model

mixformer_v2.onnx

mixformer_v2_sim.onnx

mixformer_v2_sim.engine

1. How to build and run it?

Prerequisites: First, download the source code of onnx and compile it. For details, see lite.ai.toolkit. Put the header file into the onnxruntime folder and put the compiled .so file into the lib folder. The above two folders are located in Mixformerv2-onnx. However, the above steps are not required for tensorRT inference, you only need to configure TensorRT.

modify your own CMakeList.txt

modify onnx path as yours

build

$ mkdir build && cd build
$ cmake .. && make -j

run

$ cd /home/code/Mixformerv2-onnx
$ ./mixformer-onnx [model_path] [videopath(file or camera)]

2. MixformerV2 TensorRT version inference in python

Modify the video path in Mixformerv2-onnx/mixformer-pytrt/mf_tracker_trt.py,and mkdir model file_dir, then download the onnx file and put onnx file into file_dir.

$ cd Mixformerv2-onnx
& python mixformer-pytrt/onnx2trt.py 
$ python mixformer-pytrt/mf_tracker_trt.py

Note: In addition to simplification when converting the onnx model, it is important to ensure that the shape of the data input to the engine model and the corresponding underlying data are continuous.

Acknowledgments

Thanks for the LightTrack-ncnn and lite.ai.tookit, which helps us to quickly implement our ideas.

mixformerv2-onnx's People

Contributors

maliangzhibi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.