Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
13b35ffa
Commit
13b35ffa
authored
Oct 29, 2019
by
fsavard-eai
Committed by
Francisco Massa
Oct 29, 2019
Browse files
Fixing issue #1530 by starting ann_id to 1 in convert_to_coco_api (#1531)
parent
7d509c5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
references/detection/coco_utils.py
references/detection/coco_utils.py
+2
-1
No files found.
references/detection/coco_utils.py
View file @
13b35ffa
...
@@ -145,7 +145,8 @@ def _coco_remove_images_without_annotations(dataset, cat_list=None):
...
@@ -145,7 +145,8 @@ def _coco_remove_images_without_annotations(dataset, cat_list=None):
def
convert_to_coco_api
(
ds
):
def
convert_to_coco_api
(
ds
):
coco_ds
=
COCO
()
coco_ds
=
COCO
()
ann_id
=
0
# annotation IDs need to start at 1, not 0, see torchvision issue #1530
ann_id
=
1
dataset
=
{
'images'
:
[],
'categories'
:
[],
'annotations'
:
[]}
dataset
=
{
'images'
:
[],
'categories'
:
[],
'annotations'
:
[]}
categories
=
set
()
categories
=
set
()
for
img_idx
in
range
(
len
(
ds
)):
for
img_idx
in
range
(
len
(
ds
)):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment