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
a75dcd5b
Commit
a75dcd5b
authored
Jul 07, 2017
by
derekjchow
Committed by
GitHub
Jul 07, 2017
Browse files
Merge pull request #1869 from tmattio/master
Make object_detection dictionaries compatible with Python3
parents
c0b5d11d
545b75f9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py
...tion/meta_architectures/faster_rcnn_meta_arch_test_lib.py
+1
-1
object_detection/models/feature_map_generators_test.py
object_detection/models/feature_map_generators_test.py
+2
-2
object_detection/utils/visualization_utils.py
object_detection/utils/visualization_utils.py
+1
-2
No files found.
object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py
View file @
a75dcd5b
...
...
@@ -271,7 +271,7 @@ class FasterRCNNMetaArchTestBase(tf.test.TestCase):
self
.
assertEqual
(
set
(
prediction_out
.
keys
()),
expected_output_keys
)
self
.
assertAllEqual
(
prediction_out
[
'image_shape'
],
input_image_shape
)
for
output_key
,
expected_shape
in
expected_output_shapes
.
iter
items
():
for
output_key
,
expected_shape
in
expected_output_shapes
.
items
():
self
.
assertAllEqual
(
prediction_out
[
output_key
].
shape
,
expected_shape
)
# Check that anchors are clipped to window.
...
...
object_detection/models/feature_map_generators_test.py
View file @
a75dcd5b
...
...
@@ -63,7 +63,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
sess
.
run
(
init_op
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_map_shapes
=
dict
(
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
iter
items
())
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
items
())
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
def
test_get_expected_feature_map_shapes_with_inception_v3
(
self
):
...
...
@@ -93,7 +93,7 @@ class MultiResolutionFeatureMapGeneratorTest(tf.test.TestCase):
sess
.
run
(
init_op
)
out_feature_maps
=
sess
.
run
(
feature_maps
)
out_feature_map_shapes
=
dict
(
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
iter
items
())
(
key
,
value
.
shape
)
for
key
,
value
in
out_feature_maps
.
items
())
self
.
assertDictEqual
(
out_feature_map_shapes
,
expected_feature_map_shapes
)
...
...
object_detection/utils/visualization_utils.py
View file @
a75dcd5b
...
...
@@ -25,7 +25,6 @@ import PIL.Image as Image
import
PIL.ImageColor
as
ImageColor
import
PIL.ImageDraw
as
ImageDraw
import
PIL.ImageFont
as
ImageFont
import
six
import
tensorflow
as
tf
...
...
@@ -398,7 +397,7 @@ def visualize_boxes_and_labels_on_image_array(image,
classes
[
i
]
%
len
(
STANDARD_COLORS
)]
# Draw all boxes onto image.
for
box
,
color
in
six
.
iteritems
(
box_to_color_map
):
for
box
,
color
in
box_to_color_map
.
items
(
):
ymin
,
xmin
,
ymax
,
xmax
=
box
if
instance_masks
is
not
None
:
draw_mask_on_image_array
(
...
...
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