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
ResNet50_tensorflow
Commits
4a91d110
Commit
4a91d110
authored
Mar 26, 2018
by
Zhichao Lu
Committed by
pkulzc
Apr 02, 2018
Browse files
Use get_data_files_path to access test data.
PiperOrigin-RevId: 190505306
parent
93b8168a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
research/object_detection/model_test.py
research/object_detection/model_test.py
+2
-3
research/object_detection/model_test_util.py
research/object_detection/model_test_util.py
+2
-3
No files found.
research/object_detection/model_test.py
View file @
4a91d110
...
...
@@ -32,20 +32,19 @@ from object_detection.builders import model_builder
from
object_detection.core
import
standard_fields
as
fields
from
object_detection.utils
import
config_util
FLAGS
=
tf
.
flags
.
FLAGS
MODEL_NAME_FOR_TEST
=
model_test_util
.
SSD_INCEPTION_MODEL_NAME
def
_get_data_path
():
"""Returns an absolute path to TFRecord file."""
return
os
.
path
.
join
(
FLAGS
.
test_srcdir
,
model_test_util
.
PATH_BASE
,
'test_data'
,
return
os
.
path
.
join
(
tf
.
resource_loader
.
get_data_files_path
()
,
'test_data'
,
'pets_examples.record'
)
def
_get_labelmap_path
():
"""Returns an absolute path to label map file."""
return
os
.
path
.
join
(
FLAGS
.
test_srcdir
,
model_test_util
.
PATH_BASE
,
'data'
,
return
os
.
path
.
join
(
tf
.
resource_loader
.
get_data_files_path
()
,
'data'
,
'pet_label_map.pbtxt'
)
...
...
research/object_detection/model_test_util.py
View file @
4a91d110
...
...
@@ -28,13 +28,12 @@ FLAGS = tf.flags.FLAGS
FASTER_RCNN_MODEL_NAME
=
'faster_rcnn_resnet50_pets'
SSD_INCEPTION_MODEL_NAME
=
'ssd_inception_v2_pets'
PATH_BASE
=
'google3/third_party/tensorflow_models/object_detection/'
def
GetPipelineConfigPath
(
model_name
):
"""Returns path to the local pipeline config file."""
return
os
.
path
.
join
(
FLAGS
.
test_srcdir
,
PATH_BASE
,
'samples'
,
'configs'
,
model_name
+
'.config'
)
return
os
.
path
.
join
(
tf
.
resource_loader
.
get_data_files_path
()
,
'samples'
,
'configs'
,
model_name
+
'.config'
)
def
InitializeFlags
(
model_name_for_test
):
...
...
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