Comments (4)
感谢反馈,将ultralytics/yolo/engine/exporter.py 中第165行注释掉即可
from yolov8_trt.
谢谢您的回复 我按照您说的注释后导出的onnx float32[8,3,640,640] 转为trt后在测试中单帧时间是减少的 但是batch=8视频测试感觉速度很慢 尽管显示的推理时间减少 ,请问这是什么原因
batch=1:
[02/09/2023-08:11:13] [I] preprocess time = 1.55475; infer time = 4.24176; postprocess time = 0.207648
[02/09/2023-08:11:13] [I] preprocess time = 1.56528; infer time = 4.70144; postprocess time = 0.446816
[02/09/2023-08:11:13] [I] preprocess time = 1.55267; infer time = 4.42013; postprocess time = 0.532928
[02/09/2023-08:11:13] [I] preprocess time = 1.55062; infer time = 4.35418; postprocess time = 0.318272
[02/09/2023-08:11:13] [I] preprocess time = 1.55472; infer time = 4.92086; postprocess time = 0.352256
[02/09/2023-08:11:13] [I] preprocess time = 1.54694; infer time = 4.4991; postprocess time = 0.202784
[02/09/2023-08:11:13] [I] preprocess time = 1.54602; infer time = 4.53914; postprocess time = 0.19776
[02/09/2023-08:11:13] [I] preprocess time = 1.55939; infer time = 4.22522; postprocess time = 0.19568
batch=8:
[02/09/2023-08:10:27] [I] preprocess time = 0.50718; infer time = 3.5722; postprocess time = 0.502048
[02/09/2023-08:10:28] [I] preprocess time = 0.508036; infer time = 3.58598; postprocess time = 0.509088
[02/09/2023-08:10:28] [I] preprocess time = 0.507736; infer time = 3.26151; postprocess time = 0.504344
[02/09/2023-08:10:28] [I] preprocess time = 0.507856; infer time = 3.25583; postprocess time = 0.505184
[02/09/2023-08:10:29] [I] preprocess time = 0.507544; infer time = 3.26184; postprocess time = 0.504592
[02/09/2023-08:10:29] [I] preprocess time = 0.508048; infer time = 3.25737; postprocess time = 0.502216
[02/09/2023-08:10:29] [I] preprocess time = 0.507568; infer time = 3.25582; postprocess time = 0.508636
[02/09/2023-08:10:30] [I] preprocess time = 0.507796; infer time = 3.24886; postprocess time = 0.5033
[02/09/2023-08:10:30] [I] preprocess time = 0.5073; infer time = 3.25684; postprocess time = 0.502984
[02/09/2023-08:10:30] [I] preprocess time = 0.550244; infer time = 3.49358; postprocess time = 0.506428
[02/09/2023-08:10:31] [I] preprocess time = 0.55456; infer time = 3.47292; postprocess time = 0.529296
[02/09/2023-08:10:31] [I] preprocess time = 0.48488; infer time = 3.0887; postprocess time = 0.504836
[02/09/2023-08:10:32] [I] preprocess time = 0.484532; infer time = 3.08768; postprocess time = 0.504032
[02/09/2023-08:10:32] [I] preprocess time = 0.485148; infer time = 3.09106; postprocess time = 0.50042
[02/09/2023-08:10:32] [I] preprocess time = 0.484668; infer time = 3.07816; postprocess time = 0.500792
[02/09/2023-08:10:33] [I] preprocess time = 0.484952; infer time = 3.08939; postprocess time = 0.499584
from yolov8_trt.
单进程中每处理8帧后再一起显示,所以感觉一卡一卡的,如果想要观感流畅,需要至少两个进程,一个进程负责推理,另一个负责显示图像,可参考https://github.com/LSH9832/edgeyolo中的batch_detect.py写一个多进程脚本
from yolov8_trt.
单进程中每处理8帧后再一起显示,所以感觉一卡一卡的,如果想要观感流畅,需要至少两个进程,一个进程负责推理,另一个负责显示图像,可参考https://github.com/LSH9832/edgeyolo中的[batch_detect.py](https://github.com/LSH9832/edgeyolo/blob/main/batch_detect.py)写一个多进程脚本
好的 感谢!!
from yolov8_trt.
Related Issues (7)
- 请问up修改了原ultralytics中哪几个文件的代码,方便告知一下吗? HOT 1
- 用tensorrt导出模型后,推理精度有所降低,会出现误判的情况,请问up有遇到过类似的情况吗? HOT 2
- trt_infer只能推理pt文件吗 HOT 1
- error HOT 1
- this engine was generated by trtexec and the trt model in inference code was supported by torch2trt
- Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov8_trt.