Examples of more diverse usage of TensorRT IInt8Calibrator available elsewhere?

Examining the samples provided by Nvidia for TensorRT, I have been a little unclear on how exactly the calibration process is working, especially given that there is only one given implementation of it in the INT8 sample. This one uses a binary batch file, but is there a way to implement it using jpegs or other color image formats as the inputs?

More broadly, is anyone else aware of good example code showing the INT8 calibration process?