Hi, recently I trained a classifier using DIGITS (LeNet) to classify license plate characters (31 characters and numbers). I got good accuracy of 98% and 0.1 loss.
When I test the model I got different prediction between DIGITS and jetson-inference on my Jetson Nano.
I resized the images to 28x28 and to gray scale with openCV before testing.
With this image I got 67,6% for class: “2” and 31,91% for class “X” running on DIGITS, but jetson-inference example give me 81.108% of class: “X”.
I tried switching between FP16 and FP32, traning with no mean substraction but nothing changed.
What could be the problems here?
In the preprocessing phase before prediction, what does DIGITS do?
A common issue comes from image pre-processing.
Please make sure the input image goes through the identical process as the training data in DIGITs.
For example, color format, input data type, mean subtraction.
If the issue goes on, please help to share a reproduce sample so we can check it for you.
Thanks.
I follow the same processes for training and testing. I converted the image to gray scale and resized them to 15x30 with openCV.
Therefore my data for training shared the same color format and size before going into DIGITS. And I’m training with no mean (Subtract mean = None).
Here is the link to my model, some sample images and the output logs of jetson-inference example:
I run the same test on my PC as well and the problem still persists. So I do not think jetpack version will solve my issue here.
I will upgrade to your latest jetpack and run it again. In the meantime could please reproduce this on your environment?
Because I use jetson-inference and DIGITS on my PC as well.
Have you checked the result from our latest JetPack version?
We try to check this issue but found the link only have model and test image.
Would you mind to share the source to generate the output based on your model with us?
If you are using jetson-inference, would you mind to share the detail command with us?
May I know what kind of pre-process you have applied in the DIGITs pipeline.
Have you applied any subtract-mean or normalization steps before feeding image into inference?
It looks like there is no extra pre-process in the jetson-inference flow, and this may cause the difference.