|
9 | 9 | from sklearn.metrics import cohen_kappa_score as cks |
10 | 10 | from sklearn.metrics import matthews_corrcoef as mcc |
11 | 11 |
|
12 | | -# panoptic quality |
13 | | -pq_pred1 = np.zeros([21, 21]) |
14 | | -pq_pred1[5:7, 2:5] = 1 |
15 | | -pq_pred2 = np.zeros([21, 21]) |
16 | | -pq_pred2[14:18, 4:6] = 1 |
17 | | -pq_pred2[16, 3] = 1 |
18 | | -pq_pred3 = np.zeros([21, 21]) |
19 | | -pq_pred3[14:18, 7:12] = 1 |
20 | | -pq_pred4 = np.zeros([21, 21]) |
21 | | -pq_pred4[2:8, 13:16] = 1 |
22 | | -pq_pred4[2:4, 12] = 1 |
| 12 | +# Data for panoptic quality Figure 3.51 p96 |
| 13 | +pq_pred1 = np.zeros([18, 18]) |
| 14 | +pq_pred1[ 3:7,1:3] = 1 |
| 15 | +pq_pred1[3:6,3:7]=1 |
| 16 | +pq_pred2 = np.zeros([18, 18]) |
| 17 | +pq_pred2[13:16,4:6] = 1 |
| 18 | +pq_pred3 = np.zeros([18, 18]) |
| 19 | +pq_pred3[7:12,13:17] = 1 |
| 20 | +pq_pred4 = np.zeros([18, 18]) |
| 21 | +pq_pred4[13:15,13:17] = 1 |
| 22 | +pq_pred4[15,15] = 1 |
23 | 23 |
|
24 | | -pq_ref1 = np.zeros([21, 21]) |
25 | | -pq_ref1[8:11, 3] = 1 |
26 | | -pq_ref1[9, 2:5] = 1 |
27 | | -pq_ref2 = np.zeros([21, 21]) |
28 | | -pq_ref2[14:19, 7:13] = 1 |
29 | | -pq_ref3 = np.zeros([21, 21]) |
30 | | -pq_ref3[2:7, 14:17] = 1 |
31 | | -pq_ref3[2:4, 12:14] = 1 |
| 24 | +pq_ref1 = np.zeros([18, 18]) |
| 25 | +pq_ref1[2:7, 1:3] = 1 |
| 26 | +pq_ref1[2:5,3:6] = 1 |
| 27 | +pq_ref2 = np.zeros([18, 18]) |
| 28 | +pq_ref2[6:12,12:17] = 1 |
| 29 | +pq_ref3 = np.zeros([18, 18]) |
| 30 | +pq_ref3[14:15:,7:10] = 1 |
| 31 | +pq_ref3[13:16,8:9] = 1 |
32 | 32 |
|
33 | 33 |
|
34 | 34 | def test_mismatch_category(): |
|
0 commit comments