class_docstr: Features generator for images.
  
  Uses ParlAI Image Loader.
class_docstr_tok: ["Features","generator","for","images",".","Uses","ParlAI","Image","Loader","."]
code: def __init__(self, opt: Opt, shared: TShared = None):
      self.opt = opt
      self.image_model = opt.get("image_mode")
      if shared:
          self.image_loader = shared["image_loader"]
      else:
          opt.setdefault("image_mode", self.image_model)
          new_opt = ParlaiParser(True, False).parse_args([])
          for k, v in new_opt.items():
              if k not in opt:
                  opt[k] = v
  
          self.image_loader = ImageLoader(opt)
  
imports: import base64
  import io
  from typing import Dict, Union
  import PIL
  import torch
  from parlai.core.image_featurizers import ImageLoader
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.utils.typing import TShared
label_desc: Use image node_id 1 to create a new ImageFeaturesGenerator object from inherited base classes: object with example: obj = ImageFeaturesGenerator(opt, shared)