TAO v5.5.0

从 TAO 4.0.x 迁移到 TAO 5.0.0

要迁移到 TAO 5.0.0,您必须首先将 TAO 工作流程升级到 TAO 4.0.0。请按照这些说明从旧版本的 TAO(以前名为“Transfer Learning Toolkit”)升级到 4.0.x 版本。

在 5.0.0 版本中,TAO 引入了 task_group 的概念,它是一个可以与特定模态关联的任务集合。以下是支持的模态:

  • 模型

  • 数据集

  • 部署

4.0.x 版本之前作为任务包含的所有模型现在都归类在 model 任务组下。作为 tao-deploy CLI 一部分包含的所有任务现在都归类在 deploy 任务组下。

task_group dataset 已在 TAO 5.0.0 中引入。它包括任务和相关的子任务,这些任务和子任务有助于从原始图像生成标签 (autolabel)、检查和验证预先存在的已标注数据集 (analytics)、将预先存在的已标注数据集 (annotation) 从一种格式转换为另一种格式(例如,从 KITTI 转换为 COCO),以及通过运行离线增强 (augmentation) 来增强数据集。

有关 dataset 任务组的更多信息,请参阅数据服务章节。

下表总结了 CLI 中预期的更改。这不是所有操作的详尽列表,但这些更改可以推广到作为 TAO 4.0.x 一部分包含的所有网络。

网络

TAO 4.0.x

TAO 5.0.x

分类
复制
已复制!
            

tao classification_tf1 export \ -m $USER_EXPERIMENT_DIR/output_retrain/weights/resnet_$EPOCH.tlt \ -o $USER_EXPERIMENT_DIR/export/final_model.etlt \ -k $KEY \ --classmap_json $USER_EXPERIMENT_DIR/output_retrain/classmap.json \ --gen_ds_config tao-deploy classification_tf1 gen_trt_engine \ -m $USER_EXPERIMENT_DIR/export/final_model.etlt \ -e $SPECS_DIR/classification_retrain_spec.cfg \ -k $KEY \ --batch_size 64 \ --max_batch_size 64 \ --batches 10 \ --data_type int8 \ --cal_data_file $USER_EXPERIMENT_DIR/export/calibration.tensor \ --cal_cache_file $USER_EXPERIMENT_DIR/export/final_model_int8_cache.bin \ --cal_image_dir $DATA_DOWNLOAD_DIR/split/test/ \ --engine_file $USER_EXPERIMENT_DIR/export/final_model.trt

复制
已复制!
            

tao model classification_tf1 export \ -m $USER_EXPERIMENT_DIR/output_retrain/weights/resnet_$EPOCH.hdf5 \ -o $USER_EXPERIMENT_DIR/export/final_model.onnx \ -k $KEY \ --classmap_json $USER_EXPERIMENT_DIR/output_retrain/classmap.json \ --gen_ds_config tao deploy classification_tf1 gen_trt_engine \ -m $USER_EXPERIMENT_DIR/export/final_model.onnx \ -e $SPECS_DIR/classification_retrain_spec.cfg \ -k $KEY \ --batch_size 64 \ --max_batch_size 64 \ --batches 10 \ --data_type int8 \ --cal_data_file $USER_EXPERIMENT_DIR/export/calibration.tensor \ --cal_cache_file $USER_EXPERIMENT_DIR/export/final_model_int8_cache.bin \ --cal_image_dir $DATA_DOWNLOAD_DIR/split/test/ \ --engine_file $USER_EXPERIMENT_DIR/export/final_model.trt

DetectNet_v2
复制
已复制!
            

tao detectnet_v2 export \ -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/resnet18_detector_pruned.tlt \ -e $SPECS_DIR/detectnet_v2_retrain_resnet18_kitti.txt \ -o $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.etlt \ -k $KEY \ --gen_ds_config tao-deploy detectnet_v2 gen_trt_engine \ -m $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.etlt \ -k $KEY \ --data_type int8 \ --batches 10 \ --batch_size 4 \ --max_batch_size 64 \ --engine_file $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.trt.int8 \ --cal_cache_file $USER_EXPERIMENT_DIR/experiment_dir_final/calibration.bin \ -e $SPECS_DIR/detectnet_v2_retrain_resnet18_kitti.txt \ --verbose

复制
已复制!
            

