Fixed preparation of predictions for evaluate

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-09-16 13:17:31 +02:00
parent d24c622d86
commit 48ee5466fb

View File

@ -104,11 +104,11 @@ def prepare_predictions(predictions: Sequence[Sequence[Sequence[Union[int, float
# Round the box coordinates to reduce the required memory. # Round the box coordinates to reduce the required memory.
confidence = box[1] confidence = box[1]
xmin = round(box[xmin]) xmin_value = round(box[xmin])
ymin = round(box[ymin]) ymin_value = round(box[ymin])
xmax = round(box[xmax]) xmax_value = round(box[xmax])
ymax = round(box[ymax]) ymax_value = round(box[ymax])
prediction = (image_id, confidence, xmin, ymin, xmax, ymax) prediction = (image_id, confidence, xmin_value, ymin_value, xmax_value, ymax_value)
# Append the predicted box to the results list for its class. # Append the predicted box to the results list for its class.
results[class_id].append(prediction) results[class_id].append(prediction)