hellochick / PSPNet-tensorflow

TensorFlow-based implementation of "Pyramid Scene Parsing Network".
326 stars 123 forks source link

How to better do batch inference on multiple images #32

Open jin-zhe opened 6 years ago

jin-zhe commented 6 years ago

Hi there! My apologies if this is a stupid question as I am still very new to TF. I am trying to use PSP50 (pre-trained on ADE20K) for inference on a list of images. Currently I am doing this via modifying inference.py by injecting tf.reset_default_graph() at the top of the inference code block which is iterated for every image. This feels very inefficient as it is recreating the net and loading the checkpoint for every image. Is there a more optimal way to go about doing this?

Xziguoxu commented 6 years ago

@jin-zhe i'm also new to tf and face the same problem, have you solve it? could you show me how to do this?

jin-zhe commented 6 years ago

Hi @Xziguoxu I do not have a solution yet

jackdh commented 5 years ago

Hey @jin-zhe did you find a solution? Thanks.

Mickeyyyang commented 4 years ago

Hi @Xziguoxu I do not have a solution yet

hi, everyone. did you find a solution now?