提交 3a019897 编写于 作者: L lichenyang

[Updata] fix bug

上级 52850236
......@@ -33,11 +33,11 @@ yolo_box_diff_conf = [{'image_height': image_height, 'image_width': image_width,
'anchor_boxes_size': anchor_boxes_size_list, 'box_mask': [0, 1, 2]}]
# to confirm wh pos, gr 12.19 check with 11 ~/yolov3/predict.job
yolo_conf = [{'layer_height': 19, 'layer_width': 19, 'prob_thresh': 0.005, 'num_classes': 80,
yolo_conf = [{'layer_height': 19, 'layer_width': 19, 'prob_thresh': 0.00001, 'num_classes': 80,
'anchor_boxes_size': [116, 90, 156, 198, 373, 326]},
{'layer_height': 38, 'layer_width': 38, 'prob_thresh': 0.005, 'num_classes': 80,
{'layer_height': 38, 'layer_width': 38, 'prob_thresh': 0.00001, 'num_classes': 80,
'anchor_boxes_size': [30, 61, 62, 45, 59, 119]},
{'layer_height': 76, 'layer_width': 76, 'prob_thresh': 0.005, 'num_classes': 80,
{'layer_height': 76, 'layer_width': 76, 'prob_thresh': 0.00001, 'num_classes': 80,
'anchor_boxes_size': [10, 13, 16, 30, 33, 23]}]
......@@ -223,7 +223,8 @@ def YoloPredictLayer(in_blob, origin_image_info, i, trainable):
[out_bbox, out_probs, valid_num] = yolo_detect(bbox=position, probs=confidence, origin_image_info=origin_image_info,
image_height=608, image_width=608,
layer_height=yolo_conf[i]['layer_height'],
layer_width=yolo_conf[i]['layer_width'], prob_thresh=0.005,
layer_width=yolo_conf[i]['layer_width'],
prob_thresh=0.00001,
num_classes=80, max_out_boxes=max_out_boxes,
anchor_boxes=yolo_conf[i]['anchor_boxes_size'],
name=str(layer_name) + "yolo_detect")
......
......@@ -166,12 +166,13 @@ if __name__ == "__main__":
continue
# Best iou, index between pred and targets
m = (pcls == tcls_tensor)
m = np.nonzero(np.asarray(m))[0]
iou = utils.bboxes_iou(pbox, tbox[m])
bi = np.argmax(iou)
maxiou = iou[bi]
# If iou > threshold and class is correct mark as correct
if maxiou > args.iou_thres: # and pcls == tcls[bi]:
if maxiou > args.iou_thres and m[bi] not in detected: # and pcls == tcls[bi]:
correct[i] = 1
detected.append(m[bi])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册