Beispiel #1
0
    except:
        continue

    classifications_per_box = [0 for _ in range(len(boxes))]

    image_detection = np.copy(image)

    ###Preprocessing of whole image
    for step in detection_pipeline:
        func = step["function"]
        func = globals()[func]
        kwargs = step["kwargs"]

        image_detection = func(image_detection, **kwargs)

    boxs = reader.detect(image_detection)

    image_res = np.copy(image_detection)

    resultsText += file + "\n"

    results_json = {"filename": file, "boxes": []}

    fps = 0
    tps = 0
    fns = 0
    ccs = 0

    empty = np.zeros_like(image_res)

    for i, box in enumerate(boxs[0]):
    gt_count += len(boxes)
    classifications_per_box = [0 for _ in range(len(boxes))]

    image_detection = np.copy(image)

    for step in detection_pipeline:
        func = step["function"]
        func = globals()[func]
        kwargs = step["kwargs"]

        image_detection = func(image_detection, **kwargs)

    image_detection = image_detection.astype('uint8')

    boxes_detected = reader.detect(image_detection)

    image_res = np.copy(image_detection)

    resultsText += file + "\n"

    results_json = {"filename": file, "boxes": []}

    fps = 0
    tps = 0
    fns = 0
    ccs = 0

    empty = np.zeros_like(image_res)

    IoU_threshold = 0.5