tao model detectnet_v2 export \ -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/resnet18_detector_pruned.hdf5 \ -e $SPECS_DIR/detectnet_v2_retrain_resnet18_kitti.txt \ -o $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.onnx \ -k $KEY \ --gen_ds_config tao deploy detectnet_v2 gen_trt_engine \ -m $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.onnx \ -k $KEY \ --data_type int8 \ --batches 10 \ --batch_size 4 \ --max_batch_size 64 \ --engine_file $USER_EXPERIMENT_DIR/experiment_dir_final/resnet18_detector.trt.int8 \ --cal_cache_file $USER_EXPERIMENT_DIR/experiment_dir_final/calibration.bin \ -e $SPECS_DIR/detectnet_v2_retrain_resnet18_kitti.txt \ --verbose

EfficientDet
复制
已复制!
            

tao efficientdet_tf1 export -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.tlt \ -o $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.etlt \ -k $KEY \ -e $SPECS_DIR/efficientdet_d0_retrain.txt tao-deploy efficientdet_tf1 gen_trt_engine -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.etlt \ -k $KEY \ --batch_size 8 \ --data_type int8 \ --cal_image_dir $DATA_DOWNLOAD_DIR/raw-data/val2017 \ --batches 10 \ --min_batch_size 1 \ --opt_batch_size 8 \ --max_batch_size 16 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/efficientdet_d0.cal \ --engine_file $USER_EXPERIMENT_DIR/export/trt.int8.engine

复制
已复制!
            

tao model efficientdet_tf1 export -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.hdf5 \ -o $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.onnx \ -k $KEY \ -e $SPECS_DIR/efficientdet_d0_retrain.txt tao deploy efficientdet_tf1 gen_trt_engine -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/model.step-$NUM_STEP.onnx \ -k $KEY \ --batch_size 8 \ --data_type int8 \ --cal_image_dir $DATA_DOWNLOAD_DIR/raw-data/val2017 \ --batches 10 \ --min_batch_size 1 \ --opt_batch_size 8 \ --max_batch_size 16 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/efficientdet_d0.cal \ --engine_file $USER_EXPERIMENT_DIR/export/trt.int8.engine

SSD
复制
已复制!
            

tao ssd export --gpu_index=$GPU_INDEX \ -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/ssd_resnet18_epoch_$EPOCH.tlt \ -k $KEY \ -o $USER_EXPERIMENT_DIR/export/ssd_resnet18_epoch_$EPOCH.etlt \ -e $SPECS_DIR/ssd_retrain_resnet18_kitti.txt \ --batch_size 16 \ --gen_ds_config tao-deploy ssd gen_trt_engine --gpu_index=$GPU_INDEX \ -m $USER_EXPERIMENT_DIR/export/ssd_resnet18_epoch_$EPOCH.etlt \ -k $KEY \ -e $SPECS_DIR/ssd_retrain_resnet18_kitti.txt \ --engine_file $USER_EXPERIMENT_DIR/export/trt.engine \ --cal_image_dir $DATA_DOWNLOAD_DIR/testing/image_2 \ --data_type int8 \ --max_batch_size 16 \ --batch_size 16 \ --batches 10 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/cal.bin \ --cal_data_file $USER_EXPERIMENT_DIR/export/cal.tensorfile

复制
已复制!
            

tao model ssd export --gpu_index=$GPU_INDEX \ -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/ssd_resnet18_epoch_$EPOCH.hdf5 \ -k $KEY \ -o $USER_EXPERIMENT_DIR/export/ssd_resnet18_epoch_$EPOCH.onnx \ -e $SPECS_DIR/ssd_retrain_resnet18_kitti.txt \ --batch_size 16 \ --gen_ds_config tao deploy ssd gen_trt_engine --gpu_index=$GPU_INDEX \ -m $USER_EXPERIMENT_DIR/export/ssd_resnet18_epoch_$EPOCH.onnx \ -k $KEY \ -e $SPECS_DIR/ssd_retrain_resnet18_kitti.txt \ --engine_file $USER_EXPERIMENT_DIR/export/trt.engine \ --cal_image_dir $DATA_DOWNLOAD_DIR/testing/image_2 \ --data_type int8 \ --max_batch_size 16 \ --batch_size 16 \ --batches 10 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/cal.bin \ --cal_data_file $USER_EXPERIMENT_DIR/export/cal.tensorfile

UNet
复制
已复制!
            

