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
d3c73c21
Commit
d3c73c21
authored
Mar 24, 2021
by
Vighnesh Birodkar
Committed by
TF Object Detection Team
Mar 24, 2021
Browse files
Add image_and_boxes_tensor to helper doc string.
PiperOrigin-RevId: 364895608
parent
f540d472
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
research/object_detection/exporter_lib_v2.py
research/object_detection/exporter_lib_v2.py
+7
-10
research/object_detection/exporter_main_v2.py
research/object_detection/exporter_main_v2.py
+7
-1
No files found.
research/object_detection/exporter_lib_v2.py
View file @
d3c73c21
...
@@ -208,14 +208,6 @@ class DetectionFromTFExampleModule(DetectionInferenceModule):
...
@@ -208,14 +208,6 @@ class DetectionFromTFExampleModule(DetectionInferenceModule):
_decode_tf_example
)
_decode_tf_example
)
return
self
.
_run_inference_on_images
(
images
,
true_shapes
)
return
self
.
_run_inference_on_images
(
images
,
true_shapes
)
DETECTION_MODULE_MAP
=
{
'image_tensor'
:
DetectionFromImageModule
,
'encoded_image_string_tensor'
:
DetectionFromEncodedImageModule
,
'tf_example'
:
DetectionFromTFExampleModule
,
'float_image_tensor'
:
DetectionFromFloatImageModule
}
def
export_inference_graph
(
input_type
,
def
export_inference_graph
(
input_type
,
pipeline_config
,
pipeline_config
,
...
@@ -355,6 +347,11 @@ class DetectionFromImageAndBoxModule(DetectionInferenceModule):
...
@@ -355,6 +347,11 @@ class DetectionFromImageAndBoxModule(DetectionInferenceModule):
return
self
.
_run_segmentation_on_images
(
input_tensor
,
boxes
)
return
self
.
_run_segmentation_on_images
(
input_tensor
,
boxes
)
DETECTION_MODULE_MAP
.
update
({
DETECTION_MODULE_MAP
=
{
'image_tensor'
:
DetectionFromImageModule
,
'encoded_image_string_tensor'
:
DetectionFromEncodedImageModule
,
'tf_example'
:
DetectionFromTFExampleModule
,
'float_image_tensor'
:
DetectionFromFloatImageModule
,
'image_and_boxes_tensor'
:
DetectionFromImageAndBoxModule
,
'image_and_boxes_tensor'
:
DetectionFromImageAndBoxModule
,
}
)
}
research/object_detection/exporter_main_v2.py
View file @
d3c73c21
...
@@ -31,6 +31,11 @@ specified option.
...
@@ -31,6 +31,11 @@ specified option.
* `tf_example`: Accepts a 1-D string tensor of shape [None] containing
* `tf_example`: Accepts a 1-D string tensor of shape [None] containing
serialized TFExample protos. Image resolutions are expected to be the same
serialized TFExample protos. Image resolutions are expected to be the same
if more than 1 image is provided.
if more than 1 image is provided.
* `image_and_boxes_tensor`: Accepts a 4-D image tensor of size
[1, None, None, 3] and a boxes tensor of size [1, None, 4] of normalized
bounding boxes. To be able to support this option, the model needs
to implement a predict_masks_from_boxes method. See the documentation
for DetectionFromImageAndBoxModule for details.
and the following output nodes returned by the model.postprocess(..):
and the following output nodes returned by the model.postprocess(..):
* `num_detections`: Outputs float32 tensors of the form [batch]
* `num_detections`: Outputs float32 tensors of the form [batch]
...
@@ -107,7 +112,8 @@ FLAGS = flags.FLAGS
...
@@ -107,7 +112,8 @@ FLAGS = flags.FLAGS
flags
.
DEFINE_string
(
'input_type'
,
'image_tensor'
,
'Type of input node. Can be '
flags
.
DEFINE_string
(
'input_type'
,
'image_tensor'
,
'Type of input node. Can be '
'one of [`image_tensor`, `encoded_image_string_tensor`, '
'one of [`image_tensor`, `encoded_image_string_tensor`, '
'`tf_example`, `float_image_tensor`]'
)
'`tf_example`, `float_image_tensor`, '
'`image_and_boxes_tensor`]'
)
flags
.
DEFINE_string
(
'pipeline_config_path'
,
None
,
flags
.
DEFINE_string
(
'pipeline_config_path'
,
None
,
'Path to a pipeline_pb2.TrainEvalPipelineConfig config '
'Path to a pipeline_pb2.TrainEvalPipelineConfig config '
'file.'
)
'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