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

Change common semantic segmentation dataset detection rule #1572

Closed itrushkin closed 3 months ago

itrushkin commented 4 months ago

Since Datumaro 1.8, the following folder structure:

# Common semantic segmentation dataset example from OTX tests
.
└── supervised
    ├── test
    │   ├── dataset_meta.json
    │   ├── images
    │   │   ├── 0001.png
    │   │   └── 0002.png
    │   └── masks
    │       ├── 0001.png
    │       └── 0002.png
    ├── train
    │   ├── dataset_meta.json
    │   ├── images
    │   │   ├── 0001.png
    │   │   ├── 0002.png
    │   │   └── 0003.png
    │   └── masks
    │       ├── 0001.png
    │       ├── 0002.png
    │       └── 0003.png
    └── val
        ├── dataset_meta.json
        ├── images
        │   ├── 0001.png
        │   └── 0002.png
        └── masks
            ├── 0001.png
            └── 0002.png

is detected as both common_semantic_segmentation and common_semantic_segmentation_with_subset_dirs. Since they are detected at different levels, the current implementation could not set the higher priority to the second one.

This PR updates detection rules for the common_semantic_segmentation format, searching for requirements in the root directory only.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.04%. Comparing base (be7f526) to head (10cd400). Report is 18 commits behind head on develop.

Files Patch % Lines
...ugins/data_formats/common_semantic_segmentation.py 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1572 +/- ## =========================================== - Coverage 81.04% 81.04% -0.01% =========================================== Files 278 278 Lines 32489 32490 +1 Branches 6600 6600 =========================================== Hits 26330 26330 Misses 4706 4706 - Partials 1453 1454 +1 ``` | [Flag](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1572/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/1572/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `81.02% <85.71%> (-0.01%)` | :arrow_down: | | [windows-2022_Python-3.10](https://app.codecov.io/gh/openvinotoolkit/datumaro/pull/1572/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openvinotoolkit) | `81.01% <85.71%> (-0.01%)` | :arrow_down: | 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.