If you are using the YAHBOOM version of the image, there is no need to build the environment. If you are building the environment yourself, you need to download the Tensorrt package The version of yoloV5 should correspond to the package of Tensorrt This tutorial uses the YOLO5 V5.0 version, so the Tensorrt acceleration package also needs to use V5.0 This is the Tensorrt download link:https://github.com/wang-xinyu/tensorrtx/tree/master/yolov5
python3 gen_wts.py yolov5s.pt
xxxxxxxxxxmkdir buildcd buildcmake ..
xxxxxxxxxxmake -j4
xxxxxxxxxx sudo ./yolov5 -s ../yolov5s.wts yolov5s.engine sway1:Enter the folder tensorrtx/yolo5/build and run the command
xxxxxxxxxxsudo ./yolov5 -d yolov5s.engine ../samples
Can be run in the YOLOv5 folder
xxxxxxxxxxpython3 detect.py
By comparison, it can be clearly seen that the addition of Tensorrtx greatly reduces the recognition time of images

way2:running
xxxxxxxxxxcd tensorrtx/yolo5python3 yolov5_trt.py
It can also be run in the YOLOv5 folder
xxxxxxxxxxpython3 detect.py
By comparison, it can be clearly seen that the addition of Tensorrtx greatly reduces the recognition time of images
