docstr: extract and resize images then write manifest files to disk.
docstr_tok: ["extract","and","resize","images","then","write","manifest","files","to","disk","."]
code: def run(self):
      """
      extract and resize images then write manifest files to disk.
      """
      cfg_file = os.path.join(
          os.path.dirname(os.path.realpath(__file__)), "train.cfg"
      )
      log_file = os.path.join(self.orig_out_dir, "train.log")
      manifest_list_cfg = ", ".join(
          [k + ":" + v for k, v in self.manifests.items()]
      )
  
      with open(cfg_file, "w") as f:
          f.write("manifest = [{}]\n".format(manifest_list_cfg))
          f.write("manifest_root = {}\n".format(self.out_dir))
          f.write("log = {}\n".format(log_file))
          f.write(
              "epochs = 90\nrng_seed = 0\nverbose = True\neval_freq = 1\n"
          )
  
      if (
          all(
              [
                  os.path.exists(manifest)
                  for manifest in self.manifests.values()
              ]
          )
          and not self.overwrite
      ):
          print(
              "Found manfiest files, skipping ingest, use --overwrite to overwrite them."
          )
          return
  
      for setn, manifest in self.manifests.items():
          pairs = self.train_or_val_pairs(setn)
          records = [
              (os.path.relpath(fname, self.out_dir), int(tgt))
              for fname, tgt in pairs
          ]
          records.insert(0, ("@FILE", "STRING"))
          np.savetxt(manifest, records, fmt="%s\t%s")
  
imports: from builtins import str, zip
  from configargparse import ArgParser
  from itertools import repeat
  from neon import logger
  from neon.util.persist import ensure_dirs_exist
  from PIL import Image
  import logging
  import multiprocessing
  import numpy
  import os
  import re
  import shutil
  import tarfile
  import tqdm
  import zlib
label_desc: Use image node_id 5 for calling the IngestI1K obj's underlying member method code with example usage: obj.run() without return types