2e83e8ab104ae707d89f2fa86f056fc71ed74ffa,chainercv/evaluations/eval_detection_voc.py,,eval_detection_voc,#,7

Before Change


                gt_bboxes_cls = np.stack(gt_bboxes_cls)
            else:
                gt_bboxes_cls = np.zeros((0, 4))
            if len(gt_difficults_cls) > 0:
                gt_difficults_cls = np.stack(gt_difficults_cls)
            else:
                gt_difficults_cls = np.zeros((0,), dtype=np.bool)
            gt_bboxes_list[cls][i] = gt_bboxes_cls
            gt_difficults_list[cls][i] = gt_difficults_cls
            if len(gt_bboxes_cls) > 0:
                valid_cls[cls] = True

    // Accumulate recacall, precison and ap

After Change


    gt_bboxes_list = [[np.zeros((0, 4)) for _ in six.moves.range(n_img)]
                      for _ in six.moves.range(n_class)]
    gt_difficults_list =\
        [[np.zeros((0,), dtype=np.bool) for _ in six.moves.range(n_img)]
         for _ in six.moves.range(n_class)]
    for i in six.moves.range(n_img):
        for cls in six.moves.range(n_class):
            gt_bboxes_cls = []
            gt_difficults_cls = []
            for j in six.moves.range(gt_bboxes[i].shape[0]):
                if cls == gt_labels[i][j]:
                    gt_bboxes_cls.append(gt_bboxes[i][j])
                    if gt_difficults is not None:
                        gt_difficults_cls.append(gt_difficults[i][j])
                    else:
                        gt_difficults_cls.append(
                            np.array(False, dtype=np.bool))
            if len(gt_bboxes_cls) > 0:
                gt_bboxes_list[cls][i] = np.stack(gt_bboxes_cls)
                gt_difficults_list[cls][i] = np.stack(gt_difficults_cls)
                valid_cls[cls] = True

    // Accumulate recacall, precison and ap
    results = {}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: chainer/chainercv
Commit Name: 2e83e8ab104ae707d89f2fa86f056fc71ed74ffa
Time: 2017-05-17
Author: yuyuniitani@gmail.com
File Name: chainercv/evaluations/eval_detection_voc.py
Class Name:
Method Name: eval_detection_voc


Project Name: chainer/chainercv
Commit Name: 2e83e8ab104ae707d89f2fa86f056fc71ed74ffa
Time: 2017-05-17
Author: yuyuniitani@gmail.com
File Name: chainercv/evaluations/eval_detection_voc.py
Class Name:
Method Name: eval_detection_voc