maps-as-data / MapReader

A computer vision pipeline for exploring and analyzing images at scale
https://mapreader.readthedocs.io/en/latest/
Other
90 stars 11 forks source link

Fix for labels_map argument #490

Closed rwood-97 closed 2 months ago

rwood-97 commented 2 months ago

Summary

This was an oversight in #489 . When getting the label indices from labels i was using the list of unique labels, but since the most recent changes the ordering of this list no longer reflects the ordering of labels in the labels map.

Now instead, we create an inverse of the labels map and use this to find the label index.

Checklist before assigning a reviewer (update as needed)

Reviewer checklist

Please add anything you want reviewers to specifically focus/comment on.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 65.79%. Comparing base (7de87ef) to head (5c9fc6f). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #490 +/- ## ========================================== + Coverage 65.74% 65.79% +0.05% ========================================== Files 46 46 Lines 7467 7478 +11 ========================================== + Hits 4909 4920 +11 Misses 2558 2558 ``` | [Flag](https://app.codecov.io/gh/Living-with-machines/MapReader/pull/490/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Living-with-machines) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Living-with-machines/MapReader/pull/490/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Living-with-machines) | `65.79% <100.00%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Living-with-machines#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.