kitcar_ml.utils.evaluation.test package

Submodules

kitcar_ml.utils.evaluation.test.basic_utility module

Functions:

lcm(a, b)

Calculate the least common multiple of two numbers.

create_bounding_boxes([accuracy, ...])

Create bounding boxes for detections and the groundtruth.

create_bounding_boxes_by_amount([accuracy, ...])

Create bounding boxes for detections and the groundtruth.

lcm(a, b)[source]

Calculate the least common multiple of two numbers.

create_bounding_boxes(accuracy=0.5, num_images=10, num_classes=1, max_boxes=1000, confidence=0.5)[source]

Create bounding boxes for detections and the groundtruth.

Parameters
  • accuracy – The accuracy of the detections.

  • num_images – The number of images.

  • num_classes – The number of classes.

  • max_boxes – The maximal number of bounding boxes.

  • confidence – The confidence of inaccurate bounding boxes.

Returns

The list of groundtruth and detection bounding boxes per image and the resulting accuracy of the bounding boxes, because it can happen that crocked accurcay get rounded a bit.

create_bounding_boxes_by_amount(accuracy=0.5, num_images=10, num_classes=1, num_boxes=100, confidence=0.5)[source]

Create bounding boxes for detections and the groundtruth.

Parameters
  • accuracy – The accuracy of the detections.

  • num_images – The number of images.

  • num_classes – The number of classes.

  • num_boxes – The number of bounding boxes.

  • confidence – The confidence of inaccurate bounding boxes.

Returns

The list of groundtruth and detection bounding boxes per image and the resulting accuracy of the bounding boxes, because it can happen that crocked accurcay get rounded a bit.

kitcar_ml.utils.evaluation.test.model_mock module

Functions:

get_shift_scale([error])

Shift and scale the bounding box that the overlap is not 100% anymore.

modify_bounding_box(bb, error, accuracy, ...)

predict_with_overlap(image, gt_bbs[, ...])

Simulate a prediction of a model, the bounding box is defined with 2 points: min, max.

get_shift_scale(error: float = 0.5) Tuple[Tuple[float, float], Tuple[float, float]][source]

Shift and scale the bounding box that the overlap is not 100% anymore.

modify_bounding_box(bb, error, accuracy, shift, scale)[source]
predict_with_overlap(image, gt_bbs: List[BoundingBox], accuracy: float = 0.5, additional_labels: int = 0, error: float = 0.5) List[BoundingBox][source]

Simulate a prediction of a model, the bounding box is defined with 2 points: min, max. bb=[xmin, ymin, xmax, ymax]

Parameters
  • image – The input image as a tensor

  • gt_bbs – The list of groundtruth bounding boxes.

  • accuracy – the accuracy of the model

  • additional_labels – Bounding boxes that are added to the detections.

  • error – The probability of the error every bounding box

Returns

the list of found bounding boxes with labels according to the accuracy

kitcar_ml.utils.evaluation.test.test_interpolation_evaluator module

Functions:

test_m_ap()

test_edge_cases(evaluator)

main()

test_m_ap() None[source]
test_edge_cases(evaluator: InterpolationEvaluator)[source]
main()[source]

kitcar_ml.utils.evaluation.test.test_simple_evaluator module

Functions:

test_precision()

test_recall()

test_m_ap()

test_edge_cases()

main()

test_precision()[source]
test_recall()[source]
test_m_ap()[source]
test_edge_cases()[source]
main()[source]

Module contents