|
|
|
@@ -221,16 +221,17 @@ int Yolov3DetectionOutput::forward(const std::vector<Mat>& bottom_blobs, std::ve |
|
|
|
|
|
|
|
// find class index with max class score |
|
|
|
int class_index = 0; |
|
|
|
float class_score = 0.f; |
|
|
|
float class_score = -std::numeric_limits<float>::max(); |
|
|
|
for (int q = 0; q < num_class; q++) |
|
|
|
{ |
|
|
|
float score = sigmoid(scores.channel(q).row(i)[j]); |
|
|
|
float score = scores.channel(q).row(i)[j]; |
|
|
|
if (score > class_score) |
|
|
|
{ |
|
|
|
class_index = q; |
|
|
|
class_score = score; |
|
|
|
} |
|
|
|
} |
|
|
|
class_score = sigmoid(class_score); |
|
|
|
|
|
|
|
//printf( "%d %f %f\n", class_index, box_score, class_score); |
|
|
|
|
|
|
|
|