Hi,
Is there a way to find out the confidence score of top k_class or all the classes in nvdia pretrained classification model while doing inferencing
The “tao evaluate” will show
- Loss
- Top-K accuracy
- Precision (P): TP / (TP + FP)
- Recall (R): TP / (TP + FN)
- Confusion Matrix
See Image Classification — TAO Toolkit 3.22.05 documentation
For confidence score, you can try to follow Integrating TAO CV Models with Triton Inference Server — TAO Toolkit 3.22.05 documentation to run inference against the tensorrt engine.
Ok, going through the documentation I understood that we can even use Tensort to get the confidence score during inferencing. Now is there any documentation or code which i can refer.
So that i can take the classification base model, covert it into engine file and use it with python and while prediction i can print the confidence score
Yes, you can refer to the code in trition app.
Can you share some blog or code which i can refer to do the same
Actually you can use the triton github directly to run inference with the classification tensorrt engine.
For example,It will prompt below result. There is confidence score.
$ cat car_result/results.txt
car_images/1688141822_6SAA953.jpg, 0.9991(1)= largevehicle, 0.0006(2)= sedan, 0.0003(3)= suv, 0.0000(5)= van, 0.0000(4)= truck, 0.0000(0)= coupe
If you want to write standalone code, you can refer to above github or leverage some forum topics. For example, after searching in the forum, there are
Inferring resnet18 classification etlt model with python - #40 by Morganh
Error while running inference, model generated through TLT using Opencv-Python - #3 by Morganh
TAO tensorRT model inferencing using python
…
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.