INNER CODE UNIT · Python

commands

BrokenSource/DepthFlow · depthflow/scene.py:43

    def commands(self):
        self.cli.help = depthflow.__about__
        self.cli.version = depthflow.__version__
        self.cli.command(self.input)
        self.cli.command(DepthState, name="state", result_action=self.smartset)

        with contextlib.nullcontext("🌊 Depth Estimator") as group:
            self.cli.command(DepthAnythingV1, name="da1", group=group, result_action=self.smartset)
            self.cli.command(DepthAnythingV2, name="da2", group=group, result_action=self.smartset)

    def input(self,
        image: Annotated[Path | PilImage | np.ndarray | str | BytesIO | bytes | None, Parameter(
            help="Input image from Path, NumPy, URL (None to default)",
            name=("--image", "-i"))],
        depth: Annotated[Path | PilImage | np.ndarray | str | BytesIO | bytes | None, Parameter(
            help="Input depthmap of the image (None to estimate)",
            name=("--depth", "-d"))] = None,
    ) -> None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…