Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
food-round2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joel Joseph
food-round2
Commits
20762ce9
"README.md" did not exist on "c1039bc23053e569de1a984b966fff3b07c4a814"
Commit
20762ce9
authored
6 years ago
by
Kai Chen
Browse files
Options
Downloads
Patches
Plain Diff
bug fix for proposal evaluation
parent
a6adf8f0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mmdet/core/evaluation/coco_utils.py
+2
-2
2 additions, 2 deletions
mmdet/core/evaluation/coco_utils.py
tools/test.py
+13
-4
13 additions, 4 deletions
tools/test.py
with
15 additions
and
6 deletions
mmdet/core/evaluation/coco_utils.py
+
2
−
2
View file @
20762ce9
...
@@ -16,8 +16,8 @@ def coco_eval(result_file, result_types, coco, max_dets=(100, 300, 1000)):
...
@@ -16,8 +16,8 @@ def coco_eval(result_file, result_types, coco, max_dets=(100, 300, 1000)):
coco
=
COCO
(
coco
)
coco
=
COCO
(
coco
)
assert
isinstance
(
coco
,
COCO
)
assert
isinstance
(
coco
,
COCO
)
if
res_type
==
'
proposal_fast
'
:
if
res
ult
_type
s
==
[
'
proposal_fast
'
]
:
ar
=
fast_eval_recall
(
result_file
,
coco
,
max_dets
)
ar
=
fast_eval_recall
(
result_file
,
coco
,
np
.
array
(
max_dets
)
)
for
i
,
num
in
enumerate
(
max_dets
):
for
i
,
num
in
enumerate
(
max_dets
):
print
(
'
AR@{}
\t
= {:.4f}
'
.
format
(
num
,
ar
[
i
]))
print
(
'
AR@{}
\t
= {:.4f}
'
.
format
(
num
,
ar
[
i
]))
return
return
...
...
This diff is collapsed.
Click to expand it.
tools/test.py
+
13
−
4
View file @
20762ce9
...
@@ -55,6 +55,9 @@ def parse_args():
...
@@ -55,6 +55,9 @@ def parse_args():
def
main
():
def
main
():
args
=
parse_args
()
args
=
parse_args
()
if
args
.
out
is
not
None
and
not
args
.
out
.
endswith
((
'
.pkl
'
,
'
.pickle
'
)):
raise
ValueError
(
'
The output file must be a pkl file.
'
)
cfg
=
mmcv
.
Config
.
fromfile
(
args
.
config
)
cfg
=
mmcv
.
Config
.
fromfile
(
args
.
config
)
cfg
.
model
.
pretrained
=
None
cfg
.
model
.
pretrained
=
None
cfg
.
data
.
test
.
test_mode
=
True
cfg
.
data
.
test
.
test_mode
=
True
...
@@ -82,11 +85,17 @@ def main():
...
@@ -82,11 +85,17 @@ def main():
dataset
,
_data_func
,
range
(
args
.
gpus
))
dataset
,
_data_func
,
range
(
args
.
gpus
))
if
args
.
out
:
if
args
.
out
:
print
(
'
writing results to {}
'
.
format
(
args
.
out
))
mmcv
.
dump
(
outputs
,
args
.
out
)
mmcv
.
dump
(
outputs
,
args
.
out
)
if
args
.
eval
:
eval_types
=
args
.
eval
json_file
=
args
.
out
+
'
.json
'
if
eval_types
:
results2json
(
dataset
,
outputs
,
json_file
)
print
(
'
Starting evaluate {}
'
.
format
(
'
and
'
.
join
(
eval_types
)))
coco_eval
(
json_file
,
args
.
eval
,
dataset
.
coco
)
if
eval_types
==
[
'
proposal_fast
'
]:
result_file
=
args
.
out
else
:
result_file
=
args
.
out
+
'
.json
'
results2json
(
dataset
,
outputs
,
result_file
)
coco_eval
(
result_file
,
eval_types
,
dataset
.
coco
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment