Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 2.25 KB

File metadata and controls

91 lines (61 loc) · 2.25 KB

MiDaS_Large

Module Name MiDaS_Large
Category depth estimation
Network -
Dataset 3D Movies, WSVD, ReDWeb, MegaDepth
Fine-tuning supported or not No
Module Size 399MB
Latest update date 2021-02-26
Data indicators -

I.Basic Information

  • Application Effect Display

    • Sample results:


  • Module Introduction

    • MiDas_Large module is used for monocular depth estimation.

II.Installation

III.Module API Prediction

  • 1、Prediction Code Example

    • import paddlehub as hub
      import cv2
      
      model = hub.Module(name="MiDaS_Large")
      result = model.depth_estimation(images=[cv2.imread('/PATH/TO/IMAGE')])
      # or
      # result = model.depth_estimation(paths=['/PATH/TO/IMAGE'])
  • 2、API

    • def depth_estimation(images=None,
                      paths=None,
                      batch_size=1,
                      output_dir='output',
                      visualization=False):
      • depth estimation API.

      • Parameters

        • images (list[numpy.ndarray]): image data, ndarray.shape is in the format [H, W, C], BGR;
        • paths (list[str]): image path;
        • batch_size (int): the size of batch;
        • output_dir (str): save path of images;
        • visualization (bool): Whether to save the results as picture files;

        NOTE: choose one parameter to provide data from paths and images

      • Return

        • res (list[numpy.ndarray]): depth data,ndarray.shape is [H, W]

IV.Release Note

  • 1.0.0

    First release

    • $ hub install MiDaS_Large==1.0.0