Fix ambiguous coco format detector #1442
Merged
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
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,
returns
coco_instances
.If the dataset directory contains multiple task types of COCO, it looks like
returns
coco
.So we can choose one task for importing operation.
![image](https://private-user-images.githubusercontent.com/89109581/322694399-9761b244-de21-4d6c-8f6e-76dcfda2bb96.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3Njk5ODksIm5iZiI6MTczOTc2OTY4OSwicGF0aCI6Ii84OTEwOTU4MS8zMjI2OTQzOTktOTc2MWIyNDQtZGUyMS00ZDZjLThmNmUtNzZkY2ZkYTJiYjk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA1MjEyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJiOWFlZWM1YmEzYzcxNjM3YjVhYzZmZDliM2YwYTdjNDIzODBiZTY4MWQxZjQ0YmNjYmE2MzM5MjZkMjE3MWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZUG_HhF4zIQwk-_P8TLePqIjhCZA5HY7L80tSIcp000)
We here remain the original
coco
to import all annotation files like below.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
License
Feel free to contact the maintainers if that's a concern.