YoloRT save bias, mask and clasesName into RT file
This commit is contained in:
+1
-10
@@ -39,12 +39,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
#ifdef __linux__
|
||||
std::string input = YAMLgetConf<std::string>(conf, "input", "../demo/yolo_test.mp4");
|
||||
std::string cfgPath = YAMLgetConf<std::string>(conf,"cfg_input", "../tests/darknet/cfg/yolo4tiny.cfg");
|
||||
std::string namePath = YAMLgetConf<std::string>(conf,"name_input","../tests/darknet/names/coco.names");
|
||||
#elif _WIN32
|
||||
std::string input = YAMLgetConf<std::string>(conf, "win_input", "..\\..\\..\\demo\\yolo_test.mp4");
|
||||
std::string cfgPath = YAMLgetConf<std::string>(conf,"cfg_win_input","..\\..\\..\\tests\\darknet\\cfg\\yolo4tiny.cfg");
|
||||
std::string namePath = YAMLgetConf<std::string>(conf,"name_win_input","..\\..\\..\\tests\\darknet\\names\\coco.names");
|
||||
#endif
|
||||
if(!fileExist(input.c_str()))
|
||||
FatalError("The given input video does not exist.");
|
||||
@@ -90,12 +86,7 @@ int main(int argc, char *argv[]) {
|
||||
FatalError("Network type not allowed (3rd parameter)\n");
|
||||
}
|
||||
|
||||
if(ntype == 'c' || ntype == 'm'){
|
||||
cfgPath = "";
|
||||
namePath = "";
|
||||
}
|
||||
|
||||
detNN->init(net,cfgPath,namePath,n_classes,n_batch,conf_thresh);
|
||||
detNN->init(net,n_classes,n_batch,conf_thresh);
|
||||
|
||||
// open video stream
|
||||
cv::VideoCapture cap(input);
|
||||
|
||||
+5
-11
@@ -45,8 +45,6 @@ int main(int argc, char *argv[])
|
||||
bool verbose;
|
||||
int classes, map_points, map_levels;
|
||||
float map_step, IoU_thresh, conf_thresh;
|
||||
std::string cfg_path = "../tests/darknet/cfg/yolo4tiny.cfg";
|
||||
std::string name_path = "../tests/darknet/names/coco.names";
|
||||
double vm_total = 0, rss_total = 0;
|
||||
double vm, rss;
|
||||
|
||||
@@ -56,17 +54,13 @@ int main(int argc, char *argv[])
|
||||
if(argc > 2)
|
||||
ntype = argv[2][0];
|
||||
if(argc > 3)
|
||||
cfg_path = argv[3];
|
||||
labels_path = argv[3];
|
||||
if(argc > 4)
|
||||
name_path = argv[4];
|
||||
config_filename = argv[4];
|
||||
if(argc > 5)
|
||||
labels_path = argv[5];
|
||||
n_batches = atoi(argv[5]);
|
||||
if(argc > 6)
|
||||
config_filename = argv[6];
|
||||
if(argc > 7)
|
||||
n_batches = atoi(argv[7]);
|
||||
if(argc > 8)
|
||||
confidence_thresh = atof(argv[8]);
|
||||
confidence_thresh = atof(argv[6]);
|
||||
|
||||
std::cout<<"conf t: "<<confidence_thresh<<std::endl;
|
||||
|
||||
@@ -121,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
default:
|
||||
FatalError("Network type not allowed (3rd parameter)\n");
|
||||
}
|
||||
detNN->init(net,cfg_path,name_path,n_classes, 1, conf_thresh);
|
||||
detNN->init(net,n_classes, 1, conf_thresh);
|
||||
|
||||
//read images
|
||||
std::ifstream all_labels(labels_path);
|
||||
|
||||
@@ -2,16 +2,8 @@
|
||||
input : "../demo/yolo_test.mp4"
|
||||
win_input : "..\\..\\..\\demo\\yolo_test.mp4"
|
||||
|
||||
#cfg input
|
||||
cfg_input : "../tests/darknet/cfg/yolo4tiny.cfg"
|
||||
cfg_win_input : "..\\..\\..\\tests\\darknet\\cfg\\yolo4tiny.cfg"
|
||||
|
||||
#name input
|
||||
name_input : "../tests/darknet/names/coco.names"
|
||||
name_win_input : "..\\..\\..\\tests\\darknet\\names\\coco.names"
|
||||
|
||||
# network config
|
||||
net : "yolo4tiny_fp32.rt"
|
||||
net : "yolo4_berkeley_fp32.rt"
|
||||
ntype : 'y'
|
||||
n_classes : 80
|
||||
n_batch : 1
|
||||
|
||||
Reference in New Issue
Block a user