mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge f03a844836 into daf26f9fc8
This commit is contained in:
commit
6fb1687834
@ -1 +1 @@
|
||||
Subproject commit 20f7259a471fe180ad64279a6970eb991537cffb
|
||||
Subproject commit a8b25eff3eea742b949012e512de7c69886e7794
|
||||
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user