Confusion Matrix Details in Classification Report

• Hardware:T4
• Network Type Classification)
• TLT Version (Please run “tlt info --verbose” and share “docker_tag” here)
Configuration of the TLT Instance
dockers: [‘nvidia/tlt-streamanalytics’, ‘nvidia/tlt-pytorch’]
format_version: 1.0
tlt_version: 3.0
published_date: 04/16/2021

Hi,

I have trained a classification network using efficientnetb1 and the example Notebook provided by NVIDIA inside the docker. When I evaluate it the confusion matrix I get is not completed. Do you know if it is stored somewhere or how can I get it?

Confusion Matrix
[[132 0 0 … 0 0 0]
[ 0 119 0 … 0 0 0]
[ 0 0 130 … 0 0 0]

[ 0 0 0 … 127 0 0]
[ 0 0 0 … 0 197 0]
[ 0 0 0 … 0 0 128]]

Regards,
Alberto

What do you mean by “the confusion matrix I get is not completed” ? Do you mean you want to get a full numpy array?

Hi,

Yes, that is what I meant. Is it possible to get that full numpy array?

Best regards,
Alberto

How many classes did you train? Actually for VOC dataset(20 classes), it can get full numpy array.

Hi,

I trained 130 classes.

Regards,
Alberto

OK, TLT Classification does not print full numpy array for ‘Confusion Matrix’. So, if the classes is larger, thus, the numpy array is printed as above.
But, you can see the info of ‘Classification Report’ . It is calculated based on ‘Confusion Matrix’.
You can use ‘Classification Report’ instead.

Hi,

OK, thank you. Classification report is not enought though, as I need a class by class comparison as some classes are similar. I will try to use the testing part that generates a csv file and see if that can be used to get that matrix.

Best Regards,
Alberto