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
502 stars 125 forks source link

Bugfix when end_frame is zero #1541

Closed jihyeonyi closed 3 weeks ago

jihyeonyi commented 3 weeks ago

Summary

Ticket Number: 144505 When video end_frame is zero, it was saved as None, not 0. Due to this, end_frame information was lost when exporting it.

How to test

  1. Make a video media with start_frame=0 and end_frame=0
    item = dm.DatasetItem(..., media=Video('video.mp4', start_frame=0, end_frame=0), ...)
  2. export the dataset as datumaro format
  3. check it the end_frame is described in the output json file ex.
    {
        "id": "video",
        ...,
        "video": {
            "path": "video.mp4",
            "step": 1,
            "start_frame": 0,
            "end_frame": 0
        }
    },

    Checklist

    • [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.​
    • [ ] I have updated the documentation accordingly

License

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

Codecov Report

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

Project coverage is 81.05%. Comparing base (63da2ff) to head (9b42bc4). Report is 4 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1541 +/- ## ======================================== Coverage 81.05% 81.05% ======================================== Files 276 276 Lines 32359 32359 Branches 6575 6575 ======================================== Hits 26230 26230 Misses 4684 4684 Partials 1445 1445 ``` | [Flag](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1541/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/1541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `81.05% <100.00%> (ø)` | | | [windows-2022_Python-3.10](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `81.03% <100.00%> (ø)` | | 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.