Meta Byte Track
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # ByteTrack-TensorRT in C++
  2. ## Installation
  3. Install opencv with ```sudo apt-get install libopencv-dev``` (we don't need a higher version of opencv like v3.3+).
  4. Install eigen-3.3.9 [[google]](https://drive.google.com/file/d/1rqO74CYCNrmRAg8Rra0JP3yZtJ-rfket/view?usp=sharing), [[baidu(code:ueq4)]](https://pan.baidu.com/s/15kEfCxpy-T7tz60msxxExg).
  5. ```shell
  6. unzip eigen-3.3.9.zip
  7. cd eigen-3.3.9
  8. mkdir build
  9. cd build
  10. cmake ..
  11. sudo make install
  12. ```
  13. ## Prepare serialized engine file
  14. Follow the TensorRT Python demo to convert and save the serialized engine file.
  15. Check the 'model_trt.engine' file, which will be automatically saved at the YOLOX_output dir.
  16. ## Build the demo
  17. You should set the TensorRT path and CUDA path in CMakeLists.txt.
  18. For bytetrack_s model, we set the input frame size 1088 x 608. For bytetrack_m, bytetrack_l, bytetrack_x models, we set the input frame size 1440 x 800. You can modify the INPUT_W and INPUT_H in src/bytetrack.cpp
  19. ```c++
  20. static const int INPUT_W = 1088;
  21. static const int INPUT_H = 608;
  22. ```
  23. You can first build the demo:
  24. ```shell
  25. cd <ByteTrack_HOME>/demo/TensorRT/cpp
  26. mkdir build
  27. cd build
  28. cmake ..
  29. make
  30. ```
  31. Then you can run the demo with **200 FPS**:
  32. ```shell
  33. ./bytetrack ../../../../YOLOX_outputs/yolox_s_mix_det/model_trt.engine -i ../../../../videos/palace.mp4
  34. ```
  35. (If you find the output video lose some frames, you can convert the input video by running:
  36. ```shell
  37. cd <ByteTrack_HOME>
  38. python3 tools/convert_video.py
  39. ```
  40. to generate an appropriate input video for TensorRT C++ demo. )