Spaces:
Sleeping
Sleeping
Update PanopticQuality.py
Browse files- PanopticQuality.py +1 -1
PanopticQuality.py
CHANGED
@@ -113,13 +113,13 @@ class PQMetric(evaluate.Metric):
|
|
113 |
self.stuff = stuff if stuff is not None else DEFAULT_STUFF
|
114 |
self.per_class = per_class
|
115 |
self.split_sq_rq = split_sq_rq
|
116 |
-
self.things_stuffs = sorted(self.pq_metric.things) + sorted(self.pq_metric.stuffs)
|
117 |
self.pq_metric = PanopticQuality(
|
118 |
things=set([self.label2id[label] for label in self.label2id.keys() if label not in self.stuff]),
|
119 |
stuffs=set([self.label2id[label] for label in self.label2id.keys() if label in self.stuff]),
|
120 |
return_per_class=per_class,
|
121 |
return_sq_and_rq=split_sq_rq
|
122 |
)
|
|
|
123 |
|
124 |
def _info(self):
|
125 |
return evaluate.MetricInfo(
|
|
|
113 |
self.stuff = stuff if stuff is not None else DEFAULT_STUFF
|
114 |
self.per_class = per_class
|
115 |
self.split_sq_rq = split_sq_rq
|
|
|
116 |
self.pq_metric = PanopticQuality(
|
117 |
things=set([self.label2id[label] for label in self.label2id.keys() if label not in self.stuff]),
|
118 |
stuffs=set([self.label2id[label] for label in self.label2id.keys() if label in self.stuff]),
|
119 |
return_per_class=per_class,
|
120 |
return_sq_and_rq=split_sq_rq
|
121 |
)
|
122 |
+
self.things_stuffs = sorted(self.pq_metric.things) + sorted(self.pq_metric.stuffs)
|
123 |
|
124 |
def _info(self):
|
125 |
return evaluate.MetricInfo(
|