コード例 #1
0
    remap_lut = np.zeros((maxkey + 100), dtype=np.int32)
    remap_lut[list(class_remap.keys())] = list(class_remap.values())
    # print(remap_lut)

    # create evaluator
    ignore = []
    for cl, ign in class_ignore.items():
        if ign:
            x_cl = int(cl)
            ignore.append(x_cl)
            print("Ignoring xentropy class ", x_cl, " in IoU evaluation")

    # create evaluator
    if FLAGS.backend == "torch":
        from auxiliary.torch_ioueval import iouEval
        evaluator = iouEval(nr_classes, ignore)
    if FLAGS.backend == "numpy":
        from auxiliary.np_ioueval import iouEval
        evaluator = iouEval(nr_classes, ignore)
    else:
        print("Backend for evaluator should be one of ", str(backends))
        quit()
    evaluator.reset()

    # get test set
    test_sequences = DATA["split"][FLAGS.split]

    # get label paths
    label_names = []
    for sequence in test_sequences:
        sequence = '{0:02d}'.format(int(sequence))
コード例 #2
0
  # print(remap_lut)

  # create evaluator
  ignore = []
  for cl, ign in class_ignore.items():
    if ign:
      x_cl = int(cl)
      ignore.append(x_cl)
      print("Ignoring xentropy class ", x_cl, " in IoU evaluation")

  # create evaluator
  evaluators = []
  for i in range(len(DISTANCES)):
    if FLAGS.backend == "torch":
      from auxiliary.torch_ioueval import iouEval
      evaluators.append(iouEval(nr_classes, ignore))
      evaluators[i].reset()
    elif FLAGS.backend == "numpy":
      from auxiliary.np_ioueval import iouEval
      evaluators.append(iouEval(nr_classes, ignore))
      evaluators[i].reset()
    else:
      print("Backend for evaluator should be one of ", str(backends))
      quit()

  # get test set
  test_sequences = DATA["split"][FLAGS.split]

  # get scan paths
  scan_names = []
  for sequence in test_sequences: