Update app.py
Browse files
app.py
CHANGED
@@ -63,9 +63,10 @@ def generate_proposals(stride, feat, prob_threshold, letterbox_cols, letterbox_r
|
|
63 |
class_score = float('-inf')
|
64 |
for s in range(cls_num):
|
65 |
score = feat[a * feat_w * feat_h * (cls_num + 5) + h * feat_w * (cls_num + 5) + w * (cls_num + 5) + s + 5]
|
66 |
-
if score > class_score:
|
|
|
67 |
class_index = s
|
68 |
-
class_score = score
|
69 |
box_score = feat[a * feat_w * feat_h * (cls_num + 5) + (h * feat_w) * (cls_num + 5) + w * (cls_num + 5) + 4]
|
70 |
final_score = sigmoid(box_score) * sigmoid(class_score)
|
71 |
if final_score >= prob_threshold:
|
|
|
63 |
class_score = float('-inf')
|
64 |
for s in range(cls_num):
|
65 |
score = feat[a * feat_w * feat_h * (cls_num + 5) + h * feat_w * (cls_num + 5) + w * (cls_num + 5) + s + 5]
|
66 |
+
# if score > class_score:
|
67 |
+
if np.max(score) > class_score:
|
68 |
class_index = s
|
69 |
+
class_score = np.max(score)
|
70 |
box_score = feat[a * feat_w * feat_h * (cls_num + 5) + (h * feat_w) * (cls_num + 5) + w * (cls_num + 5) + 4]
|
71 |
final_score = sigmoid(box_score) * sigmoid(class_score)
|
72 |
if final_score >= prob_threshold:
|