Base class for
Monodepth2
(production segmentation) Input is an image (cv:Mat).
Output is a struct of segmentation results, named Monodepth2Result.
Sample code :
Mat img = cv::imread("sample_monodepth2.jpg");
auto Monodepth2 = vitis::ai::Monodepth2::create("monodepth2_pt",true);
auto result = Monodepth2->run(img);
// result is structure holding the mat.
std::cout << result.mat.cols <<"\n";
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::Monodepth2 class:
| Type | Member | Arguments |
|---|---|---|
std::unique_ptr<
Monodepth2
> |
create |
|
| vitis::ai::Monodepth2Result | run |
|
| std::vector< vitis::ai::Monodepth2Result > | run |
|
| int | getInputWidth |
|
| int | getInputHeight |
|
| size_t | get_input_batch |
|