Calibration file


I want to know the difference between the “Calibration.tensor” file generated with
1 calibration_tensorfile
2 export from Int8 optimization

Thank you

See DetectNet_v2 — TAO Toolkit 3.21.11 documentation

I have gone through the documentation.
I want to know if the argument passed to --cal_data_file is the output generated from calibration_tensorfile command?

There are 3 options mentioned in DetectNet_v2 — TAO Toolkit 3.21.11 documentation
For option 1, calibration.tensor is generated using the calibration_tensorfile sub-task.
For option 2, the cal.tensorfile is auto generated during exporting.

The export tool can generate an INT8 calibration cache by ingesting training data using one of these options:

  • Option 1 : Providing a calibration tensorfile generated using the calibration_tensorfile task defined in DetectNet_v2. This command uses the data generators in the training pipeline to produce a drop of preprocessed batches of input images from the training dataset. Using this gives users the opportunity to maintain a record of the exact batches of the training data used to generate the calibration scale factors in the calibration cache file. However, this is a two-step process for generating an int8 cache file.
  • Option 2 : Pointing the tool to a directory of images that you want to use to calibrate the model. For this option, you will need to create a sub-sampled directory of random images that best represent your training dataset.
  • Option 3 : Using the training data loader directly to load the training images for INT8 calibration. This option is now the recommended approach as it helps to generate multiple random samples. This also ensures two important aspects of the data during calibration:
    • Data pre-processing in the INT8 calibration step is the same as in the training process.
    • The data batches are sampled randomly across the entire training dataset, thereby improving the accuracy of the int8 model.
    • Calibration occurs as a one-step process with the data batches being generated on the fly.

NVIDIA plans to eventually deprecate Option 1 and only support Options 2 and 3.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.