Skip to content

Commit 9ed37c4

Browse files
Fix pseudo-label processing for labels.
The labels from the pseudo-label output are now flattened and converted to a list, ensuring compatibility with the tfrecord feature conversion. PiperOrigin-RevId: 878612194
1 parent 9aa98a3 commit 9ed37c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

official/vision/evaluation/coco_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ def convert_groundtruths_to_coco_dataset(groundtruths, label_map=None):
219219
Returns:
220220
coco_groundtruths: the ground-truth dataset in COCO format.
221221
"""
222-
source_ids = np.concatenate(groundtruths['source_id'], axis=0)
223-
heights = np.concatenate(groundtruths['height'], axis=0)
224-
widths = np.concatenate(groundtruths['width'], axis=0)
222+
source_ids = np.concatenate(groundtruths['source_id'], axis=0).reshape(-1)
223+
heights = np.concatenate(groundtruths['height'], axis=0).reshape(-1)
224+
widths = np.concatenate(groundtruths['width'], axis=0).reshape(-1)
225225
gt_images = [{'id': int(i), 'height': int(h), 'width': int(w)} for i, h, w
226226
in zip(source_ids, heights, widths)]
227227

0 commit comments

Comments
 (0)