Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
曾经的那一瞬间
Models
提交
01e24a52
M
Models
项目概览
曾经的那一瞬间
/
Models
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01e24a52
编写于
10月 21, 2020
作者:
Z
Zhichao Lu
提交者:
TF Object Detection Team
10月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Internal change.
PiperOrigin-RevId: 338383183
上级
58b6666f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
2 deletion
+13
-2
research/object_detection/dataset_tools/context_rcnn/generate_detection_data_tf2_test.py
...et_tools/context_rcnn/generate_detection_data_tf2_test.py
+1
-0
research/object_detection/dataset_tools/context_rcnn/generate_embedding_data_tf2_test.py
...et_tools/context_rcnn/generate_embedding_data_tf2_test.py
+1
-0
research/object_detection/exporter_lib_tf2_test.py
research/object_detection/exporter_lib_tf2_test.py
+4
-0
research/object_detection/exporter_lib_v2.py
research/object_detection/exporter_lib_v2.py
+7
-2
未找到文件。
research/object_detection/dataset_tools/context_rcnn/generate_detection_data_tf2_test.py
浏览文件 @
01e24a52
...
...
@@ -133,6 +133,7 @@ class GenerateDetectionDataTest(tf.test.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
research/object_detection/dataset_tools/context_rcnn/generate_embedding_data_tf2_test.py
浏览文件 @
01e24a52
...
...
@@ -139,6 +139,7 @@ class GenerateEmbeddingData(tf.test.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
research/object_detection/exporter_lib_tf2_test.py
浏览文件 @
01e24a52
...
...
@@ -120,6 +120,7 @@ class ExportInferenceGraphTest(tf.test.TestCase, parameterized.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
@@ -181,6 +182,7 @@ class ExportInferenceGraphTest(tf.test.TestCase, parameterized.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
@@ -217,6 +219,7 @@ class ExportInferenceGraphTest(tf.test.TestCase, parameterized.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
@@ -262,6 +265,7 @@ class ExportInferenceGraphTest(tf.test.TestCase, parameterized.TestCase):
with
mock
.
patch
.
object
(
model_builder
,
'build'
,
autospec
=
True
)
as
mock_builder
:
mock_builder
.
return_value
=
FakeModel
()
exporter_lib_v2
.
INPUT_BUILDER_UTIL_MAP
[
'model_build'
]
=
mock_builder
output_directory
=
os
.
path
.
join
(
tmp_dir
,
'output'
)
pipeline_config
=
pipeline_pb2
.
TrainEvalPipelineConfig
()
exporter_lib_v2
.
export_inference_graph
(
...
...
research/object_detection/exporter_lib_v2.py
浏览文件 @
01e24a52
...
...
@@ -25,6 +25,11 @@ from object_detection.data_decoders import tf_example_decoder
from
object_detection.utils
import
config_util
INPUT_BUILDER_UTIL_MAP
=
{
'model_build'
:
model_builder
.
build
,
}
def
_decode_image
(
encoded_image_string_tensor
):
image_tensor
=
tf
.
image
.
decode_image
(
encoded_image_string_tensor
,
channels
=
3
)
...
...
@@ -230,8 +235,8 @@ def export_inference_graph(input_type,
output_checkpoint_directory
=
os
.
path
.
join
(
output_directory
,
'checkpoint'
)
output_saved_model_directory
=
os
.
path
.
join
(
output_directory
,
'saved_model'
)
detection_model
=
model_builder
.
build
(
pipeline_config
.
model
,
is_training
=
False
)
detection_model
=
INPUT_BUILDER_UTIL_MAP
[
'model_build'
](
pipeline_config
.
model
,
is_training
=
False
)
ckpt
=
tf
.
train
.
Checkpoint
(
model
=
detection_model
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录