![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/Vision/MonocularDepthEstimationDepthAnything.h>
Monocular relative depth estimation using the Depth Anything V2 Small neural network. More...
Monocular relative depth estimation using the Depth Anything V2 Small neural network.
This backend wraps a preconfigured Torch FP32 model (DepthAnythingV2-fp32-torch.yaml) registered through VisionMLModelsFactory. Given a single RGB frame, it runs one forward pass and returns a floating-point depth map aligned with the input image (same spacing and pixel-to-world matrix). Depth values are relative, not metric.
Input requirements enforced in compute(): exactly one 2D slice, three channels (RGB), and image modality. ML backend selection and autocast options are exposed via the nested "ML model types" property group from the internal model factory.
Public Member Functions | |
| std::string | name () const override |
Returns the display name "Depth Anything V2 Small". | |
| void | configure (const Properties *p) override |
Apply configuration, including ML backend settings under "ML model types". | |
| void | configuration (Properties *p) const override |
Export current configuration, including ML backend settings under "ML model types". | |
| std::unique_ptr< SharedImage > | compute (std::shared_ptr< SharedImage > img) override |
| Run depth inference on img. | |
| Public Member Functions inherited from ImFusion::Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Additional Inherited Members | |
| Public Attributes inherited from ImFusion::Configurable | |
| Signal | signalParametersChanged |
| Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
inlineoverridevirtual |
Returns the display name "Depth Anything V2 Small".
Implements ImFusion::MonocularDepthEstimation.
|
overridevirtual |
Apply configuration, including ML backend settings under "ML model types".
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
Export current configuration, including ML backend settings under "ML model types".
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
Run depth inference on img.
| img | Input RGB image (one slice, three channels). |
nullptr if the model is unavailable, the input format is invalid, or prediction fails. Implements ImFusion::MonocularDepthEstimation.