From 48ee5466fb70cf9588f6bc3fb23e1b0d61637665 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 16 Sep 2019 13:17:31 +0200 Subject: [PATCH] Fixed preparation of predictions for evaluate Signed-off-by: Jim Martens --- src/twomartens/masterthesis/evaluate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/twomartens/masterthesis/evaluate.py b/src/twomartens/masterthesis/evaluate.py index 6308d54..a4fbd31 100644 --- a/src/twomartens/masterthesis/evaluate.py +++ b/src/twomartens/masterthesis/evaluate.py @@ -104,11 +104,11 @@ def prepare_predictions(predictions: Sequence[Sequence[Sequence[Union[int, float # Round the box coordinates to reduce the required memory. confidence = box[1] - xmin = round(box[xmin]) - ymin = round(box[ymin]) - xmax = round(box[xmax]) - ymax = round(box[ymax]) - prediction = (image_id, confidence, xmin, ymin, xmax, ymax) + xmin_value = round(box[xmin]) + ymin_value = round(box[ymin]) + xmax_value = round(box[xmax]) + ymax_value = round(box[ymax]) + prediction = (image_id, confidence, xmin_value, ymin_value, xmax_value, ymax_value) # Append the predicted box to the results list for its class. results[class_id].append(prediction)