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
ModelZoo
SOLOv2-pytorch
Commits
6d9ee37b
"examples/vscode:/vscode.git/clone" did not exist on "a8f0b75259b5720fdd16ebdc4e0117e425cfd833"
Commit
6d9ee37b
authored
Oct 21, 2018
by
Kai Chen
Browse files
add an attribute for CocoDataset
parent
c96600b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
mmdet/datasets/coco.py
mmdet/datasets/coco.py
+5
-2
No files found.
mmdet/datasets/coco.py
View file @
6d9ee37b
...
@@ -8,8 +8,11 @@ class CocoDataset(CustomDataset):
...
@@ -8,8 +8,11 @@ class CocoDataset(CustomDataset):
def
load_annotations
(
self
,
ann_file
):
def
load_annotations
(
self
,
ann_file
):
self
.
coco
=
COCO
(
ann_file
)
self
.
coco
=
COCO
(
ann_file
)
cat_ids
=
self
.
coco
.
getCatIds
()
self
.
cat_ids
=
self
.
coco
.
getCatIds
()
self
.
cat2label
=
{
cat_id
:
i
+
1
for
i
,
cat_id
in
enumerate
(
cat_ids
)}
self
.
cat2label
=
{
cat_id
:
i
+
1
for
i
,
cat_id
in
enumerate
(
self
.
cat_ids
)
}
self
.
img_ids
=
self
.
coco
.
getImgIds
()
self
.
img_ids
=
self
.
coco
.
getImgIds
()
img_infos
=
[]
img_infos
=
[]
for
i
in
self
.
img_ids
:
for
i
in
self
.
img_ids
:
...
...
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