summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/app/commands/biggan/extract_dense_vectors.py2
-rw-r--r--cli/app/search/search_dense.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/cli/app/commands/biggan/extract_dense_vectors.py b/cli/app/commands/biggan/extract_dense_vectors.py
index 0f61528..05b2c23 100644
--- a/cli/app/commands/biggan/extract_dense_vectors.py
+++ b/cli/app/commands/biggan/extract_dense_vectors.py
@@ -10,7 +10,7 @@ from app.search.params import timestamp
@click.command('')
@click.option('-f', '--folder_id', 'opt_folder_id', type=int,
help='Folder ID to process')
-@click.option('-ls', '--latent_steps', 'opt_latent_steps', default=1000, type=int,
+@click.option('-ls', '--latent_steps', 'opt_latent_steps', default=100, type=int,
help='Number of optimization iterations')
@click.option('-ds', '--dense_steps', 'opt_dense_steps', default=2000, type=int,
help='Number of optimization iterations')
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index a296264..703a690 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -186,7 +186,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
# Convert images to appropriate size for feature extraction.
height, width = hub.get_expected_image_size(feature_extractor)
- img_w = IMG_SHAPE[0]
+ img_w = 512
feat_loss, img_feat_err = feature_loss(feature_extractor, opt_feature_layers, BATCH_SIZE, gen_img_ch, target_img_ch, None, None, height, width)
@@ -401,6 +401,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op
sess.close()
def feature_loss(feature_extractor, opt_feature_layers, BATCH_SIZE, img_a, img_b, y, x, height, width):
+ print("{} {} {} {}".format(y, x, height, width))
if y is not None:
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)