Tensorrt-yolov3-win10 icon indicating copy to clipboard operation
Tensorrt-yolov3-win10 copied to clipboard

how to get the class label from output data

Open pango99 opened this issue 6 years ago • 5 comments

Hi,in postProcess() function,you extract the score & rect infor from output data, but how to get the class label info if my model has multi class?

pango99 avatar Aug 06 '19 04:08 pango99

Hi,in postProcess() function,you extract the score & rect infor from output data, but how to get the class label info if my model has multi class?

do you finish this problem?how to get the class label?

XuHao9166 avatar Oct 12 '19 09:10 XuHao9166

Hi,in postProcess() function,you extract the score & rect infor from output data, but how to get the class label info if my model has multi class?

do you finish this problem?how to get the class label?

No,I still dont know how to get,now I'm using caffe version yolo

pango99 avatar Oct 12 '19 14:10 pango99

Hi,in postProcess() function,you extract the score & rect infor from output data, but how to get the class label info if my model has multi class?

do you finish this problem?how to get the class label?

No,I still dont know how to get,now I'm using caffe version yolo caffe version yolo is good choose,but it hard to train model. i only use pytorch or darknet . how you train caffe model by yourself? i means train and change to onnx.

XuHao9166 avatar Oct 15 '19 01:10 XuHao9166

Hi,in postProcess() function,you extract the score & rect infor from output data, but how to get the class label info if my model has multi class?

do you finish this problem?how to get the class label?

No,I still dont know how to get,now I'm using caffe version yolo caffe version yolo is good choose,but it hard to train model. i only use pytorch or darknet . how you train caffe model by yourself? i means train and change to onnx.

I train model using darknet,and then convert yolo to caffe,so the model can be accelerated by tensorrt;the convert script can be found on github

pango99 avatar Oct 15 '19 07:10 pango99

I solve it with

int max_index = -1; float max_value = FLT_MIN; for (int k = 5; k < CATEGORY + 5; k++) { if (ptr[k] > max_value) { max_value = ptr[k]; max_index = k - 5; } }

ghost avatar Apr 09 '20 07:04 ghost