Skip to content

Commit

Permalink
fixes: pascal_voc_detection_metrics gives very low scores for first c…
Browse files Browse the repository at this point in the history
…ategory in label_map

Only add 1 if there is at least one element greater than 0 per row
  • Loading branch information
DEV4INO committed Sep 9, 2023
1 parent 846f356 commit 8f66f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion research/object_detection/model_lib_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def prepare_eval_dict(detections, groundtruth, features):
else:
groundtruth_classes_one_hot = groundtruth[
fields.InputDataFields.groundtruth_classes]
label_id_offset = 1 # Applying label id offset (b/63711816)
label_id_offset = np.any(array, axis=2) # Applying label id offset (b/63711816)
groundtruth_classes = (
tf.argmax(groundtruth_classes_one_hot, axis=2) + label_id_offset)
groundtruth[fields.InputDataFields.groundtruth_classes] = groundtruth_classes
Expand Down

0 comments on commit 8f66f95

Please sign in to comment.