Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GenVQA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
Vision
GenVQA
Commits
62963c88
"README.md" did not exist on "ae9ffb17f821735bae2eca8e8b74a849d9736562"
Commit
62963c88
authored
8 years ago
by
tgupta6
Browse files
Options
Downloads
Patches
Plain Diff
Write only once after passing over the complete data in obj atr eval
parent
e0fcf8c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_attribute_classifier_cached_features/eval.py
+11
-9
11 additions, 9 deletions
object_attribute_classifier_cached_features/eval.py
with
11 additions
and
9 deletions
object_attribute_classifier_cached_features/eval.py
+
11
−
9
View file @
62963c88
...
@@ -153,15 +153,9 @@ class eval_mgr():
...
@@ -153,15 +153,9 @@ class eval_mgr():
region_ids
,
region_ids
,
region_paths
)
region_paths
)
if
iter
%
500
==
0
:
#
if iter%500 == 0:
self
.
write_scores
()
#
self.write_scores()
filename
=
os
.
path
.
join
(
self
.
object_scores_dirname
,
'
object_predictions.json
'
)
with
open
(
filename
,
'
w
'
)
as
file
:
ujson
.
dump
(
self
.
obj_pred_json
,
file
,
indent
=
4
)
def
save_image_pred
(
def
save_image_pred
(
self
,
self
,
...
@@ -231,6 +225,13 @@ class eval_mgr():
...
@@ -231,6 +225,13 @@ class eval_mgr():
labels
[:,
self
.
attribute_ids
[
i
]].
tolist
())
labels
[:,
self
.
attribute_ids
[
i
]].
tolist
())
def
write_scores
(
self
):
def
write_scores
(
self
):
filename
=
os
.
path
.
join
(
self
.
object_scores_dirname
,
'
object_predictions.json
'
)
with
open
(
filename
,
'
w
'
)
as
file
:
ujson
.
dump
(
self
.
obj_pred_json
,
file
,
indent
=
4
)
for
i
in
xrange
(
10
):
for
i
in
xrange
(
10
):
filename
=
os
.
path
.
join
(
filename
=
os
.
path
.
join
(
self
.
attribute_scores_dirname
,
self
.
attribute_scores_dirname
,
...
@@ -384,7 +385,8 @@ def eval(
...
@@ -384,7 +385,8 @@ def eval(
# print 'Fall_out: {}'.format(evaluator.get_fall_out())
# print 'Fall_out: {}'.format(evaluator.get_fall_out())
# print 'AP: {}'.format(evaluator.get_ap())
# print 'AP: {}'.format(evaluator.get_ap())
iter
+=
1
iter
+=
1
evaluator
.
write_scores
()
# print 'Object accuracy: {}'.format(evaluator.get_object_accuracy())
# print 'Object accuracy: {}'.format(evaluator.get_object_accuracy())
# print 'Recall: {}'.format(evaluator.get_recall())
# print 'Recall: {}'.format(evaluator.get_recall())
# print 'Precision: {}'.format(evaluator.get_precision())
# print 'Precision: {}'.format(evaluator.get_precision())
...
...
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