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
8d010d7d
Commit
8d010d7d
authored
Sep 10, 2019
by
Cao Yuhang
Committed by
Kai Chen
Sep 10, 2019
Browse files
Fix bug when using coco_eval evaluate (#1367)
* fix bug when using coco_eval evaluate * raise TypeError
parent
144a7ec4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
mmdet/core/evaluation/coco_utils.py
mmdet/core/evaluation/coco_utils.py
+6
-1
No files found.
mmdet/core/evaluation/coco_utils.py
View file @
8d010d7d
...
@@ -23,7 +23,12 @@ def coco_eval(result_files, result_types, coco, max_dets=(100, 300, 1000)):
...
@@ -23,7 +23,12 @@ def coco_eval(result_files, result_types, coco, max_dets=(100, 300, 1000)):
return
return
for
res_type
in
result_types
:
for
res_type
in
result_types
:
result_file
=
result_files
[
res_type
]
if
isinstance
(
result_files
,
str
):
result_file
=
result_files
elif
isinstance
(
result_files
,
dict
):
result_file
=
result_files
[
res_type
]
else
:
assert
TypeError
(
'result_files must be a str or dict'
)
assert
result_file
.
endswith
(
'.json'
)
assert
result_file
.
endswith
(
'.json'
)
coco_dets
=
coco
.
loadRes
(
result_file
)
coco_dets
=
coco
.
loadRes
(
result_file
)
...
...
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