Skip to content

Monocular Depth Estimation

Example project of depth estimation using a single RGB camera.

Environment

  • OS: Windows 10 64bit
  • Unreal Engine: 4.26.2, 5.0.0
  • NNEngine plugin v1.2 or above

Download

Demo project is available on GitHub. (To use with UE5, use UE5 branch)
Please download from the release page.

Run the demo

  1. Extract the downloaded zip file and double-click MonoDepthEstimation.uproject.
  2. After launching, click Play on the editor to start the demo that performs AI estimation for the pre-recorded video.
  3. To run on your webcam, specify the webcam you want to use in /Content/Common/MediaPlayer_webcam.uasset.

Step-by-step guide to implementation

Additional models

Large model

If you want to use the large model (whose input image size is 384x384), download from here (GitHub Release page) or here (Google Drive) and place it under Source\ThirdParty\Models.

DPT model

To use DPT model, download model from here (GitHub Release page) or here (Google Drive) and place it under Source\ThirdParty\Models. Then, open /Content/DepthEstimation/DPT/test_DPT.map and click Play.

Display camera image to the preview mesh

By switching the base color pin of /Content/DepthEstimation/Grayscale_WPO.uasset, you can display camera image to the preview mesh.

Model details

See the following pages for the details of the model used in this project.

Default and large models

DPT model

Converted to ONNX by