tao unet export --gpu_index=$GPU_INDEX -m $USER_EXPERIMENT_DIR/isbi_experiment_retrain/weights/model_isbi_retrained.tlt \ -k $KEY \ -e $SPECS_DIR/unet_train_resnet_unet_isbi_retrain.txt \ --gen_ds_config tao-deploy unet gen_trt_engine --gpu_index=$GPU_INDEX -m $USER_EXPERIMENT_DIR/isbi_experiment_retrain/weights/model_isbi_retrained.etlt \ -k $KEY \ -e $SPECS_DIR/unet_train_resnet_unet_isbi_retrain.txt \ --data_type int8 \ --engine_file $USER_EXPERIMENT_DIR/export/int8.isbi.retrained.engine \ --data_type int8 \ --cal_data_file $USER_EXPERIMENT_DIR/export/isbi_cal_data_file.txt \ --cal_cache_file $USER_EXPERIMENT_DIR/export/isbi_cal.bin \ --cal_image_dir $DATA_DOWNLOAD_DIR/isbi/images/val \ --max_batch_size 3 \ --batch_size 1

复制
已复制!
            

tao model unet export --gpu_index=$GPU_INDEX -m $USER_EXPERIMENT_DIR/isbi_experiment_retrain/weights/model_isbi_retrained.tlt \ -k $KEY \ -e $SPECS_DIR/unet_train_resnet_unet_isbi_retrain.txt \ --gen_ds_config tao deploy unet gen_trt_engine --gpu_index=$GPU_INDEX -m $USER_EXPERIMENT_DIR/isbi_experiment_retrain/weights/model_isbi_retrained.onnx \ -k $KEY \ -e $SPECS_DIR/unet_train_resnet_unet_isbi_retrain.txt \ --data_type int8 \ --engine_file $USER_EXPERIMENT_DIR/export/int8.isbi.retrained.engine \ --data_type int8 \ --cal_data_file $USER_EXPERIMENT_DIR/export/isbi_cal_data_file.txt \ --cal_cache_file $USER_EXPERIMENT_DIR/export/isbi_cal.bin \ --cal_image_dir $DATA_DOWNLOAD_DIR/isbi/images/val \ --max_batch_size 3 \ --batch_size 1

YOLOv3
复制
已复制!
            

tao yolo_v3 export -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/yolov3_resnet18_epoch_$EPOCH.tlt \ -k $KEY \ -o $USER_EXPERIMENT_DIR/export/yolov3_resnet18_epoch_$EPOCH.etlt \ -e $SPECS_DIR/yolo_v3_retrain_resnet18_tfrecord.txt \ --gen_ds_config tao-deploy yolo_v3 gen_trt_engine -m $USER_EXPERIMENT_DIR/export/yolov3_resnet18_epoch_$EPOCH.etlt \ -k $KEY \ -e $SPECS_DIR/yolo_v3_retrain_resnet18_tfrecord.txt \ --cal_image_dir $DATA_DOWNLOAD_DIR/testing/image_2 \ --data_type int8 \ --batch_size 16 \ --min_batch_size 1 \ --opt_batch_size 8 \ --max_batch_size 16 \ --batches 10 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/cal.bin \ --cal_data_file $USER_EXPERIMENT_DIR/export/cal.tensorfile \ --engine_file $USER_EXPERIMENT_DIR/export/trt.engine.int8

复制
已复制!
            

tao model yolo_v3 export -m $USER_EXPERIMENT_DIR/experiment_dir_retrain/weights/yolov3_resnet18_epoch_$EPOCH.hdf5 \ -k $KEY \ -o $USER_EXPERIMENT_DIR/export/yolov3_resnet18_epoch_$EPOCH.onnx \ -e $SPECS_DIR/yolo_v3_retrain_resnet18_tfrecord.txt \ --gen_ds_config tao deploy yolo_v3 gen_trt_engine -m $USER_EXPERIMENT_DIR/export/yolov3_resnet18_epoch_$EPOCH.onnx \ -k $KEY \ -e $SPECS_DIR/yolo_v3_retrain_resnet18_tfrecord.txt \ --cal_image_dir $DATA_DOWNLOAD_DIR/testing/image_2 \ --data_type int8 \ --batch_size 16 \ --min_batch_size 1 \ --opt_batch_size 8 \ --max_batch_size 16 \ --batches 10 \ --cal_cache_file $USER_EXPERIMENT_DIR/export/cal.bin \ --cal_data_file $USER_EXPERIMENT_DIR/export/cal.tensorfile \ --engine_file $USER_EXPERIMENT_DIR/export/trt.engine.int8

上一篇 迁移到 TAO 5.5
下一篇 从 TAO 3.x 迁移到 TAO 4.0
© 版权所有 2024,NVIDIA。 上次更新于 2024 年 10 月 15 日。