(self)
| 144 | return self.mask.sum() |
| 145 | |
| 146 | def bbox(self): |
| 147 | p = mask_util.frPyObjects(self.polygons, self.height, self.width) |
| 148 | p = mask_util.merge(p) |
| 149 | bbox = mask_util.toBbox(p) |
| 150 | bbox[2] += bbox[0] |
| 151 | bbox[3] += bbox[1] |
| 152 | return bbox |
| 153 | |
| 154 | |
| 155 | class _PanopticPrediction: |