cqu20160901 / MiDaS_DepthEstimation_rknn_Cplusplus

MiDaS(Multiple Depth Estimation Accuracy with Single Network)单目深度估计,部署 rk3588。
7 stars 0 forks source link

MiDaS_DepthEstimation_rknn_Cplusplus

MiDaS(Multiple Depth Estimation Accuracy with Single Network)单目深度估计,部署 rk3588。

模型转换和仿真测试参考 onnx转rknn

由于模型文件比较大,无法和代码一起上传。rknn模型文件

编译和运行

1)编译

cd examples/rknn_MiDaSDepth

bash build-linux_RK3588.sh

2)运行

cd install/rknn_MIDASDepth_demo_Linux

./rknn_MIDASDepth_demo

注意:修改模型、测试图像、保存图像的路径,修改文件为src下的main.cc


int main(int argc, char **argv)
{
    char model_path[256] = "/home/firefly/zhangqian/rknn/examples/rknn_MiDaSDepth/model/RK3588/midas_v21_384.rknn";
    char image_path[256] = "/home/firefly/zhangqian/rknn/examples/rknn_MiDaSDepth/test.jpg";
    char save_image_path[256] = "/home/firefly/zhangqian/rknn/examples/rknn_MiDaSDepth/test_result.jpg";

    detect(model_path, image_path, save_image_path);
    return 0;
}

板端测试效果

image image

板端时耗也贴出供参考:模型midas_v21_384,模型输入分辨率384x224, rk3588芯片。

image