franzi2505 commited on
Commit
f28256c
Β·
2 Parent(s): dd0aa4a 8671b89

Merge branch 'main' of https://huggingface.co/spaces/SEA-AI/PanopticQuality

Browse files
Files changed (1) hide show
  1. README.md +149 -46
README.md CHANGED
@@ -29,55 +29,153 @@ To get started with PanopticQuality, make sure you have the necessary dependenci
29
  >>> models=MODEL_FIELD,
30
  >>> sequence_list=["Trip_55_Seq_2", "Trip_197_Seq_1", "Trip_197_Seq_68"],
31
  >>> excluded_classes=[""]).payload
32
- >>> module = evaluate.load("SEA-AI/PanopticQuality")
33
  >>> module.add_payload(payload, model_name=MODEL_FIELD[0])
34
  >>> module.compute()
35
  100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:03<00:00, 1.30s/it]
36
  Added data ...
37
  Start computing ...
38
  Finished!
39
- {'scores': {'MOTORBOAT': [0.18632257426639526,
40
- 0.698709617058436,
41
- 0.2666666805744171],
42
- 'FAR_AWAY_OBJECT': [0.0, 0.0, 0.0],
43
- 'SAILING_BOAT_WITH_CLOSED_SAILS': [0.0, 0.0, 0.0],
44
- 'SHIP': [0.3621737026917471, 0.684105846616957, 0.529411792755127],
45
- 'WATERCRAFT': [0.0, 0.0, 0.0],
46
- 'SPHERICAL_BUOY': [0.0, 0.0, 0.0],
47
- 'FLOTSAM': [0.0, 0.0, 0.0],
48
- 'SAILING_BOAT_WITH_OPEN_SAILS': [0.0, 0.0, 0.0],
49
- 'CONTAINER': [0.0, 0.0, 0.0],
50
- 'PILLAR_BUOY': [0.0, 0.0, 0.0],
51
- 'AERIAL_ANIMAL': [0.0, 0.0, 0.0],
52
- 'HUMAN_IN_WATER': [0.0, 0.0, 0.0],
53
- 'WOODEN_LOG': [0.0, 0.0, 0.0],
54
- 'MARITIME_ANIMAL': [0.0, 0.0, 0.0],
55
- 'WATER': [0.9397601008415222, 0.9397601008415222, 1.0],
56
- 'SKY': [0.9674496332804362, 0.9674496332804362, 1.0],
57
- 'LAND': [0.30757412078761204, 0.8304501533508301, 0.37037035822868347],
58
- 'CONSTRUCTION': [0.0, 0.0, 0.0],
59
- 'OWN_BOAT': [0.0, 0.0, 0.0],
60
- 'ALL': [0.14543579641409013, 0.21686712374464112, 0.16665520166095935]},
61
- 'numbers': {'MOTORBOAT': [6, 15, 18, 4.1922577023506165],
62
- 'FAR_AWAY_OBJECT': [0, 8, 9, 0.0],
63
- 'SAILING_BOAT_WITH_CLOSED_SAILS': [0, 2, 0, 0.0],
64
- 'SHIP': [9, 1, 15, 6.156952619552612],
65
- 'WATERCRAFT': [0, 9, 12, 0.0],
66
- 'SPHERICAL_BUOY': [0, 4, 22, 0.0],
67
- 'FLOTSAM': [0, 0, 1, 0.0],
68
- 'SAILING_BOAT_WITH_OPEN_SAILS': [0, 6, 0, 0.0],
69
- 'CONTAINER': [0, 0, 0, 0.0],
70
- 'PILLAR_BUOY': [0, 0, 9, 0.0],
71
- 'AERIAL_ANIMAL': [0, 0, 0, 0.0],
72
- 'HUMAN_IN_WATER': [0, 0, 0, 0.0],
73
- 'WOODEN_LOG': [0, 0, 0, 0.0],
74
- 'MARITIME_ANIMAL': [0, 0, 0, 0.0],
75
- 'WATER': [15, 0, 0, 14.096401512622833],
76
- 'SKY': [15, 0, 0, 14.511744499206543],
77
- 'LAND': [5, 9, 8, 4.15225076675415],
78
- 'CONSTRUCTION': [0, 0, 0, 0.0],
79
- 'OWN_BOAT': [0, 0, 8, 0.0],
80
- 'ALL': [50, 54, 102, 43.109607100486755]}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ```
82
 
83
  ## Metric Settings
@@ -114,19 +212,24 @@ The metric takes four optional input parameters: __label2id__, __stuff__, __per_
114
  Setting this to False will aggregate the results (average the _scores_, sum up the _numbers_; see below for explanation of _scores_ and _numbers_)
115
  * `split_sq_rq: bool = True`: By default, the PQ-score is returned in three parts: the PQ score itself, and split into the segmentation quality (SQ) and recognition quality (RQ) part.
116
  Setting this to False will return the PQ score only (PQ=RQ*SQ).
 
 
 
 
117
 
118
  ## Output Values
119
  A dictionary containing the following keys:
120
  * __scores__: This is a dictionary, that contains a key for each label, if `per_class == True`. Otherwise it only contains the key _all_.
121
- For each key, it contains a list that holds the scores in the following order: PQ, SQ and RQ. If `split_sq_rq == False`, the list consists of PQ only.
 
122
  * __numbers__: This is a dictionary, that contains a key for each label, if `per_class == True`. Otherwise it only contains the key _all_.
123
- For each key, it contains a list that consists of four elements: TP, FP, FN and IOU:
124
  * __TP__: number of true positive predictions
125
  * __FP__: number of false positive predictions
126
  * __FN__: number of false negative predictions
127
  * __IOU__: sum of IOU of all TP predictions with ground truth
128
 
129
- With all these values, it is possible to calculate the final scores.
130
 
131
  ## Further References
132
 
 
29
  >>> models=MODEL_FIELD,
30
  >>> sequence_list=["Trip_55_Seq_2", "Trip_197_Seq_1", "Trip_197_Seq_68"],
31
  >>> excluded_classes=[""]).payload
32
+ >>> module = evaluate.load("SEA-AI/PanopticQuality", area_rng=[(0, 100),(100, 1e9)])
33
  >>> module.add_payload(payload, model_name=MODEL_FIELD[0])
34
  >>> module.compute()
35
  100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:03<00:00, 1.30s/it]
36
  Added data ...
37
  Start computing ...
38
  Finished!
39
+ {'scores': {'MOTORBOAT': array([[0. , 0.25889117],
40
+ [0. , 0.79029936],
41
+ [0. , 0.3275862 ]]),
42
+ 'FAR_AWAY_OBJECT': array([[0., 0.],
43
+ [0., 0.],
44
+ [0., 0.]]),
45
+ 'SAILING_BOAT_WITH_CLOSED_SAILS': array([[0. , 0.35410052],
46
+ [0. , 0.75246359],
47
+ [0. , 0.47058824]]),
48
+ 'SHIP': array([[0. , 0.47743301],
49
+ [0. , 0.90181785],
50
+ [0. , 0.52941179]]),
51
+ 'WATERCRAFT': array([[0., 0.],
52
+ [0., 0.],
53
+ [0., 0.]]),
54
+ 'SPHERICAL_BUOY': array([[0., 0.],
55
+ [0., 0.],
56
+ [0., 0.]]),
57
+ 'FLOTSAM': array([[0., 0.],
58
+ [0., 0.],
59
+ [0., 0.]]),
60
+ 'SAILING_BOAT_WITH_OPEN_SAILS': array([[0., 0.],
61
+ [0., 0.],
62
+ [0., 0.]]),
63
+ 'CONTAINER': array([[0., 0.],
64
+ [0., 0.],
65
+ [0., 0.]]),
66
+ 'PILLAR_BUOY': array([[0., 0.],
67
+ [0., 0.],
68
+ [0., 0.]]),
69
+ 'AERIAL_ANIMAL': array([[0., 0.],
70
+ [0., 0.],
71
+ [0., 0.]]),
72
+ 'HUMAN_IN_WATER': array([[0., 0.],
73
+ [0., 0.],
74
+ [0., 0.]]),
75
+ 'WOODEN_LOG': array([[0., 0.],
76
+ [0., 0.],
77
+ [0., 0.]]),
78
+ 'MARITIME_ANIMAL': array([[0., 0.],
79
+ [0., 0.],
80
+ [0., 0.]]),
81
+ 'WATER': array([[0. , 0.96737861],
82
+ [0. , 0.96737861],
83
+ [0. , 1. ]]),
84
+ 'SKY': array([[0. , 0.93018024],
85
+ [0. , 0.93018024],
86
+ [0. , 1. ]]),
87
+ 'LAND': array([[0. , 0.53552331],
88
+ [0. , 0.84447907],
89
+ [0. , 0.63414633]]),
90
+ 'CONSTRUCTION': array([[0., 0.],
91
+ [0., 0.],
92
+ [0., 0.]]),
93
+ 'OWN_BOAT': array([[0., 0.],
94
+ [0., 0.],
95
+ [0., 0.]]),
96
+ 'ALL': array([[0. , 0.18544773],
97
+ [0. , 0.27297993],
98
+ [0. , 0.20851224]])},
99
+ 'numbers': {'MOTORBOAT': array([[ 0. , 19. ],
100
+ [ 6. , 18. ],
101
+ [10. , 60. ],
102
+ [ 0. , 15.01568782]]),
103
+ 'FAR_AWAY_OBJECT': array([[0., 0.],
104
+ [6., 6.],
105
+ [9., 0.],
106
+ [0., 0.]]),
107
+ 'SAILING_BOAT_WITH_CLOSED_SAILS': array([[0. , 4. ],
108
+ [0. , 6. ],
109
+ [0. , 3. ],
110
+ [0. , 3.00985438]]),
111
+ 'SHIP': array([[ 0. , 9. ],
112
+ [ 0. , 2. ],
113
+ [ 1. , 14. ],
114
+ [ 0. , 8.11636066]]),
115
+ 'WATERCRAFT': array([[ 0., 0.],
116
+ [ 1., 9.],
117
+ [11., 1.],
118
+ [ 0., 0.]]),
119
+ 'SPHERICAL_BUOY': array([[ 0., 0.],
120
+ [ 1., 3.],
121
+ [36., 0.],
122
+ [ 0., 0.]]),
123
+ 'FLOTSAM': array([[0., 0.],
124
+ [0., 0.],
125
+ [7., 4.],
126
+ [0., 0.]]),
127
+ 'SAILING_BOAT_WITH_OPEN_SAILS': array([[0., 0.],
128
+ [0., 5.],
129
+ [0., 0.],
130
+ [0., 0.]]),
131
+ 'CONTAINER': array([[0., 0.],
132
+ [0., 0.],
133
+ [0., 0.],
134
+ [0., 0.]]),
135
+ 'PILLAR_BUOY': array([[0., 0.],
136
+ [0., 0.],
137
+ [5., 3.],
138
+ [0., 0.]]),
139
+ 'AERIAL_ANIMAL': array([[0., 0.],
140
+ [0., 0.],
141
+ [0., 0.],
142
+ [0., 0.]]),
143
+ 'HUMAN_IN_WATER': array([[0., 0.],
144
+ [0., 0.],
145
+ [0., 0.],
146
+ [0., 0.]]),
147
+ 'WOODEN_LOG': array([[0., 0.],
148
+ [0., 0.],
149
+ [0., 0.],
150
+ [0., 0.]]),
151
+ 'MARITIME_ANIMAL': array([[0., 0.],
152
+ [0., 0.],
153
+ [0., 0.],
154
+ [0., 0.]]),
155
+ 'WATER': array([[ 0. , 24. ],
156
+ [ 0. , 0. ],
157
+ [ 0. , 0. ],
158
+ [ 0. , 23.21708667]]),
159
+ 'SKY': array([[ 0. , 24. ],
160
+ [ 0. , 0. ],
161
+ [ 0. , 0. ],
162
+ [ 0. , 22.32432568]]),
163
+ 'LAND': array([[ 0. , 13. ],
164
+ [ 0. , 7. ],
165
+ [ 0. , 8. ],
166
+ [ 0. , 10.97822797]]),
167
+ 'CONSTRUCTION': array([[0., 0.],
168
+ [0., 0.],
169
+ [0., 0.],
170
+ [0., 0.]]),
171
+ 'OWN_BOAT': array([[ 0., 0.],
172
+ [ 0., 0.],
173
+ [ 0., 10.],
174
+ [ 0., 0.]]),
175
+ 'ALL': array([[ 0. , 93. ],
176
+ [ 14. , 56. ],
177
+ [ 79. , 103. ],
178
+ [ 0. , 82.66154319]])}}
179
  ```
180
 
181
  ## Metric Settings
 
212
  Setting this to False will aggregate the results (average the _scores_, sum up the _numbers_; see below for explanation of _scores_ and _numbers_)
213
  * `split_sq_rq: bool = True`: By default, the PQ-score is returned in three parts: the PQ score itself, and split into the segmentation quality (SQ) and recognition quality (RQ) part.
214
  Setting this to False will return the PQ score only (PQ=RQ*SQ).
215
+ * `area_rng: List[Tuple[float]]`: The list holds all the area ranges for which results are calculated.
216
+ Each range is represented by a Tuple, where the first element is the lower limit and the second is the upper limit of the area range.
217
+ Each value represents total number of pixels of a mask.
218
+ The parameter defaults to [(0, 1e8)].
219
 
220
  ## Output Values
221
  A dictionary containing the following keys:
222
  * __scores__: This is a dictionary, that contains a key for each label, if `per_class == True`. Otherwise it only contains the key _all_.
223
+ For each key, it contains an array that holds the scores in the the rows in following order: PQ, SQ and RQ. If `split_sq_rq == False`, the rows consist of PQ only.
224
+ The number of columns corresponds to the given area ranges. That means, the results in each column are for a certain size of objects.
225
  * __numbers__: This is a dictionary, that contains a key for each label, if `per_class == True`. Otherwise it only contains the key _all_.
226
+ For each key, it contains an array that consists of four elements in the rows: TP, FP, FN and IOU:
227
  * __TP__: number of true positive predictions
228
  * __FP__: number of false positive predictions
229
  * __FN__: number of false negative predictions
230
  * __IOU__: sum of IOU of all TP predictions with ground truth
231
 
232
+ With all these values, it is possible to calculate the final scores. As for the scores, the number of columns corresponds to the given area ranges. That means, the results in each column are for a certain size of objects.
233
 
234
  ## Further References
235