(self)
| 218 | yield (self._seg == sid).numpy().astype(np.bool), sinfo |
| 219 | |
| 220 | def instance_masks(self): |
| 221 | for sid in self._seg_ids: |
| 222 | sinfo = self._sinfo.get(sid) |
| 223 | if sinfo is None or not sinfo["isthing"]: |
| 224 | continue |
| 225 | mask = (self._seg == sid).numpy().astype(np.bool) |
| 226 | if mask.sum() > 0: |
| 227 | yield mask, sinfo |
| 228 | |
| 229 | |
| 230 | def _create_text_labels(classes, scores, class_names, is_crowd=None): |