Skip to content
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

Fix ambiguous coco format detector #1442

Merged
merged 7 commits into from
Apr 17, 2024

Conversation

wonjuleee
Copy link
Contributor

@wonjuleee wonjuleee commented Apr 16, 2024

Summary

Before, all the coco datasets such as panoptic, stuff, caption are detected as just coco.
With this PR, a specific coco task is detected.
For instance,

formats = dm.Environment().detect_dataset(path="./tests/assets/coco_dataset/coco_instances")

returns coco_instances.

If the dataset directory contains multiple task types of COCO, it looks like

formats = dm.Environment().detect_dataset(path="./tests/assets/coco_dataset/coco")

returns coco.

So we can choose one task for importing operation.
We here remain the original coco to import all annotation files like below.
image

note. Previously, our coco importer can load any annotation filename like {unknowntask}_{subsetname}, but with this PR, it is restricted to import {instances,panoptic,caption,labels,...}_{subsetname}.

How to test

Checklist

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

License

  • I submit my code changes under the same MIT 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).
# Copyright (C) 2024 Intel Corporation
#
# SPDX-License-Identifier: MIT

@wonjuleee wonjuleee requested review from a team as code owners April 16, 2024 03:41
@wonjuleee wonjuleee requested review from sooahleex and removed request for a team April 16, 2024 03:41
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.98%. Comparing base (44cc56a) to head (dcf43df).
Report is 31 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1442      +/-   ##
===========================================
+ Coverage    80.85%   80.98%   +0.12%     
===========================================
  Files          271      272       +1     
  Lines        30689    31144     +455     
  Branches      6197     6276      +79     
===========================================
+ Hits         24815    25223     +408     
- Misses        4489     4505      +16     
- Partials      1385     1416      +31     
Flag Coverage Δ
ubuntu-20.04_Python-3.10 80.96% <100.00%> (+0.12%) ⬆️
windows-2022_Python-3.10 80.96% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sooahleex sooahleex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@wonjuleee wonjuleee merged commit 7530ab4 into openvinotoolkit:develop Apr 17, 2024
8 checks passed
@wonjuleee wonjuleee added this to the 1.7.0 milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants