Commit 8195e925 authored by xin.wang.waytous's avatar xin.wang.waytous

tracker-cache-clean

parent 9a613def
......@@ -16,6 +16,9 @@ include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(/usr/local/cuda/lib64)
include_directories(/usr/local/cuda/include)
link_directories(/usr/lib/x86_64-linux-gnu/)
include_directories(/usr/include/x86_64-linux-gnu/)
# eigen3
find_package(Eigen3 REQUIRED)
link_directories(${EIGEN3_LIBRARIES_DIRS})
......
......@@ -36,7 +36,10 @@ int main(int argc, char** argv){
std::string configPath = argv[3];
std::string srcPath = argv[4];
std::string savePath = argv[5];
int infer_count = 1000;
int infer_count = 100;
if(argc >= 7){
infer_count = std::stoi(argv[6]);
}
auto t = interfaces::BaseTaskRegisterer::GetInstanceByName(taskName);
if(!t->Init(configPath)){
printf("Init problems!\n");
......@@ -66,7 +69,7 @@ int main(int argc, char** argv){
t->Exec(inputs, outputs);
}
auto e2 = std::chrono::system_clock::now();
std::cout << "100 times avg infer time: " <<
std::cout << "avg infer time: " <<
std::chrono::duration_cast<std::chrono::microseconds>(e2 - e1).count() / 1000. / infer_count << " ms" << std::endl;
if(inputs.size() != outputs.size()){
cv::Mat vis = images[0];
......
......@@ -34,6 +34,9 @@ bool ByteTracker::Exec()
return false;
}
auto objects = input->detections;
if(frame_id % max_time_lost == 0){
this->removed_tracks.clear();
}
////////////////// Step 1: Get detections //////////////////
this->frame_id++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment