bascobasculino commited on
Commit
7020189
1 Parent(s): c17f4f4

Update PanopticQuality.py

Browse files
Files changed (1) hide show
  1. PanopticQuality.py +2 -0
PanopticQuality.py CHANGED
@@ -87,6 +87,7 @@ class PQMetric(evaluate.Metric):
87
  (6**2, 12**2),
88
  (12**2, 1e5**2)],
89
  method: Literal["iou", "hungarian"] = "iou",
 
90
  class_agnostic: bool = False,
91
  **kwargs
92
  ):
@@ -140,6 +141,7 @@ class PQMetric(evaluate.Metric):
140
  self.stuff = stuff if stuff is not None else DEFAULT_STUFF
141
  self.per_class = per_class
142
  self.split_sq_rq = split_sq_rq
 
143
  self.pq_metric = PanopticQuality(
144
  things=set([self.label2id[label] for label in self.label2id.keys() if label not in self.stuff]),
145
  stuffs=set([self.label2id[label] for label in self.label2id.keys() if label in self.stuff]),
 
87
  (6**2, 12**2),
88
  (12**2, 1e5**2)],
89
  method: Literal["iou", "hungarian"] = "iou",
90
+ device: str = None,
91
  class_agnostic: bool = False,
92
  **kwargs
93
  ):
 
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
+ self.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]),