This package is providing depth estimation using relative depth estimation models.
This depth estimation is implemented based on Sentis.
These packages work on Unity 2023.2 (Unity 6) or later.
Copyright © 2024 HoloLab Inc.
Distributed under the MIT License.
Note
DepthEstimationModel class supports general relative depth estimation models with input shape is NCHW and output shape is 1 x 1 x height x width.
The following models are expected to works.
Please export trained weights to ONNX format.
- DepthEstimationModel class : MiDaS, Depth Anything, and others.
Please add package in one of the following methods.
-
Package Manager
- [Window]>[Package Manager]
- [+]>[Add package from git URL...]
- Add the following URLs
https://github.com/HoloLabInc/HoloLabDnnPackages.git?path=packages/jp.co.hololab.dnn.base
https://github.com/HoloLabInc/HoloLabDnnPackages.git?path=packages/jp.co.hololab.dnn.depthestimation
-
Packages/manifest.json
- Open Packages/manifest.json file using text editor
- Add the following lines in dependencies
"jp.co.hololab.dnn.base": "https://github.com/HoloLabInc/HoloLabDnnPackages.git?path=packages/jp.co.hololab.dnn.base", "jp.co.hololab.dnn.depthestimation": "https://github.com/HoloLabInc/HoloLabDnnPackages.git?path=packages/jp.co.hololab.dnn.depthestimation",
Please see samples.
Note
This setting is automatically by editor extension when importing jp.co.hololab.dnn.base package.
This package depends on BaseModel/PreProcess shader of jp.co.hololab.dnn.base.
Please add BaseModel/PreProcess shader to Always Included Shaders before building your application.
- [Edit]>[Project Settings]
- [Graphics]>[Always Included Shaders]
- increment size and set BaseModel/PreProcess shader to new element