code: # -----------------------------------------
  # python modules
  # -----------------------------------------
  from importlib import import_module
  from easydict import EasyDict as edict
  import torch.backends.cudnn as cudnn
  import sys
  import numpy as np
  import os
  
  # stop python from writing so much bytecode
  sys.dont_write_bytecode = True
  sys.path.append(os.getcwd())
  np.set_printoptions(suppress=True)
  
  # -----------------------------------------
  # custom modules
  # -----------------------------------------
  from lib.imdb_util import *
  
  
  def parse_args(argv):
      from getopt import getopt
      opts, args = getopt(argv, '', ['config=', 'weight=', 'outdir='])
      # defaults (trainval split #1)
      conf_path = 'weights/M3D-RPN-Release/m3d_rpn_depth_aware_val1_config.pkl'
      weights_path = 'weights/M3D-RPN-Release/m3d_rpn_depth_aware_val1'
      outdir = None
      # read opts
      for opt, arg in opts:
          if opt in ('--config'):
              conf_path = arg
          if opt in ('--weight'):
              weights_path = arg
          if opt in ('--outdir'):
              outdir = arg
  
      if outdir is None:
          # if --outdir option is not used, give the weight file name to output directory
          outdir = os.path.basename(weights_path)
  
      return conf_path, weights_path, outdir
  
  
  conf_path, weights_path, outdir = parse_args(sys.argv[1:])
  print()
  print('CONFIG: {}'.format(conf_path))
  print('WEIGHT: {}'.format(weights_path))
  print('OUTDIR: {}'.format(outdir))
  print()
  
  # load config
  conf = edict(pickle_read(conf_path))
  conf.pretrained = None
  
  data_path = os.path.join(os.getcwd(), 'data')
  results_path = os.path.join('output', outdir, 'data')
  
  # make directory
  mkdir_if_missing(results_path, delete_if_exist=True)
  
  # -----------------------------------------
  # torch defaults
  # -----------------------------------------
  
  # defaults
  init_torch(conf.rng_seed, conf.cuda_seed)
  
  # -----------------------------------------
  # setup network
  # -----------------------------------------
  
  # net
  net = import_module('models.' + conf.model).build(conf)
  
  # load weights
  load_weights(net, weights_path, remove_module=True)
  
  # switch modes for evaluation
  net.eval()
  
  print(pretty_print('conf', conf))
  
  # -----------------------------------------
  # test kitti
  # -----------------------------------------
  
  test_kitti_3d(conf.dataset_test, net, conf, results_path, data_path, use_log=False)
apis: numpy.set_printoptions