class_docstr: Class which stores and runs defense.
docstr: Runs defense inside Docker.
  
  Args:
    input_dir: directory with input (adversarial images).
    output_dir: directory to write output (classification result).
docstr_tok: ["Runs","defense","inside","Docker",".","Args",":","input_dir",":","directory","with","input","(","adversarial","images",")",".","output_dir",":","directory","to","write","output","(","classification","result",")","."]
code: def run(self, input_dir, output_dir):
      """Runs defense inside Docker.
  
      Args:
        input_dir: directory with input (adversarial images).
        output_dir: directory to write output (classification result).
      """
      print("Running defense ", self.name)
      cmd = [
          self.docker_binary(),
          "run",
          "-v",
          "{0}:/input_images".format(input_dir),
          "-v",
          "{0}:/output_data".format(output_dir),
          "-v",
          "{0}:/code".format(self.directory),
          "-w",
          "/code",
          self.container,
          "./" + self.entry_point,
          "/input_images",
          "/output_data/result.csv",
      ]
      print(" ".join(cmd))
      subprocess.call(cmd)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import csv
  import json
  import os
  import subprocess
  import numpy
  from PIL import Image
label_desc: Use image node_id 1 for calling the Defense obj's underlying member method code with example usage: obj.run(input_dir, output_dir) without return types