twanghcmut's picture
download
raw
695 Bytes
"""Abstract interface for depth sources."""
from __future__ import annotations
from abc import ABC, abstractmethod
from fpgm.types import DepthQuery, DepthResult
class DepthSource(ABC):
"""Provides metric depth at arbitrary 2D image locations for a given frame.
Implementations must never raise for individual bad points -- those are
reported via :attr:`DepthResult.valid` and :attr:`DepthResult.method`. Raising
is reserved for whole-frame failures (see
:class:`~fpgm.types.NoValidDepthAnnotationsError`).
"""
@abstractmethod
def query(self, q: DepthQuery) -> DepthResult:
"""Return metric depth (metres) at ``q.uv`` for frame ``q.frame_idx``."""

Xet Storage Details

Size:
695 Bytes
·
Xet hash:
1261e94b2304ec6475ce44dac8320dba123861edff10224d8f24dd591c241034

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.