cheind / py-motmetrics

:bar_chart: Benchmark multiple object trackers (MOT) in Python
MIT License
1.36k stars 258 forks source link

A BUG caused by pandas.Index.map #179

Open zhaozp15 opened 11 months ago

zhaozp15 commented 11 months ago

In MOTAccumulator.merge_event_dataframes (Line 443), we use copy.index.map to update index. When copy is an empty DataFrame, the size of copy.index is 0. In this situation, copy.index.map will return an object of type Index rather than MultiIndex.

We can fix it by adding if copy.index.size != 0 before copy.index.map