user3002166
user3002166

Reputation: 730

**Datumaro** Dataset filtering out empty annotations

I have exported a custom dataset from cvat in datumaro format, but the exporter also includes frames that did not get any annotations (empty annotation []) despite frame being selected as out of view.

(On a side note, the first and last frames marked the same way get excluded correctly, and I stumbled upon an old bug on cvat github page).

Someone there suggested trying:

datum project export -e '/item/annotation' --filter-mode 'i+a' -f <your_target_format> -- --save-images.

I try to run it inside my annotation root directory but I get

datumaro.components.errors.ProjectNotFoundError: Can't find project at '.'

Makes sense, because it is just an annotation, not a project. Trying to take inspiration from that, I try to do just the filtering without a project:

datum filter -m 'i+a' -e '/item/annotation'

but it produces similar error:

2024-12-02 14:57:31,390 ERROR: Failed to parse revspec:
Can't find project at 'Failed to find project at 'project'. Specify project path with '-p/--project' or in the target pathspec.'
Path project doesn't exist

However, I can do conversion between formats with \

datum convert -if datumaro -f cvat -o 'testexport'

or even

datum convert -if datumaro -f cvat -o 'testexport' -e /item/annotation --filter-mode a+i

with filter inside it, but I can't do convert with same input as output format, which makes me think there must be some small thing I am missing.

Does anyone have the experience with filtering datasets in datumaro?

Upvotes: 0

Views: 57

Answers (0)

Related Questions