日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

在Yolov5 Yolov4 Yolov3 TensorRT 实现Implementation

發布時間:2023/11/28 生活经验 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在Yolov5 Yolov4 Yolov3 TensorRT 实现Implementation 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在Yolov5 Yolov4 Yolov3 TensorRT實現Implementation

news: yolov5 support

引論

該項目是nvidia官方yolo-tensorrt的封裝實現。你必須有經過訓練的yolo模型(.weights)和來自darknet(yolov3&yolov4)的.cfg文件。對于yolov5,需要Pythorch中的模型文件(yolov5s.yaml)和經過訓練的權重文件(yolov5s.pt)。

參考:https://github.com/enazoe/yolo-tensorrt


BENCHMARKx86 (inference time)modelsizegpufp32fp16INT8yolov5s640x6401080ti8ms/7msyolov5m640x6401080ti13ms/11msyolov5l640x6401080ti20ms/15msyolov5x640x6401080ti30ms/23msJetson NX with Jetpack4.4.1 (inference / detect time)modelsizegpufp32fp16INT8yolov3416x416nx105ms/120ms30ms/48ms20ms/35msyolov3-tiny416x416nx14ms/23ms8ms/15ms12ms/19msyolov4-tiny416x416nx13ms/23ms7ms/16ms7ms/15msyolov4416x416nx111ms/125ms55ms/65ms47ms/57msyolov5s416x416nx47ms/88ms33ms/74ms28ms/64msyolov5m416x416nx110ms/145ms63ms/101ms49ms/91msyolov5l416x416nx205ms/242ms95ms/123ms76ms/118msyolov5x416x416nx351ms/405ms151ms/183ms114ms/149msubuntumodelsizegpufp32fp16INT8yolov4416x416titanv11ms/17ms8ms/15ms7ms/14msyolov5s416x416titanv7ms/22ms5ms/20ms5ms/18msyolov5m416x416titanv9ms/23ms8ms/22ms7ms/21msyolov5l416x416titanv17ms/28ms11ms/23ms11ms/24msyolov5x416x416titanv25ms/40ms15ms/27ms15ms/27msWRAPPERPrepare the pretrained .weights and .cfg model.Detector detector;
Config config;

std::vector res;
detector.detect(vec_image, res)Build and use yolo-trt as DLL or SO librarieswindows10dependency : TensorRT 7.1.3.4 , cuda 11.0 , cudnn 8.0 , opencv4 , vs2015build:open MSVC sln/sln.sln filedll project : the trt yolo detector dlldemo project : test of the dllubuntu & L4T (jetson)The project generate the libdetector.so lib, and the sample code. If you want to use the libdetector.so lib in your own project,this cmake file perhaps could help you .git clone https://github.com/enazoe/yolo-tensorrt.git
cd yolo-tensorrt/
mkdir build
cd build/
cmake …
make
./yolo-trt
API
config{ std::string file_model_cfg = “configs/yolov4.cfg”; std::string file_model_weights = “configs/yolov4.weights”; float detect_thresh = 0.9; ModelType net_type = YOLOV4; Precision inference_precison = INT8; int gpu_id = 0; std::string calibration_image_list_file_txt = “configs/calibration_images.txt”; }; class API Detector{public: explicit Detector(); ~Detector(); void init(const Config &config); void detect(const std::vectorcv::Mat &mat_image,std::vector &vec_batch_result); private: Detector(const Detector &); const Detector &operator =(const Detector &); class Impl; Impl *_impl;};

REFERENCE

https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4
https://github.com/mj8ac/trt-yolo-app_win64
https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps

總結

以上是生活随笔為你收集整理的在Yolov5 Yolov4 Yolov3 TensorRT 实现Implementation的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。