-
check_missing_files
(folder, image_list, no_label_image=False) Checks missing files.
- Parameters
folder – The root image folder.
image_list – A list of image names to check.
no_label_image – To check for label file or not.
- Returns
A list of missing file name if any.
-
check_if_exists
(image, label)
-
main
()
DLMed script for converting dicom files.
-
contain_dicom
(path)
-
get_dicom_dir_list
(source_dir)
-
get_image_file_list
(source_dir, ext)
-
resample_image
(img, tgt_res)
-
standardize_ext
(ext)
-
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=5, is_dynamic_op=False, minimum_segment_size=50, trt_precision_mode='FP32') 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
- Parameters
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
- Returns
full names of the frozen and TRT-optimized files
-
main
()
-
normalize_string
(item_data, item_name)