Fix an error in toCOCO in coco.js causing the bbox property in the resulting COCO formatted data/file to always have a value of undefined.
Cause
shape_i.bbox is used to try and get the bbox value for the current shape in the for loop. shape_i is just the iteration counter though, and has no such property.
Solution
Change shape_i to shape, referencing the shape object retrieved at the beginning of the for loop.
Type
Please mention the type of PR
[x] Bug Fix
[ ] Refactoring / Technology upgrade
[ ] New Feature
[ ] Documentation
[ ] Other : | Please Specify |
Note : Please ensure that you've read contribution guidelines before raising this PR.
Purpose / Goal
Fix an error in
toCOCO
in coco.js causing thebbox
property in the resulting COCO formatted data/file to always have a value ofundefined
.Cause
shape_i.bbox
is used to try and get thebbox
value for the current shape in the for loop.shape_i
is just the iteration counter though, and has no such property.Solution
Change
shape_i
toshape
, referencing the shape object retrieved at the beginning of the for loop.Type
Please mention the type of PR
Note : Please ensure that you've read contribution guidelines before raising this PR.