summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/app/search/search_dense.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index 94b7bc5..7fbc364 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -451,6 +451,10 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
sess.close()
def mse_loss_crop(img_a, img_b, y, x, height, width):
+ y = int(y)
+ x = int(x)
+ height = int(height)
+ width = int(width)
img_a = tf.image.crop_to_bounding_box(img_a, y, x, height, width)
img_b = tf.image.crop_to_bounding_box(img_b, y, x, height, width)
return tf.reduce_mean(tf.square((img_a - img_b) / 2.0))