|
@@ -100,8 +100,8 @@ def detect_watermark(results, watermark_box, threshold=0.5):
|
|
|
# 解析输出结果
|
|
|
if len(results[0]) == 0:
|
|
|
return False
|
|
|
- top_label = np.array(results[0][:, 4], dtype='int32')
|
|
|
- top_conf = results[0][:, 5]
|
|
|
+ top_label = np.array(results[0][:, 5], dtype='int32')
|
|
|
+ top_conf = results[0][:, 4]
|
|
|
top_boxes = results[0][:, :4]
|
|
|
for box, score, cls in zip(top_boxes, top_conf, top_label):
|
|
|
wm_box_coords = watermark_box[:4]
|