object-detection-metrics icon indicating copy to clipboard operation
object-detection-metrics copied to clipboard

`match_preds_to_targets` does not work when image contains a single object

Open willyd opened this issue 3 years ago • 0 comments

First, thanks for this nice package.

Current code in match_preds_to_targets returns a pd.Series instead of a pd.DataFrame at lines 60-61.

https://github.com/alexhock/object-detection-metrics/blob/main/objdetecteval/metrics/image_metrics.py#L60-L61

The code needs to be changed to this

preds = preds_df_indexed.loc[[image_name]]
labels = labels_df_indexed.loc[[image_name]]

For it to always return a pd.DataFrame.

willyd avatar Jan 26 '22 20:01 willyd