Skip to content

Commit

Permalink
fix(custom plugin): Resolved duplicate oriented bounding boxes in Rot…
Browse files Browse the repository at this point in the history
…atedNMS plugin under FP16 precision (#71)
  • Loading branch information
laugh12321 committed Dec 18, 2024
1 parent bd3cbda commit 6dba684
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 382 deletions.
12 changes: 1 addition & 11 deletions plugin/efficientRotatedNMSPlugin/efficientRotatedNMSInference.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,7 @@ __device__ float IOU(EfficientRotatedNMSParameters param, RotatedBoxCorner<T> bo
RotatedBoxCorner<T> b2 = box2;
b1.reorder();
b2.reorder();
float intersectArea = RotatedBoxCorner<T>::intersect_area(b1, b2);
if (intersectArea <= 0.f)
{
return 0.f;
}
float unionArea = b1.area() + b2.area() - intersectArea;
if (unionArea <= 0.f)
{
return 0.f;
}
return intersectArea / unionArea;
return RotatedBoxCorner<T>::probiou(b1, b2);
}

template <typename T, typename Tb>
Expand Down
Loading

0 comments on commit 6dba684

Please sign in to comment.