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

Add attributes in VOC format #1792

Merged
merged 6 commits into from
Jun 25, 2020
Merged

Add attributes in VOC format #1792

merged 6 commits into from
Jun 25, 2020

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Jun 23, 2020

Motivation and context

Closes #1518

Allows any values in pose object attribute.
Allows to read and write annotation attributes in attributes element of VOC XML annotations.

Exporting is enabled by default and can be disabled with --allow-attributes=False CLI option of Datumaro export.

How has this been tested?

Checklist

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) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@zhiltsov-max zhiltsov-max requested a review from azhavoro June 23, 2020 09:13
@coveralls
Copy link

coveralls commented Jun 23, 2020

Pull Request Test Coverage Report for Build 6157

  • 30 of 37 (81.08%) changed or added relevant lines in 3 files are covered.
  • 191 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.3%) to 65.141%

Changes Missing Coverage Covered Lines Changed/Added Lines %
datumaro/datumaro/plugins/voc_format/converter.py 14 15 93.33%
cvat/apps/dataset_manager/bindings.py 12 18 66.67%
Files with Coverage Reduction New Missed Lines %
datumaro/datumaro/plugins/voc_format/converter.py 1 89.24%
datumaro/datumaro/util/annotation_tools.py 1 97.92%
cvat/apps/engine/media_extractors.py 6 75.88%
src/annotations-collection.js 29 63.37%
src/annotations-objects.js 154 62.15%
Totals Coverage Status
Change from base Build 6062: -0.3%
Covered Lines: 11029
Relevant Lines: 16521

💛 - Coveralls

@azhavoro
Copy link
Contributor

@zhiltsov-max 1 issue is here:
the value of checkbox attribute is dumped as True/False and imported as is, so that cannot be handled by UI properly. However for the CVAT format, the lower case is used: https://github.com/opencv/cvat/blob/develop/datumaro/datumaro/plugins/cvat_format/converter.py#L284

@azhavoro azhavoro mentioned this pull request Jun 24, 2020
8 tasks
@zhiltsov-max zhiltsov-max changed the title Add attributes in VOC format [WIP] Add attributes in VOC format Jun 24, 2020
nmanovic
nmanovic previously approved these changes Jun 24, 2020
Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

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

LGTM

@nmanovic
Copy link
Contributor

@azhavoro , could you please look?

@zhiltsov-max zhiltsov-max changed the title [WIP] Add attributes in VOC format Add attributes in VOC format Jun 24, 2020
@zhiltsov-max
Copy link
Contributor Author

I don't know if we should fail or just log if there is an incorrect attribute value.

@azhavoro
Copy link
Contributor

@zhiltsov-max could you fix tests?

Copy link
Contributor

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- datumaro/datumaro/plugins/voc_format/converter.py  4
- datumaro/datumaro/plugins/voc_format/extractor.py  2
         

See the complete overview on Codacy

@zhiltsov-max
Copy link
Contributor Author

@azhavoro, done.

@nmanovic nmanovic merged commit 962f61f into develop Jun 25, 2020
@nmanovic nmanovic deleted the zm/voc-attributes branch June 25, 2020 14:04
frndmg pushed a commit to signatrix/cvat that referenced this pull request Aug 5, 2020
* Add voc attributes

* Allow any values for voc pose

* update changelog

* Add attribute conversion

* linter

* fix tests
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.

Pascal VOC 2012 dataset export does not export Attributes correctly
4 participants