-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mergeback 1.7.0 to develop #1538
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…notoolkit#1491) <!-- Contributing guide: https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md --> ### Summary Enabled support for 'Video' media type in the datumaro format to support annotations by video or video range. Note that the video has a closed interval of [start_frame, end_frame]. <!-- Resolves openvinotoolkit#111 and openvinotoolkit#222. Depends on openvinotoolkit#1000 (for series of dependent commits). This PR introduces this capability to make the project better in this and that. - Added this feature - Removed that feature - Fixed the problem openvinotoolkit#1234 --> ### How to test <!-- Describe the testing procedure for reviewers, if changes are not fully covered by unit tests or manual testing can be complicated. --> ### Checklist <!-- Put an 'x' in all the boxes that apply --> - [x] I have added unit tests to cover my changes. - [x] I have added integration tests to cover my changes. - [x] I have added the description of my changes into [CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md). - [x] I have updated the [documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs) accordingly ### License - [x] I submit _my code changes_ under the same [MIT License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. - [x] I have updated the license header for each file (see an example below). ```python # Copyright (C) 2024 Intel Corporation # # SPDX-License-Identifier: MIT ```
…oolkit#1501) ### Summary - Ticket no. 141409 - There was a significant performance degradation on `decode_by_pil()` if `ImageColorChannel.COLOR_BGR`. - Improve it by returning a numpy array rather than `PIL.Image` and using `cv2.cvtColor()` rather than `np.flip()`. ### How to test - `tests/unit/test_image.py` covers this change. - Compare performance with this code (dataset: Imagenette2) | before | after | | :-: | :-: | | ![image](https://github.com/openvinotoolkit/datumaro/assets/26541465/3fd115b0-26b3-4a71-b058-0153cea96b98) | ![image](https://github.com/openvinotoolkit/datumaro/assets/26541465/cb32adb6-cc70-4aef-9ab4-a47b862f1947) | | 00:51<00:00, 361.65it/s | 00:19<00:00, 859.39it/s | ### Checklist <!-- Put an 'x' in all the boxes that apply --> - [ ] I have added unit tests to cover my changes. - [ ] I have added integration tests to cover my changes. - [x] I have added the description of my changes into [CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md). - [ ] I have updated the [documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs) accordingly ### License - [x] I submit _my code changes_ under the same [MIT License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. - [x] I have updated the license header for each file (see an example below). ```python # Copyright (C) 2024 Intel Corporation # # SPDX-License-Identifier: MIT ``` --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
…ing use case (openvinotoolkit#1503) ### Summary - Ticket no. 141410 - Datumaro has been maintaining every mask as a binary mask representation. This is because of flexibility on manipulating dataset level management (e.g., label remapping). However, this design can bring performance degradation in case of model training use case. For example, semantic segmentation model training uses 2d mask filled in an integer value for each pixel. However, during importing a dataset, Datumaro should convert it to a collection of binary masks. It makes impossible to use the integer mask directly, so that it requires a 2d complexity computation cost to merge the imported binary masks into an integer mask. - To resolve this performance degradation, this PR introduces a new interface on `dataset_item.annotations` by introducing `Annotation(list[Annotation])` class. This class extends the pure Python list to equip more utility functions. At the same time, the utility function we introduce this time is `dataset_item.annotations.get_semantic_seg_mask()`. This function bypasses binary mask conversion to construct an integer mask used for semantic segmentation model training. ### How to test - Added unit tests to cover this change (mainly in `tests/unit/test_annotation.py`). - This is a performance test on the semantic segmentation model training use case. Throughput improvement on getting a semantic segmentation mask is ~3x (31.38 it/s -> 99.31 it/s). ![image](https://github.com/openvinotoolkit/datumaro/assets/26541465/df082285-6a67-4444-9331-63ec43b0a03b) ### Checklist <!-- Put an 'x' in all the boxes that apply --> - [x] I have added unit tests to cover my changes. - [ ] I have added integration tests to cover my changes. - [x] I have added the description of my changes into [CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md). - [ ] I have updated the [documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs) accordingly ### License - [x] I submit _my code changes_ under the same [MIT License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. - [x] I have updated the license header for each file (see an example below). ```python # Copyright (C) 2024 Intel Corporation # # SPDX-License-Identifier: MIT ``` --------- Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com>
…lkit#1507) <!-- Contributing guide: https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md --> ### Summary ![image](https://github.com/openvinotoolkit/datumaro/assets/89109581/dfaf5ac6-1876-4904-814e-21bf32c6f27e) about 25 times faster computation compared to previous RLE mask based area computation <!-- Resolves openvinotoolkit#111 and openvinotoolkit#222. Depends on openvinotoolkit#1000 (for series of dependent commits). This PR introduces this capability to make the project better in this and that. - Added this feature - Removed that feature - Fixed the problem openvinotoolkit#1234 --> ### How to test <!-- Describe the testing procedure for reviewers, if changes are not fully covered by unit tests or manual testing can be complicated. --> ### Checklist <!-- Put an 'x' in all the boxes that apply --> - [x] I have added unit tests to cover my changes. - [ ] I have added integration tests to cover my changes. - [x] I have added the description of my changes into [CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md). - [ ] I have updated the [documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs) accordingly ### License - [ ] I submit _my code changes_ under the same [MIT License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. - [ ] I have updated the license header for each file (see an example below). ```python # Copyright (C) 2024 Intel Corporation # # SPDX-License-Identifier: MIT ```
<!-- Contributing guide: https://github.com/openvinotoolkit/datumaro/blob/develop/CONTRIBUTING.md --> ### Summary For the 100K generation of Polygon annotations, the time consumption was 1.69 secs to 1.46 secs (about 15% faster). import_from | coco -- | -- before | 34.77 s after | 31.53 s ![image](https://github.com/openvinotoolkit/datumaro/assets/89109581/5c840092-f87d-458d-bc41-b2b3f015112c) ### How to test <!-- Describe the testing procedure for reviewers, if changes are not fully covered by unit tests or manual testing can be complicated. --> ### Checklist <!-- Put an 'x' in all the boxes that apply --> - [ ] I have added unit tests to cover my changes. - [ ] I have added integration tests to cover my changes. - [ ] I have added the description of my changes into [CHANGELOG](https://github.com/openvinotoolkit/datumaro/blob/develop/CHANGELOG.md). - [ ] I have updated the [documentation](https://github.com/openvinotoolkit/datumaro/tree/develop/docs) accordingly ### License - [ ] I submit _my code changes_ under the same [MIT License](https://github.com/openvinotoolkit/datumaro/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. - [ ] I have updated the license header for each file (see an example below). ```python # Copyright (C) 2024 Intel Corporation # # SPDX-License-Identifier: MIT ```
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1538 +/- ##
===========================================
+ Coverage 80.85% 81.06% +0.20%
===========================================
Files 271 276 +5
Lines 30689 32359 +1670
Branches 6197 6575 +378
===========================================
+ Hits 24815 26231 +1416
- Misses 4489 4684 +195
- Partials 1385 1444 +59
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
jihyeonyi
approved these changes
Jun 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
How to test
Checklist
License
Feel free to contact the maintainers if that's a concern.