NaturalIntelligence / NaturalIntelligence/imglab
Export to Pascal VOC faulty when based on imported data
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1k
- Forks
- 613
- PR merge metrics
- No merged PRs in 30d
Description
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:
- import data in dlib xml format
- Click on save --> Pascal VOC XML
- 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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open pascal_voc.js and inspect lines 38/39, then reproduce the export after importing dlib XML data. Verify that the generated Pascal VOC XML contains numeric xmax and ymax values equal to the bounding-box coordinates plus dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100