nvmidl.apps package

DLMed script for converting dicom files.

get_image_file_list(source_dir, ext)
resample_image(img, tgt_res)
export(model_name, model_file_format, model_file_path, input_node_names, output_node_names, sm_tags='inference', checkpoint_ext='.ckpt', meta_file_ext='.meta', regular_frozen_file_ext='.fzn.pb', trt_file_ext='.trt.pb', max_batch_size=4, is_dynamic_op=False, minimum_segment_size=50, trt_precision_mode='FP32', trtis_export=False, trtis_model_name='tlt_model', trtis_input_shape=None)

Export/convert a specified checkpoint to TRT-optimized frozen graph file

A checkpoint contains 3 files. The names of the 3 files for model ‘foo’ are named like these:

The graph meta file: foo.ckpt.meta The data/weight file: foo.ckpt.data An index file: foo.ckpt.index

The generated regular frozen file name: foo.fzn.pb The generated TRT file name: foo.trt.pb

  • minimum_segment_size – minimum segment size to be used for TRT optimization

  • sm_tags – meta tags for saved model format

  • model_file_format – model file format: CKPT (checkpoint) or SM (saved model)

  • is_dynamic_op – whether to use dynamic mode when trt-optimizing graph

  • max_batch_size – maximum batch size allowed by the TRT graph

  • model_name – name of the model

  • model_file_path – file directory that contains model files

  • input_node_names – comma separated input node names in the graph

  • output_node_names – comma separated output node names in the graph

  • checkpoint_ext – file extension of the checkpoint files

  • meta_file_ext – file extension of the graph meta file

  • regular_frozen_file_ext – file extension of the regular frozen graph file

  • trt_file_ext – file extension of the TRT-optimized graph file

  • trt_precision_mode – precision mode of the TRT optimization

  • trtis_export – bool for requesting generate config.pbtxt for TRTIS

  • trtis_model_name – Unique model name for TRTIS

  • trtis_input_shape – list or tuple to specifiy concrete input shape


full names of the frozen and TRT-optimized files

normalize_string(item_data, item_name)
trtis_config(meta_file, ckpt_file, trtis_model_name, output_path='.', max_batch_size=1, trtis_input_shape=None)

Generate config.pbtxt for TRTIS

  • meta_file – Full path to checkpoint metafile

  • ckpt_file – Full path to checkpoint datafile

  • trtis_model_name – A unique model name inside one TRTIS instance

  • output_path – Optional string to store config.pbtxt

  • max_batch_size – Optional parameter for TRTIS to allocate necessary workspace

generate_mmar(dest_path, task, include_fl, include_automl)
class TrainEnv(mmar_root, wf_config_file_name, env_config_file_name, log_config_file_name, kv_list)

Bases: object

train(e: nvmidl.apps.mp_train.TrainEnv)
© Copyright 2020, NVIDIA. Last updated on Feb 2, 2023.