Detectnetv2 resnet18/resnet10 on jetson nano.

Although I was able to successfully run pruned detectnetv2 resnet10 model on nano platform with deepstream, I had difficulties when trying to convert(tlt-convert) and run resnet18 pruned models on nano. The tlt-convert tool is unable to generate the required engine ang crashes mid-way giving memory related faults. How to run resnet18 model on nano. Also, the example spec file in for tlt-training is for resnet18. What kind of changes are to be done to consume it optimally for resnet10 so that model accuracies for both of them remain as equivalent as possible.

Move this topic from DS forum into TLT forum.

Hi neophyte1,
The tlt-convert should generate trt engine without crash. If you meet OOM issue, please increase “-w” option or set smaller “-m” and “-b”

optional flag arguments:
  -b            calibration batch size (default 8)
  -c            calibration cache file (default cal.bin)
  -e            file the engine is saved to (default saved.engine)
  -i            input dimension ordering -- nchw, nhwc, nc (default nchw)
  -m            maximum TensorRT engine batch size (default 16)
  -o            comma separated list of output node names (default none)
  -t            TensorRT data type -- fp32, fp16, int8 (default fp32)
  -w            maximum workspace size of TensorRT engine (default 1<<30)

For example,
I can generate fp16 trt engine based on an unpruned etlt model.

./tlt-converter  detectnet_unpruned_fp16.etlt \
               -k  mykey \
               -o output_cov/Sigmoid,output_bbox/BiasAdd \
               -d 3,384,1248 \
               -i nchw \
               -m 16 -t fp16 \
               -e detectnet_unpruned_fp16.engine \
               -b 8

If you run resnet18 ,please download resnet18.hdf5 and set something as below in spec file, and train a tlt model.

model_config {
  pretrained_model_file: "/workspace/tlt-experiments/resnet18.hdf5"
  num_layers: 18

If you run resnet10 ,please download resnet10.hdf5 and set something as below in spec file, and train another tlt model.

model_config {
  pretrained_model_file: "/workspace/tlt-experiments/resnet10.hdf5"
  num_layers: 10