我试图通过tensorboard嵌入式投影仪可视化图像特征向量。 我的方法是创建一个sprite图像(“sprite_all_img.jpg”),并使用以下代码运行张力板:
with tf.Session() as sess:
saver = tf.train.Saver([features])
sess.run(features.initializer)
saver.save(sess, os.path.join('C:/for_tensorboard/all_images.ckpt'))
config = projector.ProjectorConfig()
# One can add multiple embeddings.
embedding = config.embeddings.add()
embedding.tensor_name = features.name
# Link this tensor to its metadata file (e.g. labels).
embedding.metadata_path = os.path.join('C:/for_tensorboard/metadata_16dim.tsv')
# Comment out if you don't want sprites
embedding.sprite.image_path = os.path.join('C:/for_tensorboard/sprite_all_img.jpg')
embedding.sprite.single_image_dim.extend([img_data.shape[1], img_data.shape[1]])
# Saves a config file that TensorBoard will read during startup.
projector.visualize_embeddings(tf.summary.FileWriter('C:/for_tensorboard'), config)
在嵌入式投影仪中,我希望图像是不透明的,当它们相互重叠时,只能看到前面的图像,就像其他人所做的那样:other people's result (发件人:https://medium.com/@kumon/visualizing-image-feature-vectors-through-tensorboard-b850ce1be7f1)
然而,当我在嵌入式投影仪中显示我的图像时,它们变得有些透明,当它们重叠时,整个簇变得非常“暗”(由于许多半透明图像堆叠在一起),如图所示:(1)all data(2)zoom in
我已经尝试将数据量从5000个图像减少到2500个,但根本没有改善
有人知道原因和解决方法吗?多谢各位
目前没有回答
相关问题 更多 >
编程相关推荐