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

[Datumaro] VOC export does not export annotations #942

Closed
efcy opened this issue Dec 12, 2019 · 8 comments · Fixed by #957
Closed

[Datumaro] VOC export does not export annotations #942

efcy opened this issue Dec 12, 2019 · 8 comments · Fixed by #957
Assignees
Labels
bug Something isn't working
Milestone

Comments

@efcy
Copy link
Contributor

efcy commented Dec 12, 2019

Dumping the annotations as Pascal VOC Zip results in a zip file with xml files that look like that:

<annotation>
    <folder></folder>
    <filename>888.jpg</filename>
    <path></path>
    <source>
        <database>Unknown</database>
    </source>
    <size>
        <width>1920</width>
        <height>1080</height>
        <depth>3</depth>
    </size>
    <segmented>0</segmented>
    <object>
        <name>Blub</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>1484.83984375</xmin>
            <ymin>496.052734375</ymin>
            <xmax>1510.2798442840576</xmax>
            <ymax>518.972734451294</ymax>
        </bndbox>
    </object>
</annotation>

Exporting the dataset as pascal voc results in xml files that look like:

<annotation>
  <folder></folder>
  <filename>0.jpg</filename>
  <size>
    <width>1920</width>
    <height>1080</height>
    <depth>3</depth>
  </size>
</annotation>

I tested it on a task containing a single image with one bounding box as annotation.

Tested on Commit: 310ee37

I am grateful for any help regarding this problem.

@nmanovic nmanovic added the bug Something isn't working label Dec 12, 2019
@nmanovic nmanovic added this to the 1.0.0 - Beta milestone Dec 12, 2019
@nmanovic nmanovic added this to To do in Dataset framework (Datumaro) via automation Dec 12, 2019
@zhiltsov-max
Copy link
Contributor

I suppose the issue with empty annotations is that Blub is not a VOC label, so it was skipped. What would be the expected output? The same as in annotations export?

@efcy
Copy link
Contributor Author

efcy commented Dec 13, 2019

@zhiltsov-max i tested again with a VOC label. I simply created a new task with one image and one label. This time I used the Person label without any additional annotations. But the same problem persists.

I expected the output of the dataset export to have the same annotations as the dump annotation feature exports.

My current workaround is to export the data and folder structure via dataset export and then dump the annotations and rename them accordingly.

@zhiltsov-max
Copy link
Contributor

For the current label list check this file, labels are tested for exact match. Could you describe your use case for the modified label set? It would be great to make the export more useful.

@efcy
Copy link
Contributor Author

efcy commented Dec 13, 2019

Thanks. It works for me as expected when use the lower case voc labels.

My use case is that I have a dataset with custom labels that I want to convert to tfrecords. For me the easiest way was to first create a voc style dataset structure and export that to tfrecords with the scripts provided by the tensorflow object detection api.

Is there a reason why the exporter works only with the original labels? I think that for other custom datasets a more general export would be beneficial as well. I encountered a couple of projects that require the trainings data in voc style.

@zhiltsov-max
Copy link
Contributor

@BenjiSchlotter, have you tried to use TFrecord / TF detection api export in CVAT or Datumaro? It's already there, but masks are not exported yet.

@efcy
Copy link
Contributor Author

efcy commented Dec 17, 2019

yes I tried that. But I always get an error during export:

Could not export dataset for the task 14
Error: Request failed with status code 500. "Work-horse process was terminated unexpectedly (waitpid returned 134)".

I will make a seperate issue for that.

@nmanovic
Copy link
Contributor

@BenjiSchlotter , we had the problem but it was fixed in the latest develop branch. Could you please try again?

@zhiltsov-max
Copy link
Contributor

@nmanovic, it looks like another problem

Dataset framework (Datumaro) automation moved this from To do to Done Dec 17, 2019
@nmanovic nmanovic mentioned this issue Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

3 participants