Helper functions for evaluation operations.

box_area[source]

box_area(box)

Calculates the area of a bounding box. Source code mainly taken from: https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/ box: the bounding box to calculate the area for with the format ((x_min, x_max), (y_min, y_max)) return: the bounding box area

intersection_box[source]

intersection_box(box_a, box_b)

Calculates the intersection box from two bounding boxes with the format ((x_min, x_max), (y_min, y_max)). Source code mainly taken from: https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/ box_a: the first box box_b: the second box return: the intersection box

union_box[source]

union_box(box_a, box_b)

Calculates the union box from two bounding boxes with the format ((x_min, x_max), (y_min, y_max)). Source code mainly taken from: https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/ box_a: the first box box_b: the second box return: the union box

intersection_over_union[source]

intersection_over_union(box_a, box_b)

Intersection over Union (IoU) algorithm. Calculates the IoU from two bounding boxes with the format ((x_min, x_max), (y_min, y_max)). Source code mainly taken from: https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/ box_a: the first box box_b: the second box return: the IoU

Helper Methods

configure_logging[source]

configure_logging(logging_level=20)

Configures logging for the system.

:param logging_level: The logging level to use.

Run from command line

To run the data-set builder from command line, use the following command: python -m mlcore.evaluation.core [parameters]

The following parameters are supported:

  • [annotation]: The path to the VIA annotation file (e.g.: imagesets/segmentation/car_damage/via_region_data.json)