openvinotoolkit / datumaro

Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
https://openvinotoolkit.github.io/datumaro/
MIT License
551 stars 135 forks source link

Improve get_area() for polygons through Shoelace formula #1507

Closed wonjuleee closed 6 months ago

wonjuleee commented 6 months ago

Summary

image

about 25 times faster computation compared to previous RLE mask based area computation

How to test

Checklist

License

# Copyright (C) 2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes are missing coverage. Please review.

Please upload report for BASE (releases/1.7.0@232eea5). Learn more about missing BASE report.

Files Patch % Lines
src/datumaro/components/annotation.py 84.61% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## releases/1.7.0 #1507 +/- ## ================================================= Coverage ? 80.77% ================================================= Files ? 275 Lines ? 31514 Branches ? 6358 ================================================= Hits ? 25456 Misses ? 4644 Partials ? 1414 ``` | [Flag](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1507/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | Coverage Δ | | |---|---|---| | [ubuntu-20.04_Python-3.10](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `80.76% <84.61%> (?)` | | | [windows-2022_Python-3.10](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `80.75% <84.61%> (?)` | | 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=openvinotoolkit#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.