"tutorials/models/vscode:/vscode.git/clone" did not exist on "85b8fe523644edf56ed182b932f156811a346b99"
Commit efe7c3ea authored by syiming's avatar syiming
Browse files

fix tiny errors.

parent b88095dc
...@@ -415,7 +415,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels, ...@@ -415,7 +415,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels,
crop_size, scope=None): crop_size, scope=None):
#FIXME: fix docstring #FIXME: fix docstring
"""doc string.""" """doc string."""
if not box_levels: if box_levels is None:
return native_crop_and_resize(images[0], boxes, crop_size, scope=None) return native_crop_and_resize(images[0], boxes, crop_size, scope=None)
croped_feature_list = [] croped_feature_list = []
for level, image in enumerate(images): for level, image in enumerate(images):
...@@ -424,6 +424,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels, ...@@ -424,6 +424,7 @@ def multilevel_native_crop_and_resize(images, boxes, box_levels,
croped_feature_list.append(cropped) croped_feature_list.append(cropped)
return tf.concat(croped_feature_list, axis=0) return tf.concat(croped_feature_list, axis=0)
def native_crop_and_resize(image, boxes, crop_size, scope=None): def native_crop_and_resize(image, boxes, crop_size, scope=None):
"""Same as `matmul_crop_and_resize` but uses tf.image.crop_and_resize.""" """Same as `matmul_crop_and_resize` but uses tf.image.crop_and_resize."""
def get_box_inds(proposals): def get_box_inds(proposals):
...@@ -443,6 +444,7 @@ def native_crop_and_resize(image, boxes, crop_size, scope=None): ...@@ -443,6 +444,7 @@ def native_crop_and_resize(image, boxes, crop_size, scope=None):
tf.shape(cropped_regions)[1:]], axis=0) tf.shape(cropped_regions)[1:]], axis=0)
return tf.reshape(cropped_regions, final_shape) return tf.reshape(cropped_regions, final_shape)
def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size, def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size,
extrapolation_value=0.0, scope=None): extrapolation_value=0.0, scope=None):
#FIXME: fix docstring #FIXME: fix docstring
...@@ -450,7 +452,7 @@ def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size, ...@@ -450,7 +452,7 @@ def multilevel_matmul_crop_and_resize(images, boxes, box_levels, crop_size,
with tf.name_scope(scope, 'MatMulCropAndResize'): with tf.name_scope(scope, 'MatMulCropAndResize'):
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([image], return multilevel_roi_align(images,
boxes, boxes,
box_levels, box_levels,
crop_size, crop_size,
......
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