INNER CODE UNIT · Python

cmax

allenai/ai2thor · ai2thor/server.py:223

        cmin, cmax = map(int, np.where(cols)[0][[0, -1]])

        return cmin, rmin, cmax, rmax

    def __contains__(self, key: object) -> bool:
        return key in self.instance_masks

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


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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…