Discrepancy between results from tlt-infer and trt engine

For the preprocessing of a RGB image,

  1. do not change aspect_ratio, then resize(img.resize) the original image
  2. create(image.new) an image which corresponds to model input width/height
  3. paste(image.paste) (1) to (2)
  4. inf_img = np.array(inf_img).astype(np.float32)
    inference_input = preprocess_input(inf_img.transpose(2, 0, 1))

More, suggest you to run deepsteam inference to check the result firstly.
Make sure deepstream can run your trt engine correctly comparing to tlt-infer.