JiahuiYu / generative_inpainting

DeepFill v1/v2 with Contextual Attention and Gated Convolution, CVPR 2018, and ICCV 2019 Oral
http://jiahuiyu.com/deepfill/
Other
3.27k stars 787 forks source link

How to read fnames for each batch by setting return_fnames=True on data.data_from_fnames() #456

Closed jelujelu closed 4 years ago

jelujelu commented 4 years ago

Hi, I want to apply different mask for each image within the same batch using the annotated facial landmarks. If I understand correctly, I need to first read the fnames within each batch by setting return_fnames=True when creating the data object.

The data pipeline returns me <tf.Tensor 'FIFOQueueV2_DequeueMany:1' shape=(16,) dtype=string>, however I have trouble with viewing/reading this tensor using tf.run(). What would be the correct way to obtain the filenames for each batch?

Thanks,

JiahuiYu commented 4 years ago

It returns string tensor and should be easy to view in tf.run() by tf.Print? It's a tf-related question so you might also want to checkout tensorflow communities.