INNER CODE UNIT · Python

LazyClassDetections2D

allenai/ai2thor · ai2thor/server.py:279

class LazyClassDetections2D(LazyDetections2D):
    def __init__(self, instance_masks: LazyInstanceSegmentationMasks):
        super().__init__(instance_masks)
        self._loaded = False
        self._detections2d: Dict[str, Optional[Tuple[Tuple[int, int, int, int], ...]]] = {}

    def __eq__(self, other: object):
        if isinstance(other, self.__class__):
            return self.instance_masks == other.instance_masks
        else:
            return False

    def __len__(self) -> int:
        self._load_all()
        return len(self._detections2d)

    def _load_all(self):
        if not self._loaded:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…