Skip to content

Commit ad1c25e

Browse files
committed
small optimization
1 parent 5cfc06f commit ad1c25e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/valor_lite/semantic_segmentation/evaluator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def generate_meta(
111111
"datum_id",
112112
"gt_label_id",
113113
"pd_label_id",
114-
"count",
115114
)
116115
ids = np.column_stack(
117116
[tbl[col].to_numpy() for col in columns]
@@ -136,8 +135,8 @@ def generate_meta(
136135

137136
# get pd labels
138137
pd_label_ids = ids[:, 2]
139-
pd_label_ids, pd_indices, pd_counts = np.unique(
140-
pd_label_ids, return_index=True, return_counts=True
138+
pd_label_ids, pd_indices = np.unique(
139+
pd_label_ids, return_index=True
141140
)
142141
pd_labels = tbl["pd_label"].take(pd_indices).to_pylist()
143142
pd_labels = dict(zip(pd_label_ids.astype(int).tolist(), pd_labels))

0 commit comments

Comments
 (0)