This commit is contained in:
Kwabena W Agyeman 2025-11-03 07:07:25 +00:00 committed by GitHub
commit 6fb1687834
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 8 deletions

@ -1 +1 @@
Subproject commit 20f7259a471fe180ad64279a6970eb991537cffb
Subproject commit a8b25eff3eea742b949012e512de7c69886e7794

View File

@ -38,10 +38,6 @@ def sigmoid(x):
return 1.0 / (1.0 + np.exp(-x))
def mod(a, b):
return a - (b * (a // b))
def threshold(scores, threshold, scale, find_max=False, find_max_axis=1):
if scale > 0:
if find_max:

View File

@ -85,8 +85,8 @@ class YoloV2:
# Extract rows, columns, and anchor indices
bb_rows = score_indices // (ow * self.anchors_len)
bb_cols = mod(score_indices // self.anchors_len, ow)
bb_anchors = mod(score_indices, self.anchors_len)
bb_cols = (score_indices // self.anchors_len) % ow
bb_anchors = score_indices % self.anchors_len
# Get the anchor box information
bb_a_array = np.take(self.anchors, bb_anchors, axis=0)

View File

@ -64,7 +64,7 @@ class Fomo:
# Extract rows and columns
bb_rows = score_indices // ow
bb_cols = mod(score_indices, ow)
bb_cols = score_indices % ow
# Get the score information
bb_scores = np.max(bb[:, _FOMO_CLASSES:], axis=1)