{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "jVZj7qrM1EdH"
   },
   "source": [
    "# Image Captioning Embedding Extraction \n",
    "\n",
    "Co-authored-by: Leila Abdelrahman , Tom Jin and the TensorFlow Team\n",
    "\n",
    "\n",
    "\n",
    "This code reads in extracted frames and captions them. It saves a checkpoint of the model for future use.\n",
    "\n",
    "TODO: Train on the remaining 50k images."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "thg16jRPVdxZ"
   },
   "source": [
    "## Get Library Packages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 295
    },
    "colab_type": "code",
    "id": "Szy0w42t2bPJ",
    "outputId": "394397c5-6460-4044-f2a0-d1ba265c7dba"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting nltk\n",
      "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/92/75/ce35194d8e3022203cca0d2f896dbb88689f9b3fce8e9f9cff942913519d/nltk-3.5.zip (1.4MB)\n",
      "\u001b[K     |████████████████████████████████| 1.4MB 2.8MB/s \n",
      "\u001b[?25hRequirement already satisfied, skipping upgrade: click in /usr/local/lib/python3.6/dist-packages (from nltk) (7.1.2)\n",
      "Requirement already satisfied, skipping upgrade: joblib in /usr/local/lib/python3.6/dist-packages (from nltk) (0.15.1)\n",
      "Requirement already satisfied, skipping upgrade: regex in /usr/local/lib/python3.6/dist-packages (from nltk) (2019.12.20)\n",
      "Requirement already satisfied, skipping upgrade: tqdm in /usr/local/lib/python3.6/dist-packages (from nltk) (4.41.1)\n",
      "Building wheels for collected packages: nltk\n",
      "  Building wheel for nltk (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
      "  Created wheel for nltk: filename=nltk-3.5-cp36-none-any.whl size=1434674 sha256=d161572391818165e81cec9ef8593b825209f2caa2523cadf6f7650717d85699\n",
      "  Stored in directory: /root/.cache/pip/wheels/ae/8c/3f/b1fe0ba04555b08b57ab52ab7f86023639a526d8bc8d384306\n",
      "Successfully built nltk\n",
      "Installing collected packages: nltk\n",
      "\u001b[33m  WARNING: The script nltk is installed in '/root/.local/bin' which is not on PATH.\n",
      "  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\u001b[0m\n",
      "Successfully installed nltk-3.5\n"
     ]
    }
   ],
   "source": [
    "!pip install --user -U nltk"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "KN9kgjr0n6Ee"
   },
   "source": [
    "You need to enter \"punkt\" as the Identifier"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 295
    },
    "colab_type": "code",
    "id": "bAZSsKHw25vM",
    "outputId": "70471c7d-3cc1-443c-ca79-703a0d18c5b5"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "NLTK Downloader\n",
      "---------------------------------------------------------------------------\n",
      "    d) Download   l) List    u) Update   c) Config   h) Help   q) Quit\n",
      "---------------------------------------------------------------------------\n",
      "Downloader> d\n",
      "\n",
      "Download which package (l=list; x=cancel)?\n",
      "  Identifier> punkt\n",
      "    Downloading package punkt to /root/nltk_data...\n",
      "      Unzipping tokenizers/punkt.zip.\n",
      "\n",
      "---------------------------------------------------------------------------\n",
      "    d) Download   l) List    u) Update   c) Config   h) Help   q) Quit\n",
      "---------------------------------------------------------------------------\n",
      "Downloader> q\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 2,
     "metadata": {
      "tags": []
     },
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import nltk\n",
    "nltk.download()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "3ZN1OKf3OrKN"
   },
   "source": [
    "# Image Captioning Portion Pre-Training\n",
    "\n",
    "Pretraining with the MS COCO Class. This code is heavily based on the pretrained im2txt Show and Tell Model: https://github.com/tensorflow/models/tree/master/research/im2txt\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "j4JIc0R7nFF4"
   },
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 124
    },
    "colab_type": "code",
    "id": "EsLrGMlCU1_m",
    "outputId": "a8836a3e-ffc8-4425-f521-71ff199a6285"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly\n",
      "\n",
      "Enter your authorization code:\n",
      "··········\n",
      "Mounted at /content/drive\n"
     ]
    }
   ],
   "source": [
    "from google.colab import drive\n",
    "drive.mount('/content/drive')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "iMcVh17KybyY"
   },
   "outputs": [],
   "source": [
    "!cp 'drive/My Drive/Machine-Learning-Projects/cs231n-project/models/image_capt_container.zip' ."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 849
    },
    "colab_type": "code",
    "id": "fr2iJKJ_oEp5",
    "outputId": "c7493a30-5e1e-4867-fbbb-e92a7a7b8e64"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Archive:  image_capt_container.zip\n",
      "  inflating: model.ckpt-2000000      \n",
      "  inflating: graph.pbtxt             \n",
      "   creating: im2txt/\n",
      "  inflating: im2txt/evaluate.py      \n",
      "  inflating: im2txt/inference_wrapper.py  \n",
      "  inflating: im2txt/show_and_tell_model.py  \n",
      "  inflating: im2txt/train.py         \n",
      "   creating: im2txt/ops/\n",
      "   creating: im2txt/ops/__pycache__/\n",
      "  inflating: im2txt/ops/__pycache__/image_processing.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/__pycache__/inputs.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/__pycache__/image_embedding.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/BUILD        \n",
      "  inflating: im2txt/ops/image_processing.py  \n",
      "  inflating: im2txt/ops/image_embedding_test.py  \n",
      "  inflating: im2txt/ops/inputs.py    \n",
      "  inflating: im2txt/ops/image_embedding.py  \n",
      "   creating: im2txt/__pycache__/\n",
      "  inflating: im2txt/__pycache__/inference_wrapper.cpython-36.pyc  \n",
      "  inflating: im2txt/__pycache__/show_and_tell_model.cpython-36.pyc  \n",
      "  inflating: im2txt/__pycache__/configuration.cpython-36.pyc  \n",
      "  inflating: im2txt/configuration.py  \n",
      "  inflating: im2txt/run_inference.py  \n",
      "  inflating: im2txt/BUILD            \n",
      "  inflating: im2txt/show_and_tell_model_test.py  \n",
      "   creating: im2txt/inference_utils/\n",
      "  inflating: im2txt/inference_utils/caption_generator.py  \n",
      "  inflating: im2txt/inference_utils/inference_wrapper_base.py  \n",
      "   creating: im2txt/inference_utils/__pycache__/\n",
      "  inflating: im2txt/inference_utils/__pycache__/caption_generator.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/__pycache__/vocabulary.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/__pycache__/inference_wrapper_base.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/vocabulary.py  \n",
      "  inflating: im2txt/inference_utils/BUILD  \n",
      "  inflating: im2txt/inference_utils/caption_generator_test.py  \n",
      "   creating: im2txt/data/\n",
      "  inflating: im2txt/data/download_and_preprocess_mscoco.sh  \n",
      "  inflating: im2txt/data/build_mscoco_data.py  \n",
      "  inflating: word_counts_new.txt     \n",
      "  inflating: run_inference.py        \n",
      "   creating: models/\n",
      "  inflating: models/im2txt_2016_10_11.2000000.tar.gz  \n",
      "  inflating: checkpoint              \n",
      "  inflating: model.ckpt-2000000.meta  \n",
      "  inflating: model.ckpt-2000000.index  \n",
      "  inflating: ep271.jpg               \n",
      "  inflating: model.ckpt-2000000.data-00000-of-00001  \n"
     ]
    }
   ],
   "source": [
    "!unzip image_capt_container.zip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 225
    },
    "colab_type": "code",
    "id": "BjMHr6ZJq2KK",
    "outputId": "8b4de782-4e65-4ef0-f29c-03f5a245e3fa"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--2020-06-18 00:26:13--  http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz\n",
      "Resolving download.tensorflow.org (download.tensorflow.org)... 64.233.189.128, 2404:6800:4008:c07::80\n",
      "Connecting to download.tensorflow.org (download.tensorflow.org)|64.233.189.128|:80... connected.\n",
      "HTTP request sent, awaiting response... 200 OK\n",
      "Length: 100885009 (96M) [application/x-tar]\n",
      "Saving to: ‘inception_v3_2016_08_28.tar.gz’\n",
      "\n",
      "inception_v3_2016_0 100%[===================>]  96.21M   330MB/s    in 0.3s    \n",
      "\n",
      "2020-06-18 00:26:13 (330 MB/s) - ‘inception_v3_2016_08_28.tar.gz’ saved [100885009/100885009]\n",
      "\n",
      "inception_v3.ckpt\n"
     ]
    }
   ],
   "source": [
    "# Location to save the Inception v3 checkpoint.\n",
    "!INCEPTION_DIR=\"${HOME}/im2txt/data\" ; mkdir -p ${INCEPTION_DIR} ; wget \"http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz\" ;tar -xvf \"inception_v3_2016_08_28.tar.gz\" -C ${INCEPTION_DIR} ; rm \"inception_v3_2016_08_28.tar.gz\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "-pIPHWS0zoEP"
   },
   "source": [
    "## Get the Data "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "colab_type": "code",
    "id": "ryzDii47sEv6",
    "outputId": "6d9327c7-0ae5-44e9-b819-6ef7b8d96825"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "^C\n"
     ]
    }
   ],
   "source": [
    "!cp '/content/drive/My Drive/Machine-Learning-Projects/cs231n-project/datasets/emotiw/train_frames.tar.gz' .\n",
    "#!cp '/content/drive/My Drive/cs231n-project/datasets/emotiw/train_frames.tar.gz' ."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "2TJ2_a0X9W9h"
   },
   "outputs": [],
   "source": [
    "!tar -xzf train_frames.tar.gz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "IWIAQddxMo5-"
   },
   "outputs": [],
   "source": [
    "!cp '/content/drive/My Drive/Machine-Learning-Projects/cs231n-project/datasets/emotiw/val_frames.tar.gz' .\n",
    "#!cp '/content/drive/My Drive/cs231n-project/datasets/emotiw/val_frames.tar.gz' .\n",
    "\n",
    "!tar -xzf val_frames.tar.gz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 191
    },
    "colab_type": "code",
    "id": "8nohApcF9os7",
    "outputId": "f7210114-7134-416c-e1f7-6ba1ba2d0535"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame_11_10.mp4_0.jpg\n",
      "frame_11_10.mp4_10.jpg\n",
      "frame_11_10.mp4_11.jpg\n",
      "frame_11_10.mp4_12.jpg\n",
      "frame_11_10.mp4_13.jpg\n",
      "frame_11_10.mp4_14.jpg\n",
      "frame_11_10.mp4_1.jpg\n",
      "frame_11_10.mp4_2.jpg\n",
      "frame_11_10.mp4_3.jpg\n",
      "frame_11_10.mp4_4.jpg\n"
     ]
    }
   ],
   "source": [
    "!ls val_frames/1 | head"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 208
    },
    "colab_type": "code",
    "id": "mkgrgwVP7lRM",
    "outputId": "ee000b9e-9948-4b50-e858-6bb80139210a"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "--2020-06-17 23:39:23--  https://storage.googleapis.com/cs231n-emotiw/models/im2txt_2016_10_11.2000000.tar.gz\n",
      "Resolving storage.googleapis.com (storage.googleapis.com)... 74.125.201.128, 2607:f8b0:4001:c07::80\n",
      "Connecting to storage.googleapis.com (storage.googleapis.com)|74.125.201.128|:443... connected.\n",
      "HTTP request sent, awaiting response... 200 OK\n",
      "Length: 139264353 (133M) [application/gzip]\n",
      "Saving to: ‘im2txt_2016_10_11.2000000.tar.gz’\n",
      "\n",
      "im2txt_2016_10_11.2 100%[===================>] 132.81M  72.1MB/s    in 1.8s    \n",
      "\n",
      "2020-06-17 23:39:26 (72.1 MB/s) - ‘im2txt_2016_10_11.2000000.tar.gz’ saved [139264353/139264353]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# #!wget 'https://github.com/tensorflow/models/raw/master/research/im2txt/g3doc/COCO_val2014_000000224477.jpg'\n",
    "# !wget https://storage.googleapis.com/cs231n-emotiw/models/im2txt_2016_10_11.2000000.tar.gz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "colab_type": "text",
    "id": "vAd492IAs2Bi"
   },
   "source": [
    "### WARNING: YOU MUST USE TF <2.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "colab_type": "code",
    "id": "Ix-JfmEtp1sR",
    "outputId": "1048ccff-e44a-44b5-8550-4ca376d9af43"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TensorFlow 1.x selected.\n"
     ]
    }
   ],
   "source": [
    "%tensorflow_version 1.x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 156
    },
    "colab_type": "code",
    "id": "fKv9SEj8rqKJ",
    "outputId": "cc263afe-26b1-4316-83af-01215250ba41"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:\n",
      "The TensorFlow contrib module will not be included in TensorFlow 2.0.\n",
      "For more information, please see:\n",
      "  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md\n",
      "  * https://github.com/tensorflow/addons\n",
      "  * https://github.com/tensorflow/io (for I/O related ops)\n",
      "If you depend on functionality not listed there, please file an issue.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "from run_inference import get_captions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 728
    },
    "colab_type": "code",
    "id": "DVU5d_5YyhOm",
    "outputId": "c0e01111-da65-4b81-9e30-84ae8fb94598"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Archive:  /content/image-capt-container/image_capt_container.zip\n",
      "replace model.ckpt-2000000? [y]es, [n]o, [A]ll, [N]one, [r]ename: A\n",
      "  inflating: model.ckpt-2000000      \n",
      "  inflating: graph.pbtxt             \n",
      "  inflating: im2txt/evaluate.py      \n",
      "  inflating: im2txt/inference_wrapper.py  \n",
      "  inflating: im2txt/show_and_tell_model.py  \n",
      "  inflating: im2txt/train.py         \n",
      "  inflating: im2txt/ops/__pycache__/image_processing.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/__pycache__/inputs.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/__pycache__/image_embedding.cpython-36.pyc  \n",
      "  inflating: im2txt/ops/BUILD        \n",
      "  inflating: im2txt/ops/image_processing.py  \n",
      "  inflating: im2txt/ops/image_embedding_test.py  \n",
      "  inflating: im2txt/ops/inputs.py    \n",
      "  inflating: im2txt/ops/image_embedding.py  \n",
      "  inflating: im2txt/__pycache__/inference_wrapper.cpython-36.pyc  \n",
      "  inflating: im2txt/__pycache__/show_and_tell_model.cpython-36.pyc  \n",
      "  inflating: im2txt/__pycache__/configuration.cpython-36.pyc  \n",
      "  inflating: im2txt/configuration.py  \n",
      "  inflating: im2txt/run_inference.py  \n",
      "  inflating: im2txt/BUILD            \n",
      "  inflating: im2txt/show_and_tell_model_test.py  \n",
      "  inflating: im2txt/inference_utils/caption_generator.py  \n",
      "  inflating: im2txt/inference_utils/inference_wrapper_base.py  \n",
      "  inflating: im2txt/inference_utils/__pycache__/caption_generator.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/__pycache__/vocabulary.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/__pycache__/inference_wrapper_base.cpython-36.pyc  \n",
      "  inflating: im2txt/inference_utils/vocabulary.py  \n",
      "  inflating: im2txt/inference_utils/BUILD  \n",
      "  inflating: im2txt/inference_utils/caption_generator_test.py  \n",
      "  inflating: im2txt/data/download_and_preprocess_mscoco.sh  \n",
      "  inflating: im2txt/data/build_mscoco_data.py  \n",
      "  inflating: word_counts_new.txt     \n",
      "  inflating: run_inference.py        \n",
      "  inflating: models/im2txt_2016_10_11.2000000.tar.gz  \n",
      "  inflating: checkpoint              \n",
      "  inflating: model.ckpt-2000000.meta  \n",
      "  inflating: model.ckpt-2000000.index  \n",
      "  inflating: ep271.jpg               \n",
      "  inflating: model.ckpt-2000000.data-00000-of-00001  \n"
     ]
    }
   ],
   "source": [
    "# !unzip /content/image-capt-container/image_capt_container.zip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 139
    },
    "colab_type": "code",
    "id": "FvTEmdZTrwlH",
    "outputId": "c098af19-42e9-4cdf-e2e5-648aa361df8d"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO:tensorflow:Building model.\n",
      "INFO:tensorflow:Initializing vocabulary from file: /content/word_counts_new.txt\n",
      "INFO:tensorflow:Created vocabulary with 11520 words\n",
      "INFO:tensorflow:Running caption generation on 1 files matching /content/ep271.jpg\n",
      "INFO:tensorflow:Loading model from checkpoint: /content/model.ckpt-2000000\n",
      "INFO:tensorflow:Restoring parameters from /content/model.ckpt-2000000\n",
      "INFO:tensorflow:Successfully loaded checkpoint: model.ckpt-2000000\n"
     ]
    }
   ],
   "source": [
    "captions , log_prob = get_captions(checkpoint_path='/content/model.ckpt-2000000' , vocab_path='/content/word_counts_new.txt' , image_path='/content/ep271.jpg' )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 35
    },
    "colab_type": "code",
    "id": "ASNoTauXs-Xj",
    "outputId": "1c60bec9-8f1e-48fa-8535-6bd9d4669234"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['a woman is standing next to a horse .', 'a woman is standing next to a horse', 'a woman is standing next to a brown horse .']\n"
     ]
    }
   ],
   "source": [
    "print(captions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 961
    },
    "colab_type": "code",
    "id": "6Shdldw3gvKQ",
    "outputId": "ef64c14c-a6c4-478e-ecae-96c29451579b"
   },
   "outputs": [],
   "source": [
    "import cv2\n",
    "from google.colab.patches import cv2_imshow\n",
    "image = cv2.imread('/content/ep271.jpg')\n",
    "cv2_imshow(image)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "colab": {},
    "colab_type": "code",
    "id": "0EHSJWUhe6sH"
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "collapsed_sections": [],
   "machine_shape": "hm",
   "name": "pretrained-image-captioning-per-frame.ipynb",
   "provenance": [],
   "toc_visible": true
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
