Search code examples
pythontensorflowtensorflow-model-garden

Object creation for Image Captioning im2txt model, avoid loading checkpoints for every image


The official tensorflow Show and Tell-im2txt model comes with a bazel build dependency to generate caption for an Image. For execution for every image, a session is created the checkpoints are loaded for each image repeatedly.

How can repeated loading of checkpoints can be avoided ?

Can we create a function that takes image as input and runs it through the pre-loaded checkpoints ?


Solution

  • I have finally decoupled it's working and created a repo that supports object creation.

    If anyone is working on achieving the same can refer to this repo: https://github.com/Akashtyagi08/Pretrained-im2txt-single_instance