Skip to content

Commit

Permalink
Fix output layer index
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhny007 committed Oct 2, 2024
1 parent b3bcfb3 commit 87682db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Detector/tensorrt_yolo/YoloONNXv11_instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class YOLOv11_instance_onnx : public YoloONNX
const float fw = static_cast<float>(frameSize.width) / static_cast<float>(m_inputDims.d[3]);
const float fh = static_cast<float>(frameSize.height) / static_cast<float>(m_inputDims.d[2]);

size_t outInd = (outputs.size() == 0) ? 0 : 1;
size_t segInd = (outputs.size() == 0) ? 1 : 0;
size_t outInd = (outputs.size() == 0) ? 1 : 0;
size_t segInd = (outputs.size() == 0) ? 0 : 1;

auto output = outputs[0];

Expand All @@ -39,8 +39,8 @@ class YOLOv11_instance_onnx : public YoloONNX
//std::cout << ";" << std::endl;

//0: name: images, size: 1x3x640x640
//1: name: output1, size: 1x32x160x160
//2: name: output0, size: 1x116x8400
//1: name: output0, size: 1x116x8400
//2: name: output1, size: 1x32x160x160
// 25200 = 3x80x80 + 3x40x40 + 3x20x20
// 116 = x, y, w, h, 80 classes, 32 seg ancors
// 80 * 8 = 640, 40 * 16 = 640, 20 * 32 = 640
Expand Down

0 comments on commit 87682db

Please sign in to comment.