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 | - |
-
-
paddlepaddle >= 2.0.0
-
paddlehub >= 2.0.0 | How to install PaddleHub
-
-
-
$ hub install MiDaS_Large
- In case of any problems during installation, please refer to: Windows_Quickstart | Linux_Quickstart | Mac_Quickstart
-
-
-
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'])
-
-
-
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]
-
-
-
1.0.0
First release
-
$ hub install MiDaS_Large==1.0.0
-