Commit 81bc290f authored by syiming's avatar syiming
Browse files

Modify scope for multilevel crop and resize function

parent c63169b2
...@@ -444,6 +444,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels, ...@@ -444,6 +444,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels,
""" """
if box_levels is None: if box_levels is None:
return native_crop_and_resize(images[0], boxes, crop_size, scope) return native_crop_and_resize(images[0], boxes, crop_size, scope)
with tf.name_scope('MultiLevelNativeCropAndResize'):
cropped_feature_list = [] cropped_feature_list = []
for level, image in enumerate(images): for level, image in enumerate(images):
# For each level, crop the feature according to all boxes # For each level, crop the feature according to all boxes
...@@ -510,7 +511,7 @@ def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size, ...@@ -510,7 +511,7 @@ def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size,
Returns: Returns:
A 5-D tensor of shape `[batch, num_boxes, crop_height, crop_width, depth]` A 5-D tensor of shape `[batch, num_boxes, crop_height, crop_width, depth]`
""" """
with tf.name_scope(scope, 'MatMulCropAndResize'): with tf.name_scope(scope, 'MultiLevelMatMulCropAndResize'):
if box_levels is None: if box_levels is None:
box_levels = tf.zeros(tf.shape(boxes)[:2], dtype=tf.int32) box_levels = tf.zeros(tf.shape(boxes)[:2], dtype=tf.int32)
return multilevel_roi_align(images, return multilevel_roi_align(images,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment