Python script to create a confusion matrix using the ground truth and detection result annotations in VOC format saved in a text for each image. The confusion matrix is saved in a csv file.
Note: Check the input folder to see the expected input
Requires -
pandas
numpy
After moving the inputs just run
python main.py
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---|---|---|---|---|---|---|---|---|
9.998791964141088284e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 4.950252419806492991e-03 | 3.235077240413130641e-03 | 3.719683170880681844e-02 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
1.594703662542438279e-03 | 9.992292869760639462e-01 | 4.426989514189717811e-02 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 2.576626505603323292e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
1.594703662542438279e-03 | 9.252123027556147586e-03 | 9.739376931217378353e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 4.091651487968749890e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
1.594703662542438279e-03 | 0.000000000000000000e+00 | 2.213494757094858906e-02 | 9.999509888009114889e-01 | 0.000000000000000000e+00 | 1.859841585440340922e-02 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
1.594703662542438279e-03 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 4.950252419806492991e-03 | 9.996388672876573844e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 4.472135954999579277e-01 | 9.999500037496875104e-03 |
4.784110987627315272e-03 | 9.252123027556147586e-03 | 2.213494757094858767e-01 | 4.950252419806492991e-03 | 0.000000000000000000e+00 | 9.113223768657671142e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
1.435233296288194495e-02 | 3.700849211022459034e-02 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 1.859841585440340922e-02 | 9.662349396012462899e-01 | 0.000000000000000000e+00 | 0.000000000000000000e+00 |
0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 6.470154480826261281e-03 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 8.944271909999158554e-01 | 0.000000000000000000e+00 |
1.594703662542438279e-03 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 4.950252419806492991e-03 | 2.588061792330504512e-02 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 0.000000000000000000e+00 | 9.999500037496875660e-01 |