Skip to content

Commit

Permalink
bug fix: 修复contrib中的det模型后处理在遇到没有检测框的图时导致同batch中接下来的图片结果全部为空的bug (#2378)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinZhu committed Feb 27, 2024
1 parent cfd80e9 commit 1314f32
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool YOLOv5Postprocessor::Run(const std::vector<FDTensor>& tensors, std::vector<
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}

utils::NMS(&((*results)[bs]), nms_threshold_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool YOLOv5SegPostprocessor::Run(
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}
// get box index after nms
std::vector<int> index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool YOLOv7Postprocessor::Run(const std::vector<FDTensor>& tensors, std::vector<
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}

utils::NMS(&((*results)[bs]), nms_threshold_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ bool YOLOv8Postprocessor::Run(
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}

utils::NMS(&((*results)[bs]), nms_threshold_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bool CenterFacePostprocessor::Run(const std::vector<FDTensor>& infer_result,
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}

utils::NMS(&((*results)[bs]), nms_threshold_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool Yolov7FacePostprocessor::Run(const std::vector<FDTensor>& infer_result,
}

if ((*results)[bs].boxes.size() == 0) {
return true;
continue;
}

utils::NMS(&((*results)[bs]), nms_threshold_);
Expand Down

0 comments on commit 1314f32

Please sign in to comment.