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

Export to Pascal VOC faulty when based on imported data #190

Open
j-yougoose opened this issue Apr 2, 2021 · 1 comment
Open

Export to Pascal VOC faulty when based on imported data #190

j-yougoose opened this issue Apr 2, 2021 · 1 comment

Comments

@j-yougoose
Copy link

j-yougoose commented Apr 2, 2021

If a dlib xml is imported and the data is exported as pascal VOC the xmax and ymax values are wrong. It seems like the additions in lines 38/39 of pascal_voc.js are receiving string values for shape.bbox.x and shape.bbox.w this leads to a string concatenation when an int addition is intended.

To Reproduce
Steps to reproduce the behavior:

  1. import data in dlib xml format
  2. Click on save --> Pascal VOC XML
  3. See error in exported file

Quick fix by changing lines 38/39 of pascal_voc.js from

        <xmax>${shape.bbox.x + shape.bbox.w}</xmax>
        <ymax>${shape.bbox.y + shape.bbox.h}</ymax>

to

        <xmax>${parseInt(shape.bbox.x) + parseInt(shape.bbox.w)}</xmax>
        <ymax>${parseInt(shape.bbox.y) + parseInt(shape.bbox.h)}</ymax>
@github-actions
Copy link

github-actions bot commented Apr 2, 2021

This repository is currently out of maintenance due to insufficient time. Any bug, feature, or query may take longer time than expected or may lose in void.

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

No branches or pull requests

1 participant