How to generate calibration table for Yolov2 with TensorRT 7.0

Description

Deepstream 5.0 releases the int8 calib table for yolov3 but not yolov2.

With Deepstream 5.0, it is possible to generate a calib table for yolov2 and run it in int8 – below link was used.

But for DS5, which uses TRT 7 – there are some changes and the above generated calib table is not working.

I want to know how to generate the calib table for Yolov2 with TRT 7.

Environment

TensorRT Version: 7.0
GPU Type: Telsa T4
Nvidia Driver Version: 440.64.00
CUDA Version: 10.2.89
CUDNN Version:
Operating System + Version: Ubuntu 16.04.3 LTS
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Relevant Files

Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)

Steps To Reproduce

Please include:

  • Exact steps/commands to build your repro
  • Exact steps/commands to run your repro
  • Full traceback of errors encountered

Hi @andy.linluo,
Please refer to the below link to check for setting up the calibrator.
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleINT8#setup-the-calibrator
Also, please check if this link works for you

Thanks!

Thanks @AakankshaS. I need Yolo2 calibration table generated with TensorRT7. The calibration table you provided was generated by older version.

Hi ,
You can choose to provide the implementation for writeCalibrationCache() to write calibration table
Something like this
writeCalibrationCache(&(mCalibrationCache[0]), mCalibrationCache.size())

Thanks!