diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-16 15:46:23 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-16 15:46:23 +0100 |
| commit | 105083925c1fd67da5ce580021f8ec7a1497f7f7 (patch) | |
| tree | 17c4a84d6632d6d599839e4b19bead16a4f729d6 /cli/app/search/search_dense.py | |
| parent | 1cc66b6afd36f41776c6c649eb1088dbb7caf1c7 (diff) | |
tag :(
Diffstat (limited to 'cli/app/search/search_dense.py')
| -rw-r--r-- | cli/app/search/search_dense.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py index 1e1c836..36fc230 100644 --- a/cli/app/search/search_dense.py +++ b/cli/app/search/search_dense.py @@ -425,7 +425,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op inv_batch = vs.interleave(vs.data2img(image_batch[BATCH_SIZE - SAMPLE_SIZE:]), vs.data2img(gen_images[BATCH_SIZE - SAMPLE_SIZE:])) inv_batch = vs.grid_transform(inv_batch) - vs.save_image('{}/progress_{}_{:04d}.png'.format(SAMPLES_DIR, params.tag, int(it / 500)), inv_batch) + vs.save_image('{}/progress_{}_{:04d}.png'.format(SAMPLES_DIR, opt_tag, int(it / 500)), inv_batch) it += 1 @@ -445,7 +445,7 @@ def find_dense_embedding_for_images(params, opt_tag="inverse_" + timestamp(), op image = Image.fromarray(images[i]) fp = BytesIO() image.save(fp, format='png') - data = upload_bytes_to_cortex(params.folder_id, "{}-{}.png".format(sample_fn, tag), fp, "image/png") + data = upload_bytes_to_cortex(params.folder_id, "{}-{}.png".format(sample_fn, opt_tag), fp, "image/png") print(json.dumps(data, indent=2)) if data is not None and 'files' in data: file_id = data['files'][0]['id'] |
