class_docstr: Model described in (https://arxiv.org/abs/1811.00945).
  
  A model for producing engaging captions about an image. Given an image and
  this model will attempt to predict an appropriate
  next utterance in the dialog, in the context of a given personality.
  
  See the paper linked above for more information.
class_docstr_tok: ["Model","described","in","(","https",":","\/\/arxiv.org\/abs\/1811.00945",")",".","A","model","for","producing","engaging","captions","about","an","image",".","Given","an","image","and","this","model","will","attempt","to","predict","an","appropriate","next","utterance","in","the","dialog",",","in","the","context","of","a","given","personality",".","See","the","paper","linked","above","for","more","information","."]
docstr: Extract image features from the observations.
  
  :param obs:
      list of observations
  
  :return:
      list of image features
docstr_tok: ["Extract","image","features","from","the","observations",".",":","param","obs",":","list","of","observations",":","return",":","list","of","image","features"]
code: def extract_image_feats(self, obs):
      """
      Extract image features from the observations.
  
      :param obs:
          list of observations
  
      :return:
          list of image features
      """
      tmp_image_feats = [v.get("image") for v in obs]
      for i, im in enumerate(tmp_image_feats):
          try:
              # Check if given img features of form [1, <dim>, 1, 1]
              if len(im.size()) == 4:
                  tmp_image_feats[i] = im[0, :, 0, 0]
          except TypeError:  # No Image Feats Given
              tmp_image_feats[i] = self.blank_image_features
      image_feats = []
      for img in tmp_image_feats:
          image_feats.append(img.detach())
      return image_feats
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.agents import Agent
  from parlai.core.dict import DictionaryAgent
  from parlai.utils.misc import round_sigfigs
  from .modules import TransresnetModel
  from parlai.tasks.personality_captions.build import build
  from parlai.utils.io import PathManager
  import parlai.utils.torch
  import os
  import random
  import json
  import numpy
  import torch
  import tqdm
label_desc: Use image node_id 13 for calling the TransresnetAgent obj's underlying member method code with example usage: obj.extract_image_feats(obs) and returns: image_feats