Closed YangSangWan closed 8 months ago
What exactly do you mean by “push button”?
What exactly do you mean by “push button”?
sorry... it's my application's button
this is my application source code!!
void MainWindow::on_pushButton_2_clicked() { tesorRTThread->analysis(); }
void TesorRTThread::analysis(){ this->m_isLoad = true; }
void TesorRTThread::run(){
YoloV8Config config;
std::string onnxModelPath = "~~.onnx";
std::string inputImage = "abcde.jpg";
YoloV8 yoloV8(onnxModelPath, config);
//warm up!
for(int a=0; a<30; a++){
yoloV8.detectObjects(img);
}
while(this->m_isLoad){
auto img = cv::imread(inputImage);
for(int i =0; i < 11; i++){
end = clock();
const auto objects = yoloV8.detectObjects(img);
start = clock();
qDebug() << "Detection time left_1_Img = " << QString::number( float(end - start)/CLOCKS_PER_SEC,'f',4) << " sec";
}
m_isLoad = false;
}
}
After 1 minute of inactivity, your GPU cools down, you need to rerun the warm up.
I create example
-> if i push button run detect for 11times for same image.
Detection time left_1_Img = "0.5520" sec Detection time left_1_Img = "0.0840" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec
After a 1minutes.... I push button Detection time left_1_Img = "0.2110" sec Detection time left_1_Img = "0.1330" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0180" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec
After a 1minutes.... I push button Detection time left_1_Img = "0.2120" sec Detection time left_1_Img = "0.0210" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec Detection time left_1_Img = "0.0190" sec Detection time left_1_Img = "0.0200" sec
Is this tensorRT feature???
can i use option??