TensorRT scores and TensorFlow scores don't match.

I attended the webinar and downloaded the TensorRT package. It works on my TX2. I wanted to compare the TensorRT classification scores with those of the Tensorflow model.

I am working with inception_v3 model which was provided and used by the convert_plan.py.
The results of classifying the image data/images/lifeboat.jpg

  • with Tensorflow are:
    0 9.46784 626 lifeboat
    1 5.38329 815 speedboat
    2 5.22412 555 fireboat
    3 5.22268 511 container ship, containership, container vessel
    4 3.76027 409 amphibian, amphibious vehicle

  • with the TensorRT are:
    0 10.371737 626 lifeboat
    1 3.901006 415 backpack, back pack, knapsack, packsack, rucksack, haversack
    2 2.526643 815 speedboat
    3 2.167920 736 poncho
    4 2.089388 601 hook, claw

This seems like more than just a rounding error.
If the Tensorflow results were not as good as the TensorRT results I would be looking at the scripts I used to run Tensorflow, but since they appear better I felt impelled to ask.

I reformatted the outputs from classify_image.cu and included the scores to enable easy comparison with the Python script used to run Tensorflow.

Any thoughts. Any one.

Environment:
TX2
Ubuntu 16.04
JetPack-L4T-3.2-linux-x64_b196.run
TensorRT-3.0.4.Ubuntu-16.04.3.x86_64.cuda-9.0.cudnn7.0.tar.gz

Hi dbusby,

I saw the same results as you that you listed under TensorRT for both TensorFlow and TensorRT. In each scenario I used images in RGB format as input.

By removing the color conversion from BGR to RGB (in test_tf.py / classify_image.cu) I see results similar to those you listed under TensorFlow,

  1. lifeboat
  2. fireboat
  3. speedboat
  4. amphibian, amphibious vehicle
  5. container ship, containership, container vessel

I have opened an issue under the tf_to_trt_image_classification GitHub repository to track whether this issue is specific to inception_v3.

https://github.com/NVIDIA-Jetson/tf_to_trt_image_classification/issues/9

For now, you should see similar results similar to those you listed you listed by removing the colorspace conversion step.

John