Skip to content

Commit

Permalink
fix: remove unintended bounding boxes with zero value
Browse files Browse the repository at this point in the history
Signed-off-by: Manato HIRABAYASHI <manato.hirabayashi@tier4.jp>
  • Loading branch information
manato committed Jun 27, 2023
1 parent ed325ef commit c5ff69e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perception/tensorrt_yolox/src/tensorrt_yolox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ bool TrtYoloX::feedforward(const std::vector<cv::Mat> & images, ObjectArrays & o
objects.clear();
for (size_t i = 0; i < batch_size; ++i) {
const size_t num_detection = static_cast<size_t>(out_num_detections[i]);
ObjectArray object_array(num_detection);
ObjectArray object_array;
object_array.reserve(num_detection);
for (size_t j = 0; j < num_detection; ++j) {
Object object{};
const auto x1 = out_boxes[i * max_detections_ * 4 + j * 4] / scales_[i];
Expand Down

0 comments on commit c5ff69e

Please sign in to comment.