Spaces:
Running
Running
bascobasculino
commited on
Update PanopticQuality.py
Browse files- PanopticQuality.py +2 -1
PanopticQuality.py
CHANGED
@@ -141,13 +141,14 @@ class PQMetric(evaluate.Metric):
|
|
141 |
self.stuff = stuff if stuff is not None else DEFAULT_STUFF
|
142 |
self.per_class = per_class
|
143 |
self.split_sq_rq = split_sq_rq
|
144 |
-
|
145 |
self.pq_metric = PanopticQuality(
|
146 |
things=set([self.label2id[label] for label in self.label2id.keys() if label not in self.stuff]),
|
147 |
stuffs=set([self.label2id[label] for label in self.label2id.keys() if label in self.stuff]),
|
148 |
return_per_class=per_class,
|
149 |
return_sq_and_rq=split_sq_rq,
|
150 |
areas=area_rng,
|
|
|
151 |
#method=method
|
152 |
)
|
153 |
self.cont_to_cat = {label:key for key, label in self.pq_metric.metric.cat_id_to_continuous_id.items()}
|
|
|
141 |
self.stuff = stuff if stuff is not None else DEFAULT_STUFF
|
142 |
self.per_class = per_class
|
143 |
self.split_sq_rq = split_sq_rq
|
144 |
+
print("HF: DEVICE -> ", device)
|
145 |
self.pq_metric = PanopticQuality(
|
146 |
things=set([self.label2id[label] for label in self.label2id.keys() if label not in self.stuff]),
|
147 |
stuffs=set([self.label2id[label] for label in self.label2id.keys() if label in self.stuff]),
|
148 |
return_per_class=per_class,
|
149 |
return_sq_and_rq=split_sq_rq,
|
150 |
areas=area_rng,
|
151 |
+
device=device
|
152 |
#method=method
|
153 |
)
|
154 |
self.cont_to_cat = {label:key for key, label in self.pq_metric.metric.cat_id_to_continuous_id.items()}
|