Unable to open file (File signature not found)

I am trying to export Frcnn resnet18 model to TensorRT.
Then I have error as

Traceback (most recent call last):
  File "/usr/local/bin/tlt-export", line 8, in <module>
    sys.exit(main())
  File "./common/magnet_export.py", line 206, in main
  File "./common/magnet_export.py", line 373, in magnet_export
  File "./common/utils.py", line 103, in get_decoded_filename
IOError: Invalid decryption. Unable to open file (File signature not found)

My command is as follows.

tlt-export resnet18_model.epoch14.tlt -k NHRvZzAwbHFncTk0MXJ0YmwwbXB1bGxhbnU6MjYzNzc2MDctYzQ5MC00NjkxLThkODAtODM0NDc3ZTRhNTNh -o /workspace/tlt-experiments/FasterRCNN/resnet18/resnet18_model.etlt --outputs rpn_out_class,rpn_out_regress,TF_reshape_2_class,TF_reshape_3_regr --export_module faster_rcnn --cal_data_file /workspace/tlt-experiments/FasterRCNN/resnet18/calibration.tensor --cal_image_dir /home/itc/NVIDIA-tlt/tlt-experiments/data/train/images --cal_batch_size 32 --batches 300 --data_type int8 --cal_cache_file /workspace/tlt-experiments/FasterRCNN/resnet18/calibration.bin --experiment_spec /home/itc/NVIDIA-tlt/tlt-experiments/FasterRCNN/resnet18/frcnn_kitti_retrain_spec.txt --max_batch_size 60

My config file is attached.
frcnn_kitti_retrain_spec.log (3.3 KB)

Please check if the key is correct.
Especially is it the key when to train your " resnet18_model.epoch14.tlt"?

My key is correct. I have only one key. Training frcnn doesn’t need Key. The command is tlt-train faster_rcnn -e frcnn_kitti_retrain_spec.txt

Frcnn needs key.
But it is set inside the the training spec(2nd line). So, please double check your training spec and set the correct one in it.

Yes you are right. I don’t set key there. Thanks.

Hi,

I have downloaded the tlt_peoplenet_vunpruned_v1.0 model using:

ngc registry model download-version nvidia/tlt_peoplenet:unpruned_v1.0

However, when I start my training using:

tlt-train detectnet_v2 --gpus 1 \
-r /workspace/nvidia_experiment/training_output \
-e /workspace/nvidia_experiment/pruned_retraining.config \
-n IFP_peoplenet_v1_epochs120_unpruned_iou7_3e4_1e6 \
-k MyPersonalKeyWhichIsRedactedHere

I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/tlt-train-g1", line 8, in <module>
    sys.exit(main())
  File "./common/magnet_train.py", line 47, in main
  File "<decorator-gen-2>", line 2, in main
  File "./detectnet_v2/utilities/timer.py", line 46, in wrapped_fn
  File "./detectnet_v2/scripts/train.py", line 667, in main
  File "./detectnet_v2/scripts/train.py", line 591, in run_experiment
  File "./detectnet_v2/scripts/train.py", line 476, in train_gridbox
  File "./detectnet_v2/scripts/train.py", line 286, in build_gridbox_model
  File "./detectnet_v2/model/detectnet_model.py", line 108, in construct_model
  File "./detectnet_v2/model/utilities.py", line 100, in model_io
  File "./common/utils.py", line 245, in decode_to_keras
IOError: Invalid decryption. Unable to open file (File signature not found). The key used to load the model is incorrect.

Any help will be much appreciated, thanks!

My training.config is attached.pruned_retraining.config.log (4.1 KB)

Please use below model load key

tlt_encode

Reference: Custom training PeopleNet model - #2 by Morganh

Please update the key ‘tlt_encode’ in the documentation

There is “tlt_encode” in Integrating TAO Models into DeepStream — TAO Toolkit 3.22.05 documentation

Yes, need to tell users more explicitly.