enazoe / yolo-tensorrt

TensorRT8.Support Yolov5n,s,m,l,x .darknet -> tensorrt. Yolov4 Yolov3 use raw darknet *.weights and *.cfg fils. If the wrapper is useful to you,please Star it.
MIT License
1.19k stars 314 forks source link

m_ClassNames contains 240 elements #20

Closed Nuzhny007 closed 4 years ago

Nuzhny007 commented 4 years ago

Here: https://github.com/enazoe/yolo-tensorrt/blob/master/modules/yolo.cpp#L666 This loop calls 3 times and m_ClassNames containts 240 elements: 0, 1, 2, ..., 79, 0, 1, 2, ..., 79, 0, 1, 2, ..., 79 I advance add condition:

if (m_ClassNames.empty())
{
            for (int i=0;i< outputTensor.numClasses;++i)
            {
                m_ClassNames.push_back(std::to_string(i));
            }
}
enazoe commented 4 years ago

@Nuzhny007 yeah,welcome PR :)

Nuzhny007 commented 4 years ago

Here: https://github.com/enazoe/yolo-tensorrt/pull/21